There is a serious Bug in the Game, that prevents raids from ending.
The Navy Seals raided my Safehouse. The Firemen left my safehouse an almost empty map, so I could reach the Tank without fighting any Seals, and destroyed the Tank. Another Wave of Seals and a second Tank appered. I got to the other Tank and destroyed it too. The raid wasn't over. I started to fight the seals, but inbetween two other waves of Seals and Tanks were spawned. I finally manged to kill all siegeunits and tanks, and now nothing is left on the map. This could be repeated infinitly (or exactly 65536 times).
includes.h :
The structure siegest containes a short variable named tanks.
combat\fight.cpp ; sidemode\advance.cpp :
fight.cpp line 1152 and advance.cpp lines 406 and 466 decrease this variable, if a tank is killed.
sitemode\sitemode.cpp :
line 258 sets this variable to 1 when the initial tank is created.
lines 2449 and 2450 are the conditions to win the raid : siege.tanks must be exactly 0 and siege.kills must be above 9.
The block from 2402 to 2450 contains the actual bug :
if(!(location[cursite]->compound_walls & COMPOUND_TANKTRAPS)&&
location[cursite]->siege.siegetype==SIEGE_POLICE&&
location[cursite]->siege.escalationstate>=2)
{
count=10000;
int hunitnum=1;
for(int t=0;t<hunitnum;t++)
{
do
{
lx=LCSrandom(7)+(MAPX/2)-3;
ly=LCSrandom(5);
lz=0;
count--;
if(count==0)break;
}while((levelmap[lx][ly][lz].flag & (SITEBLOCK_BLOCK|SITEBLOCK_DOOR|SITEBLOCK_EXIT))||
(levelmap[lx][ly][lz].siegeflag & (SIEGEFLAG_UNIT|SIEGEFLAG_HEAVYUNIT|SIEGEFLAG_TRAP)));
levelmap[lx][ly][lz].siegeflag|=SIEGEFLAG_HEAVYUNIT; }
}
}
The marked line creates a new Tank, but does not increase siege.tanks.
If you kill more than two tanks, siege.tanks goes negative, and the raid becomes unwinnable.
To fix the Bug, insert the following line after the marked line :
location[cursite]->siege.tanks++;
To harden the Game further replace the following line (2450) :
location[cursite]->siege.tanks==0&&
with the following line :
location[cursite]->siege.tanks<1&&
To provoke the Bug :
*Get your safehouse raided by the Naly Seals and Tanks
* Kill two or more Tanks without killing more than 9 Seals.
Tips:
* It helps to reach the Tank, if the firemen burned out every tile in another raid.