mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Fixed buffer overrun for LUA strings
Made direction variables more consistent as unsigned chars. Several function prototypes updated for this. Many memory leaks plugged: External options, video overlays, laptop file lists, tactical message queue, strategic pathing, autobandage, merc hiring, detailed placements, crate in Drassen, tactical placement New functions and attributes for soldiers in LUA (still for debugging at best): Soldier.APs (current APs), Soldier.changestance (changes stance, uses game heights) File catalog ignores .SVN directories (game load speedup) Fix CTD in mouse regions JA2 window now refuses to move to negative coords Checks to prevent DirectX-related infinite loops due to minimizing and task switching Invading enemies should now appear on the borders even when reinforcements disabled in .ini Suppression should no longer work on mercs in medium water Infant/Young creatures use restored spit instead of Molotov Creatures begin with their 'guns' (spit) 'locked and loaded' (cartridge in chamber) Further fix to AXP and AlaarDB's weapon ready check: Now 'firing' is always counted as 'ready'. Prevent mercs from falling and flying back through obstacles Check whether battle group is even set before testing its location for battle setup Burst spread locations now limited to 6, the limit within the soldier struct Extra burst spread locations zeroed out so that they aren't used unless necessary Spread code now only shoots at locations in the spread, and will shoot at all 6 Only mercs in the sector where autobandage happens will be made to stand up after it's done Throwing a grenade at the tail of the plane in Drassen should not result in a CTD Reset attack busy count when loading a new sector git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1347 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -540,7 +540,7 @@ void RenderMovingGroupsAndMercs()
|
||||
UINT8 ubNumTroops, ubNumAdmins, ubNumElites;
|
||||
float ratio;
|
||||
INT32 minX, maxX, minY, maxY;
|
||||
INT32 iSector = 0;
|
||||
//INT32 iSector = 0;
|
||||
UINT8 ubIconType;
|
||||
UINT8 ubIconColor;
|
||||
UINT8 ubFontColor;
|
||||
@@ -577,7 +577,7 @@ void RenderMovingGroupsAndMercs()
|
||||
|
||||
if( pGroup->fPlayer )
|
||||
{
|
||||
ubIconType = ( pGroup->uiTraverseTime ) ? ICON_TYPE_ASSAULT : ICON_TYPE_STOPPED;
|
||||
ubIconType = (UINT8) (( pGroup->uiTraverseTime ) ? ICON_TYPE_ASSAULT : ICON_TYPE_STOPPED);
|
||||
ubIconColor = ICON_COLOR_GREEN;
|
||||
ubFontColor = FONT_YELLOW;
|
||||
}
|
||||
@@ -1447,16 +1447,16 @@ void ExtractAndUpdatePopulations()
|
||||
//CIniReader iniReader("..\\Ja2_Options.ini");
|
||||
//INT32 iMaxEnemyGroupSize = iniReader.ReadInteger("Options","MAX_STRATEGIC_TEAM_SIZE",20);
|
||||
|
||||
gsAINumAdmins = min( GetNumericStrictValueFromField( 0 ), gGameExternalOptions.iMaxEnemyGroupSize );
|
||||
gsAINumAdmins = (INT16) min( GetNumericStrictValueFromField( 0 ), gGameExternalOptions.iMaxEnemyGroupSize );
|
||||
SetInputFieldStringWithNumericStrictValue( 0, gsAINumAdmins );
|
||||
|
||||
gsAINumTroops = min( GetNumericStrictValueFromField( 1 ), gGameExternalOptions.iMaxEnemyGroupSize );
|
||||
gsAINumTroops = (INT16) min( GetNumericStrictValueFromField( 1 ), gGameExternalOptions.iMaxEnemyGroupSize );
|
||||
SetInputFieldStringWithNumericStrictValue( 1, gsAINumTroops );
|
||||
|
||||
gsAINumElites = min( GetNumericStrictValueFromField( 2 ), gGameExternalOptions.iMaxEnemyGroupSize );
|
||||
gsAINumElites = (INT16) min( GetNumericStrictValueFromField( 2 ), gGameExternalOptions.iMaxEnemyGroupSize );
|
||||
SetInputFieldStringWithNumericStrictValue( 2, gsAINumElites );
|
||||
|
||||
gsAINumCreatures = min( GetNumericStrictValueFromField( 3 ), gGameExternalOptions.iMaxEnemyGroupSize );
|
||||
gsAINumCreatures = (INT16) min( GetNumericStrictValueFromField( 3 ), gGameExternalOptions.iMaxEnemyGroupSize );
|
||||
SetInputFieldStringWithNumericStrictValue( 3, gsAINumCreatures );
|
||||
}
|
||||
|
||||
@@ -1866,7 +1866,7 @@ void BlitGroupIcon( UINT8 ubIconType, UINT8 ubIconColor, UINT32 uiX, UINT32 uiY,
|
||||
Assert( ubIconType < NUM_ICON_TYPES );
|
||||
Assert( ubIconColor < NUM_ICON_COLORS );
|
||||
|
||||
ubObjectIndex = ( ubIconType * NUM_ICON_COLORS ) + ubIconColor;
|
||||
ubObjectIndex = (UINT8)( ubIconType * NUM_ICON_COLORS ) + ubIconColor;
|
||||
BltVideoObject( FRAME_BUFFER, hVObject, ubObjectIndex, uiX, uiY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -917,8 +917,8 @@ BOOLEAN CanCharacterRepairButDoesntHaveARepairkit( SOLDIERTYPE *pSoldier )
|
||||
// check that character is alive, oklife, has repair skill, and equipment, etc.
|
||||
BOOLEAN CanCharacterRepair( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT8 bPocket = 0;
|
||||
BOOLEAN fToolKitFound = FALSE;
|
||||
//INT8 bPocket = 0;
|
||||
//BOOLEAN fToolKitFound = FALSE;
|
||||
|
||||
if ( !BasicCanCharacterAssignment( pSoldier, TRUE ) )
|
||||
{
|
||||
@@ -1565,8 +1565,8 @@ BOOLEAN CanCharacterPractise( SOLDIERTYPE *pSoldier )
|
||||
|
||||
BOOLEAN CanCharacterTrainTeammates( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT32 cnt = 0;
|
||||
SOLDIERTYPE *pTeamSoldier = NULL;
|
||||
//INT32 cnt = 0;
|
||||
//SOLDIERTYPE *pTeamSoldier = NULL;
|
||||
|
||||
// can character train at all
|
||||
if( CanCharacterPractise( pSoldier ) == FALSE )
|
||||
@@ -1588,7 +1588,7 @@ BOOLEAN CanCharacterTrainTeammates( SOLDIERTYPE *pSoldier )
|
||||
|
||||
BOOLEAN CanCharacterBeTrainedByOther( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT32 iCounter = 0;
|
||||
//INT32 iCounter = 0;
|
||||
|
||||
// can character train at all
|
||||
if( CanCharacterPractise( pSoldier ) == FALSE )
|
||||
@@ -2047,8 +2047,8 @@ UINT8 FindNumberInSectorWithAssignment( INT16 sX, INT16 sY, INT8 bAssignment )
|
||||
{
|
||||
// run thought list of characters find number with this assignment
|
||||
SOLDIERTYPE *pSoldier, *pTeamSoldier;
|
||||
INT32 cnt=0;
|
||||
INT32 iCounter=0;
|
||||
INT32 cnt=0;
|
||||
//INT32 iCounter=0;
|
||||
INT8 bNumberOfPeople = 0;
|
||||
|
||||
// set psoldier as first in merc ptrs
|
||||
@@ -2137,11 +2137,11 @@ UINT16 CalculateHealingPointsForDoctor(SOLDIERTYPE *pDoctor, UINT16 *pusMaxPts,
|
||||
}
|
||||
|
||||
// calculate effective doctoring rate (adjusted for drugs, alcohol, etc.)
|
||||
usHealPts = ( EffectiveMedical( pDoctor ) * (( EffectiveDexterity( pDoctor ) + EffectiveWisdom( pDoctor ) ) / 2) * (100 + ( 5 * EffectiveExpLevel( pDoctor) ) ) ) / gGameExternalOptions.ubDoctoringRateDivisor;
|
||||
usHealPts = (UINT16) (( EffectiveMedical( pDoctor ) * (( EffectiveDexterity( pDoctor ) + EffectiveWisdom( pDoctor ) ) / 2) * (100 + ( 5 * EffectiveExpLevel( pDoctor) ) ) ) / gGameExternalOptions.ubDoctoringRateDivisor);
|
||||
|
||||
// calculate normal doctoring rate - what it would be if his stats were "normal" (ignoring drugs, fatigue, equipment condition)
|
||||
// and equipment was not a hindrance
|
||||
*pusMaxPts = ( pDoctor -> bMedical * (( pDoctor -> bDexterity + pDoctor -> bWisdom ) / 2 ) * (100 + ( 5 * pDoctor->bExpLevel) ) ) / gGameExternalOptions.ubDoctoringRateDivisor;
|
||||
*pusMaxPts = (UINT16) (( pDoctor -> bMedical * (( pDoctor -> bDexterity + pDoctor -> bWisdom ) / 2 ) * (100 + ( 5 * pDoctor->bExpLevel) ) ) / gGameExternalOptions.ubDoctoringRateDivisor);
|
||||
|
||||
// adjust for fatigue
|
||||
ReducePointsForFatigue( pDoctor, &usHealPts );
|
||||
@@ -2196,11 +2196,11 @@ UINT8 CalculateRepairPointsForRepairman(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts
|
||||
}
|
||||
|
||||
// calculate effective repair rate (adjusted for drugs, alcohol, etc.)
|
||||
usRepairPts = (EffectiveMechanical( pSoldier ) * EffectiveDexterity( pSoldier ) * (100 + ( 5 * EffectiveExpLevel( pSoldier) ) ) ) / ( gGameExternalOptions.ubRepairRateDivisor * gGameExternalOptions.ubAssignmentUnitsPerDay );
|
||||
usRepairPts = (UINT16) ((EffectiveMechanical( pSoldier ) * EffectiveDexterity( pSoldier ) * (100 + ( 5 * EffectiveExpLevel( pSoldier) ) ) ) / ( gGameExternalOptions.ubRepairRateDivisor * gGameExternalOptions.ubAssignmentUnitsPerDay ));
|
||||
|
||||
// calculate normal repair rate - what it would be if his stats were "normal" (ignoring drugs, fatigue, equipment condition)
|
||||
// and equipment was not a hindrance
|
||||
*pusMaxPts = ( pSoldier -> bMechanical * pSoldier -> bDexterity * (100 + ( 5 * pSoldier->bExpLevel) ) ) / ( gGameExternalOptions.ubRepairRateDivisor * gGameExternalOptions.ubAssignmentUnitsPerDay );
|
||||
*pusMaxPts = (UINT16) (( pSoldier -> bMechanical * pSoldier -> bDexterity * (100 + ( 5 * pSoldier->bExpLevel) ) ) / ( gGameExternalOptions.ubRepairRateDivisor * gGameExternalOptions.ubAssignmentUnitsPerDay ));
|
||||
|
||||
|
||||
// adjust for fatigue
|
||||
@@ -2275,7 +2275,7 @@ void HandleDoctorsInSector( INT16 sX, INT16 sY, INT8 bZ )
|
||||
{
|
||||
SOLDIERTYPE *pSoldier, *pTeamSoldier;
|
||||
INT32 cnt=0;
|
||||
INT32 iCounter=0;
|
||||
//INT32 iCounter=0;
|
||||
|
||||
// set psoldier as first in merc ptrs
|
||||
pSoldier = MercPtrs[0];
|
||||
|
||||
@@ -352,6 +352,7 @@ void ShutdownStrategicLayer()
|
||||
TrashUndergroundSectorInfo();
|
||||
DeleteCreatureDirectives();
|
||||
KillStrategicAI();
|
||||
ClearTacticalMessageQueue();
|
||||
}
|
||||
|
||||
BOOLEAN InitNewGame( BOOLEAN fReset )
|
||||
|
||||
@@ -2055,6 +2055,7 @@ void PlotPathForHelicopter( INT16 sX, INT16 sY )
|
||||
void PlotATemporaryPathForHelicopter( INT16 sX, INT16 sY )
|
||||
{
|
||||
// clear old temp path
|
||||
pTempHelicopterPath = MoveToBeginningOfPathList( pTempHelicopterPath);
|
||||
pTempHelicopterPath = ClearStrategicPathList( pTempHelicopterPath, 0 );
|
||||
|
||||
// is cursor allowed here?..if not..don't build temp path
|
||||
|
||||
@@ -1263,7 +1263,7 @@ BOOLEAN HandleFiredDeadMerc( SOLDIERTYPE *pSoldier )
|
||||
SET_PALETTEREP_ID ( Corpse.SkinPal, pSoldier->SkinPal );
|
||||
SET_PALETTEREP_ID ( Corpse.PantsPal, pSoldier->PantsPal );
|
||||
|
||||
Corpse.bDirection = pSoldier->bDirection;
|
||||
Corpse.bDirection = pSoldier->ubDirection;
|
||||
|
||||
// Set time of death
|
||||
Corpse.uiTimeOfDeath = GetWorldTotalMin( );
|
||||
|
||||
+54
-44
@@ -443,54 +443,58 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
if( gbWorldSectorZ > 0 )
|
||||
return PrepareEnemyForUndergroundBattle();
|
||||
|
||||
// Reinforcement groups? Bring it on! That is, if this is an enemy invasion.
|
||||
if( gGameExternalOptions.gfAllowReinforcements &&
|
||||
!( (GetTownIdForSector( gWorldSectorX, gWorldSectorY ) == OMERTA )&&( gGameOptions.ubDifficultyLevel != DIF_LEVEL_INSANE ) ) &&
|
||||
gpBattleGroup && !gpBattleGroup->fPlayer )
|
||||
// Add the invading group
|
||||
if (gpBattleGroup && !gpBattleGroup->fPlayer )
|
||||
{
|
||||
UINT16 pusMoveDir[4][3];
|
||||
UINT8 ubDirNumber = 0, ubIndex;
|
||||
GROUP *pGroup;
|
||||
SECTORINFO *pThisSector;
|
||||
|
||||
//The enemy has instigated the battle which means they are the ones entering the conflict.
|
||||
//The player was actually in the sector first, and the enemy doesn't use reinforced placements
|
||||
HandleArrivalOfReinforcements( gpBattleGroup );
|
||||
|
||||
// They arrived in multiple groups, so here they come
|
||||
pThisSector = &SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ];
|
||||
|
||||
GenerateDirectionInfos( gWorldSectorX, gWorldSectorY, &ubDirNumber, pusMoveDir,
|
||||
( GetTownIdForSector( gWorldSectorX, gWorldSectorY ) != BLANK_SECTOR ? TRUE : FALSE ), TRUE, IS_ONLY_IN_CITIES );
|
||||
|
||||
for( ubIndex = 0; ubIndex < ubDirNumber; ubIndex++ )
|
||||
// Reinforcement groups? Bring it on!
|
||||
if( gGameExternalOptions.gfAllowReinforcements &&
|
||||
!( (GetTownIdForSector( gWorldSectorX, gWorldSectorY ) == OMERTA )&&( gGameOptions.ubDifficultyLevel != DIF_LEVEL_INSANE ) ) )
|
||||
{
|
||||
while ( NumMobileEnemiesInSector( SECTORX( pusMoveDir[ ubIndex ][ 0 ] ), SECTORY( pusMoveDir[ ubIndex ][ 0 ] ) ) && GetEnemyGroupInSector( SECTORX( pusMoveDir[ ubIndex][ 0 ] ), SECTORY( pusMoveDir[ ubIndex ][ 0 ] ) ) )
|
||||
UINT16 pusMoveDir[4][3];
|
||||
UINT8 ubDirNumber = 0, ubIndex;
|
||||
GROUP *pGroup;
|
||||
SECTORINFO *pThisSector;
|
||||
|
||||
// They arrived in multiple groups, so here they come
|
||||
pThisSector = &SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ];
|
||||
|
||||
GenerateDirectionInfos( gWorldSectorX, gWorldSectorY, &ubDirNumber, pusMoveDir,
|
||||
( GetTownIdForSector( gWorldSectorX, gWorldSectorY ) != BLANK_SECTOR ? TRUE : FALSE ), TRUE, IS_ONLY_IN_CITIES );
|
||||
|
||||
for( ubIndex = 0; ubIndex < ubDirNumber; ubIndex++ )
|
||||
{
|
||||
pGroup = GetEnemyGroupInSector( SECTORX( pusMoveDir[ ubIndex][ 0 ] ), SECTORY( pusMoveDir[ ubIndex ][ 0 ] ) );
|
||||
while ( NumMobileEnemiesInSector( SECTORX( pusMoveDir[ ubIndex ][ 0 ] ), SECTORY( pusMoveDir[ ubIndex ][ 0 ] ) ) && GetEnemyGroupInSector( SECTORX( pusMoveDir[ ubIndex][ 0 ] ), SECTORY( pusMoveDir[ ubIndex ][ 0 ] ) ) )
|
||||
{
|
||||
pGroup = GetEnemyGroupInSector( SECTORX( pusMoveDir[ ubIndex][ 0 ] ), SECTORY( pusMoveDir[ ubIndex ][ 0 ] ) );
|
||||
|
||||
pGroup->ubPrevX = pGroup->ubSectorX;
|
||||
pGroup->ubPrevY = pGroup->ubSectorY;
|
||||
pGroup->ubPrevX = pGroup->ubSectorX;
|
||||
pGroup->ubPrevY = pGroup->ubSectorY;
|
||||
|
||||
pGroup->ubSectorX = pGroup->ubNextX = (UINT8)gWorldSectorX;
|
||||
pGroup->ubSectorY = pGroup->ubNextY = (UINT8)gWorldSectorY;
|
||||
pGroup->ubSectorX = pGroup->ubNextX = (UINT8)gWorldSectorX;
|
||||
pGroup->ubSectorY = pGroup->ubNextY = (UINT8)gWorldSectorY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//It is now possible that other enemy groups have also arrived. Add them in the same manner.
|
||||
pGroup = gpGroupList;
|
||||
while( pGroup )
|
||||
{
|
||||
if( pGroup != gpBattleGroup && !pGroup->fPlayer && !pGroup->fVehicle &&
|
||||
pGroup->ubSectorX == gpBattleGroup->ubSectorX &&
|
||||
//It is now possible that other enemy groups have also arrived. Add them in the same manner.
|
||||
pGroup = gpGroupList;
|
||||
while( pGroup )
|
||||
{
|
||||
if( pGroup != gpBattleGroup && !pGroup->fPlayer && !pGroup->fVehicle &&
|
||||
pGroup->ubSectorX == gpBattleGroup->ubSectorX &&
|
||||
pGroup->ubSectorY == gpBattleGroup->ubSectorY &&
|
||||
!pGroup->pEnemyGroup->ubAdminsInBattle &&
|
||||
!pGroup->pEnemyGroup->ubTroopsInBattle &&
|
||||
!pGroup->pEnemyGroup->ubElitesInBattle )
|
||||
{
|
||||
HandleArrivalOfReinforcements( pGroup );
|
||||
{
|
||||
HandleArrivalOfReinforcements( pGroup );
|
||||
}
|
||||
pGroup = pGroup->next;
|
||||
}
|
||||
pGroup = pGroup->next;
|
||||
|
||||
}
|
||||
|
||||
ValidateEnemiesHaveWeapons();
|
||||
@@ -670,24 +674,29 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
pGroup = gpGroupList;
|
||||
while( pGroup && sNumSlots )
|
||||
{
|
||||
i = gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID;
|
||||
pSoldier = &Menptr[ i ];
|
||||
if( !pGroup->fPlayer && !pGroup->fVehicle && pGroup->ubSectorX == gWorldSectorX && pGroup->ubSectorY == gWorldSectorY && !gbWorldSectorZ )
|
||||
if( !pGroup->fPlayer && !pGroup->fVehicle &&
|
||||
pGroup->ubSectorX == gWorldSectorX && pGroup->ubSectorY == gWorldSectorY && !gbWorldSectorZ )
|
||||
{
|
||||
num = pGroup->ubGroupSize;
|
||||
ubNumAdmins = pGroup->pEnemyGroup->ubAdminsInBattle;
|
||||
ubNumTroops = pGroup->pEnemyGroup->ubTroopsInBattle;
|
||||
ubNumElites = pGroup->pEnemyGroup->ubElitesInBattle;
|
||||
while( num && sNumSlots && i <= gTacticalStatus.Team[ ENEMY_TEAM ].bLastID )
|
||||
num = ubNumAdmins + ubNumTroops + ubNumElites;
|
||||
|
||||
for (i= gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID;
|
||||
i<= gTacticalStatus.Team[ ENEMY_TEAM ].bLastID && num;
|
||||
i++)
|
||||
{
|
||||
while( !pSoldier->bActive || pSoldier->ubGroupID )
|
||||
// At this point we should not have added more soldiers than are in slots
|
||||
Assert( sNumSlots);
|
||||
|
||||
pSoldier = &Menptr[ i ];
|
||||
|
||||
// Skip inactive and already grouped soldiers
|
||||
if (!pSoldier->bActive || pSoldier->ubGroupID)
|
||||
{
|
||||
pSoldier = &Menptr[ ++i ];
|
||||
if( i > gTacticalStatus.Team[ ENEMY_TEAM ].bLastID )
|
||||
{
|
||||
AssertMsg( 0, "Failed to assign battle counters for enemies properly. Please send save. KM:0." );
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
switch( pSoldier->ubSoldierClass )
|
||||
{
|
||||
case SOLDIER_CLASS_ADMINISTRATOR:
|
||||
@@ -718,8 +727,9 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
}
|
||||
break;
|
||||
}
|
||||
pSoldier = &Menptr[ ++i ];
|
||||
}
|
||||
|
||||
Assert( ubNumElites + ubNumTroops + ubNumAdmins + num == 0);
|
||||
}
|
||||
pGroup = pGroup->next;
|
||||
}
|
||||
|
||||
@@ -1552,7 +1552,7 @@ void AddCorpsesToBloodcatLair( INT16 sSectorX, INT16 sSectorY )
|
||||
SET_PALETTEREP_ID ( Corpse.PantsPal, "GREENPANTS" );
|
||||
|
||||
|
||||
Corpse.bDirection = (INT8)Random(8);
|
||||
Corpse.ubDirection = (UINT8)Random(8);
|
||||
|
||||
// Set time of death
|
||||
// Make sure they will be rotting!
|
||||
|
||||
@@ -495,7 +495,9 @@ PathStPtr BuildAStrategicPath(PathStPtr pPath , INT16 iStartSectorNum, INT16 iEn
|
||||
INT32 iOldDelta = 0;
|
||||
iCurrentSectorNum=iStartSectorNum;
|
||||
|
||||
|
||||
if(iEndSectorNum < MAP_WORLD_X-1)
|
||||
return NULL;
|
||||
|
||||
if (pNode==NULL)
|
||||
{
|
||||
// start new path list
|
||||
@@ -513,9 +515,6 @@ PathStPtr BuildAStrategicPath(PathStPtr pPath , INT16 iStartSectorNum, INT16 iEn
|
||||
pHeadOfPathList = pNode;
|
||||
}
|
||||
|
||||
if(iEndSectorNum < MAP_WORLD_X-1)
|
||||
return NULL;
|
||||
|
||||
iPathLength=((INT32)FindStratPath(((INT16)iStartSectorNum),((INT16)iEndSectorNum), sMvtGroupNumber, fTacticalTraversal ));
|
||||
while(iPathLength > iCount)
|
||||
{
|
||||
@@ -885,6 +884,7 @@ PathStPtr ClearStrategicPathList( PathStPtr pHeadOfPath, INT16 sMvtGroup )
|
||||
|
||||
// move to next node
|
||||
pNode = pNode -> pNext;
|
||||
pNode->pPrev = NULL;
|
||||
|
||||
// delete delete node
|
||||
MemFree( pDeleteNode );
|
||||
|
||||
@@ -7510,6 +7510,7 @@ void CheckToSeeIfMouseHasLeftMapRegionDuringPathPlotting( )
|
||||
// clear the temp path
|
||||
if( pTempCharacterPath )
|
||||
{
|
||||
pTempCharacterPath = MoveToBeginningOfPathList( pTempCharacterPath);
|
||||
pTempCharacterPath = ClearStrategicPathList( pTempCharacterPath, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user