Suppression:

- disabled ubAdjacentSoldierCnt check as it doesn't work correctly
- improved adjacent tile check to avoid out of bounds values

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8891 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2020-08-20 04:24:44 +00:00
parent f5162b31d2
commit 4344c2caf8
2 changed files with 14 additions and 72 deletions
+5 -19
View File
@@ -3373,28 +3373,14 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
//Get the gridno the cursor is at
GetMouseMapPos( &usGridNo );
// code to test friendly fire detection
//if there is a selected soldier, and the cursor location is valid
/*if (gusSelectedSoldier != NOBODY && !TileIsOutOfBounds(usGridNo) && gfUIFullTargetFound)
{
SOLDIERTYPE *pSoldier = MercPtrs[gusSelectedSoldier];
SOLDIERTYPE *pOpponent = MercPtrs[gusUIFullTargetID];
UINT8 ubChanceToGetThrough;
if (pSoldier && pOpponent)
{
gUnderFire.Clear();
gUnderFire.Enable();
ubChanceToGetThrough = AISoldierToSoldierChanceToGetThrough(pSoldier, pOpponent);
gUnderFire.Disable();
ScreenMsg(FONT_ORANGE, MSG_INTERFACE, L"friendly fire chance %d count %d", gUnderFire.Chance(pSoldier->bTeam, pSoldier->bSide, TRUE), gUnderFire.Count(pSoldier->bTeam));
}
}*/
// if the cursor location is valid
if ( !TileIsOutOfBounds(usGridNo) )
{
// sevenfm: code to check ubAdjacentSoldierCnt
/*MAP_ELEMENT *pMapElement;
pMapElement = &(gpWorldLevelData[usGridNo]);
ScreenMsg(FONT_ORANGE, MSG_INTERFACE, L"adjacent soldiers %d", pMapElement->ubAdjacentSoldierCnt);*/
// if there is a selected soldier
if ( gusSelectedSoldier != NOBODY )
{