mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
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:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user