mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
Added memory leak detection to "new" operator
Prevent merc in slot 0 from disappearing due to errant schedule. Still need to find and fix schedule though Prevent attempts to turn or climb roof when soldier collapsed Fix problems when mortar or RPG randomly assigned to a soldier but cannot be added for whatever reason Pathing favors beginning path on orthogonal and using as few turns as possible (mostly old behavior). Prevent interruptions when soldier climbs up, which can cause fall into building just below the target roof position Fix pauses due to soldiers hurt in previous turn Fix soldier path not reaching destination when thrown by explosion damage or heavy gunfire Restore pathing to cave and underground exits Fix too many AI ending up on the roofs git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1588 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -252,8 +252,11 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
||||
|
||||
// CODE: SPECIAL MOVE CLIMB UP ROOF EVENT
|
||||
|
||||
// re-enable sight
|
||||
gTacticalStatus.uiFlags &= (~DISALLOW_SIGHT);
|
||||
// Moved here because this represents "already on the roof", so breath collapses and interrupts should
|
||||
// keep the soldier on the roof where he belongs
|
||||
// Move merc up specific height
|
||||
SetSoldierHeight( pSoldier, (FLOAT)50 );
|
||||
|
||||
{
|
||||
INT16 sXPos, sYPos;
|
||||
|
||||
@@ -261,6 +264,10 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
||||
ConvertMapPosToWorldTileCenter( pSoldier->sTempNewGridNo, &sXPos, &sYPos );
|
||||
EVENT_SetSoldierPosition( pSoldier, (FLOAT)sXPos, (FLOAT)sYPos );
|
||||
}
|
||||
|
||||
// re-enable sight
|
||||
gTacticalStatus.uiFlags &= (~DISALLOW_SIGHT);
|
||||
|
||||
// Move two CC directions
|
||||
EVENT_SetSoldierDirection( pSoldier, gTwoCCDirection[ pSoldier->ubDirection ] );
|
||||
|
||||
@@ -273,9 +280,6 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
||||
usUIMovementMode = GetMoveStateBasedOnStance( pSoldier, gAnimControl[ pSoldier->usAnimState ].ubEndHeight );
|
||||
pSoldier->usUIMovementMode = usUIMovementMode;
|
||||
|
||||
// Move merc up specific height
|
||||
SetSoldierHeight( pSoldier, (FLOAT)50 );
|
||||
|
||||
// ATE: Change interface level.....
|
||||
// CJC: only if we are a player merc
|
||||
if (pSoldier->bTeam == gbPlayerNum)
|
||||
@@ -326,6 +330,9 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
||||
// Move two C directions
|
||||
EVENT_SetSoldierDirection( pSoldier, gTwoCDirection[ pSoldier->ubDirection ] );
|
||||
|
||||
// Remove the roof marker
|
||||
HandlePlacingRoofMarker( pSoldier, pSoldier->sGridNo, FALSE, TRUE );
|
||||
|
||||
EVENT_SetSoldierDesiredDirection( pSoldier, pSoldier->ubDirection );
|
||||
// Adjust height
|
||||
SetSoldierHeight( pSoldier, (FLOAT)gClimbDownRoofStartDist[ pSoldier->ubBodyType ] );
|
||||
|
||||
Reference in New Issue
Block a user