Fix bug #9542. Check that projectiles are within the map before updating them.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2148 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2007-07-19 20:30:53 +00:00
parent a23b19137f
commit 77bc1dfd1d
1 changed files with 7 additions and 1 deletions

View File

@ -1755,7 +1755,13 @@ proj_Update( PROJECTILE *psObj )
setProjectileDamaged(psObj, NULL);
}
//Watermelon:get naybors
// This extra check fixes a crash in cam2, mission1
if (worldOnMap(psObj->x, psObj->y) == FALSE)
{
psObj->died = TRUE;
return;
}
projGetNaybors((PROJECTILE *)psObj);
switch (psObj->state)