Partially fixed vanilla exploit (detect invisible enemy by using plotted path), still doesn't work if merc is prone.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8974 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-04-25 06:32:03 +00:00
parent 99556e09a5
commit f9ec5b1b04
+5 -10
View File
@@ -3439,17 +3439,12 @@ if(!GridNoOnVisibleWorldTile(iDestination))
// ATE: ONLY cancel if they are moving.....
ubMerc = WhoIsThere2( newLoc, s->pathing.bLevel);
if ( ubMerc < TOTAL_SOLDIERS && ubMerc != s->ubID )
// sevenfm: for player mercs, ignore invisible opponents
if (ubMerc < TOTAL_SOLDIERS && ubMerc != s->ubID &&
(!(s->flags.uiStatusFlags & SOLDIER_PC) || MercPtrs[ubMerc]->bSide == s->bSide || MercPtrs[ubMerc]->aiData.bNeutral || MercPtrs[ubMerc]->bVisible >= 0 || SoldierToSoldierLineOfSightTest(s, MercPtrs[ubMerc], TRUE, CALC_FROM_ALL_DIRS)))
//if ( ubMerc < TOTAL_SOLDIERS && ubMerc != s->ubID )
{
// Check for movement....
//if ( fTurnBased || ( (Menptr[ ubMerc ].sFinalDestination == Menptr[ ubMerc ].sGridNo) || (Menptr[ ubMerc ].fDelayedMovement) ) )
//{
goto NEXTDIR;
//}
// else
//{
// nextCost += 50;
//}
goto NEXTDIR;
}
}