Bugfixes (by Flugente)

- fixed a bug that prevented zombies from rising in turnbased mode
- fixed a bug that prevented weapons on the floor from cooling down in turnbased mode
- fixed a bug that caused gun traps with buckshot ammo to deduct to much ammo
- fixed a bug that could crash the game when firing a lot of gun traps at the same time

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5346 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-06-16 22:57:53 +00:00
parent 99d9567f35
commit 88155e52d0
11 changed files with 272 additions and 246 deletions
+13
View File
@@ -14374,10 +14374,23 @@ void SOLDIERTYPE::EVENT_SoldierBeginAttachCan( INT32 sGridNo, UINT8 ubDirection
}
extern UINT8 NumEnemiesInAnySector( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ );
void SOLDIERTYPE::EVENT_SoldierBuildStructure( INT32 sGridNo, UINT8 ubDirection )
{
BOOLEAN fSuccess = FALSE;
// if specified by the ini, building/disassembling stuff is disabled while enemies are around
if ( !gGameExternalOptions.fFortificationAllowInHostileSector )
{
if( gWorldSectorX != -1 && gWorldSectorY != -1 && gWorldSectorX != 0 && gWorldSectorY != 0 &&
NumEnemiesInAnySector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ ) > 0 )
{
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Cannot build while enemies are in this sector" );
return;
}
}
// do checks here...
OBJECTTYPE* pObj = &(this->inv[HANDPOS]);