mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
-tweaked ai turning in green a little bit to make them look for noises in green (mostly for snipers)
-enabled tunnel vision attribute on readied weapons (previously only worked on attachments, and non-weapon items) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@338 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1212,7 +1212,19 @@ DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("DecideActionGreen: Snipers like to raise
|
||||
}
|
||||
else
|
||||
{
|
||||
pSoldier->usActionData = (UINT16)Random(8);
|
||||
INT32 iNoiseValue;
|
||||
BOOLEAN fClimb;
|
||||
BOOLEAN fReachable;
|
||||
INT16 sNoiseGridNo = MostImportantNoiseHeard(pSoldier,&iNoiseValue, &fClimb, &fReachable);
|
||||
UINT8 ubNoiseDir;
|
||||
|
||||
if (sNoiseGridNo != NOWHERE)
|
||||
ubNoiseDir = atan8(CenterX(pSoldier->sGridNo),CenterY(pSoldier->sGridNo),CenterX(sNoiseGridNo),CenterY(sNoiseGridNo));
|
||||
|
||||
if ( sNoiseGridNo != NOWHERE && pSoldier->bDirection != ubNoiseDir )
|
||||
pSoldier->usActionData = ubNoiseDir;
|
||||
else
|
||||
pSoldier->usActionData = (UINT16)PreRandom(8);
|
||||
}
|
||||
} while (pSoldier->usActionData == pSoldier->bDirection);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user