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:
Sevenfm
2020-10-17 06:30:23 +00:00
parent 43ab995ecd
commit b45af3f575
9 changed files with 72 additions and 23 deletions
+5 -3
View File
@@ -2633,14 +2633,16 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
// if the looker hasn't seen this opponent at all earlier this turn, OR
// if the opponent is not where the looker last thought him to be
if ((pSoldier->aiData.bOppList[pOpponent->ubID] != SEEN_THIS_TURN) || (gsLastKnownOppLoc[pSoldier->ubID][pOpponent->ubID] != sOppGridNo))
// sevenfm: only call SetNewSituation if location is different to reduce frequency of AI re-evaluation
//if ((pSoldier->aiData.bOppList[pOpponent->ubID] != SEEN_THIS_TURN) || (gsLastKnownOppLoc[pSoldier->ubID][pOpponent->ubID] != sOppGridNo))
if (KnownLocation(pSoldier, pOpponent->ubID) != sOppGridNo || KnownLevel(pSoldier, pOpponent->ubID) != bOppLevel)
{
SetNewSituation( pSoldier ); // force the looker to re-evaluate
// anv: simulate informing buddies about detected enemy's position
// sevenfm: check that he is really new
if( gbPublicOpplist[pSoldier->bTeam][pOpponent->ubID] != SEEN_CURRENTLY && gbPublicOpplist[pSoldier->bTeam][pOpponent->ubID] != SEEN_THIS_TURN )
//if( gbPublicOpplist[pSoldier->bTeam][pOpponent->ubID] != SEEN_CURRENTLY && gbPublicOpplist[pSoldier->bTeam][pOpponent->ubID] != SEEN_THIS_TURN )
if (gbSeenOpponents[pSoldier->ubID][pOpponent->ubID] < 1 && gbPublicOpplist[pSoldier->bTeam][pOpponent->ubID] < SEEN_CURRENTLY)
PossiblyStartEnemyTaunt( pSoldier, TAUNT_INFORM_ABOUT, pOpponent->ubID );
}
else
{