mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
FindNearestUngassedLand, FindNearbyDarkerSpot:
- optimization: don't check spots already checked in previous loop - increase max distance to 35, reduce to 25 if complex AI not allowed, reduce to 15 in realtime CanDragPerson: use world movement cost instead of LOS check. Say TAUNT_RELOAD, TAUNT_OUT_OF_AMMO taunts if mag size > 4 or Chance (CHANCE_SAY_ANNOYING_PHRASE). SpotDangerLevel: also check Water and CorpseWarning for danger level = 1. ManSeesMan: only call SetNewSituation if location or level are different to reduce frequency of AI re-evaluation. Only allow radio animation on initial red alert, if sector is not jammed. Press ESC to stop dragging. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8904 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4882,13 +4882,16 @@ UINT8 SpotDangerLevel(SOLDIERTYPE *pSoldier, INT32 sGridNo)
|
||||
fAlerted = TRUE;
|
||||
|
||||
if (!fProfile && !fNeutral && !gGameExternalOptions.fAITacticalRetreat && NorthSpot(sGridNo, pSoldier->pathing.bLevel) ||
|
||||
!fProfile && fGreen && CheckDoorNearGridno(sGridNo))
|
||||
!fProfile && fGreen && CheckDoorNearGridno(sGridNo) ||
|
||||
Water(sGridNo, pSoldier->pathing.bLevel) && !pSoldier->IsFlanking() ||
|
||||
CorpseWarning(pSoldier, sGridNo, pSoldier->pathing.bLevel))
|
||||
ubLevel = 1;
|
||||
|
||||
if (fAlerted && !fNeutral && (InLightAtNight(sGridNo, pSoldier->pathing.bLevel) || FindNearbyExplosiveStructure(sGridNo, pSoldier->pathing.bLevel)))
|
||||
if (fAlerted && !fNeutral &&
|
||||
(InLightAtNight(sGridNo, pSoldier->pathing.bLevel) || FindNearbyExplosiveStructure(sGridNo, pSoldier->pathing.bLevel)))
|
||||
ubLevel = 2;
|
||||
|
||||
if (DeepWater(sGridNo, pSoldier->pathing.bLevel) ||
|
||||
if (DeepWater(sGridNo, pSoldier->pathing.bLevel) && !pSoldier->IsFlanking() ||
|
||||
RedSmokeDanger(sGridNo, pSoldier->pathing.bLevel))
|
||||
ubLevel = 3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user