mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +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:
@@ -182,6 +182,11 @@ void ProcessTacticalSchedule( UINT8 ubScheduleID )
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
if (pSchedule->ubSoldierID == 0)
|
||||
{
|
||||
ScreenMsg( FONT_RED, MSG_INTERFACE, L"Schedule callback: Illegal soldier ID of %d.", pSchedule->ubSoldierID );
|
||||
return;
|
||||
}
|
||||
|
||||
//Validate the existance of the soldier.
|
||||
pSoldier = MercPtrs[ pSchedule->ubSoldierID ];
|
||||
@@ -661,6 +666,11 @@ void AutoProcessSchedule( SCHEDULENODE *pSchedule, INT32 index )
|
||||
|
||||
pSoldier = MercPtrs[ pSchedule->ubSoldierID ];
|
||||
|
||||
if (pSoldier->ubID == 0)
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTGREEN, MSG_INTERFACE, L"Soldier %s moved to away slot by schedule ID %d!", pSoldier->name, pSchedule->ubScheduleID );
|
||||
}
|
||||
|
||||
#ifdef JA2EDITOR
|
||||
if ( pSoldier->ubProfile != NO_PROFILE )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user