Remove visibility information when changing between campaigns. This closes ticket:1461
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9435 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
8b9dfd0789
commit
ca1d602ccb
|
@ -1309,6 +1309,7 @@ static void clearCampaignUnits(void)
|
|||
{
|
||||
orderDroid(psDroid, DORDER_STOP);
|
||||
setDroidBase(psDroid, NULL);
|
||||
visRemoveVisibilityOffWorld((BASE_OBJECT *)psDroid);
|
||||
CHECK_DROID(psDroid);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -307,12 +307,9 @@ void visRemoveVisibility(BASE_OBJECT *psObj)
|
|||
|
||||
void visRemoveVisibilityOffWorld(BASE_OBJECT *psObj)
|
||||
{
|
||||
if (psObj->watchedTiles && psObj->numWatchedTiles > 0)
|
||||
{
|
||||
free(psObj->watchedTiles);
|
||||
psObj->watchedTiles = NULL;
|
||||
psObj->numWatchedTiles = 0;
|
||||
}
|
||||
free(psObj->watchedTiles);
|
||||
psObj->watchedTiles = NULL;
|
||||
psObj->numWatchedTiles = 0;
|
||||
}
|
||||
|
||||
/* Check which tiles can be seen by an object */
|
||||
|
|
Loading…
Reference in New Issue