From 4b4cf5f373cd1613b0caa8284fb52ca2ea89fbef Mon Sep 17 00:00:00 2001 From: avolkov Date: Wed, 1 Oct 2003 16:11:42 +0000 Subject: [PATCH] Bug #319 part 3 fix (fleeing yehat collision after menu) git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1262 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/ipdisp.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sc2/src/sc2code/ipdisp.c b/sc2/src/sc2code/ipdisp.c index 799209b64..dc8972adc 100644 --- a/sc2/src/sc2code/ipdisp.c +++ b/sc2/src/sc2code/ipdisp.c @@ -144,13 +144,20 @@ ip_group_preprocess (PELEMENT ElementPtr) << FACING_SHIFT; } - if (!(task & REFORM_GROUP) - && (task & ~(IGNORE_FLAGSHIP | REFORM_GROUP)) != FLEE) + if (!(task & REFORM_GROUP)) { - if (EPtr->state_flags & BAD_GUY) - EPtr->state_flags &= ~GOOD_GUY; - else + if ((task & ~(IGNORE_FLAGSHIP | REFORM_GROUP)) != FLEE) + { + if (EPtr->state_flags & BAD_GUY) + EPtr->state_flags &= ~GOOD_GUY; + else + EPtr->state_flags |= BAD_GUY; + } + else if (!(task & IGNORE_FLAGSHIP) + && !(EPtr->state_flags & (GOOD_GUY | BAD_GUY))) + { // fleeing yehat ship collisions after menu fix EPtr->state_flags |= BAD_GUY; + } } target_loc = GET_GROUP_DEST (StarShipPtr);