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
+7 -15
View File
@@ -1133,6 +1133,13 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
{
return( ITEM_HANDLE_REFUSAL );
}
// we can only do this on certain terraintypes
INT8 bOverTerrainType = GetTerrainType( sGridNo );
if( bOverTerrainType != FLAT_GROUND && bOverTerrainType != DIRT_ROAD && bOverTerrainType != LOW_GRASS )
{
return( ITEM_HANDLE_REFUSAL );
}
}
// if we have a shovel in our hands, the targetted gridno must be a fortification (debris will do for this check)
@@ -5982,8 +5989,6 @@ void SoldierStealItemFromSoldier( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent,
SetCustomizableTimerCallbackAndDelay( 1000, CheckForPickedOwnership, TRUE );
}
extern UINT8 NumEnemiesInAnySector( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ );
BOOLEAN BuildFortification( UINT32 flag )
{
INT32 sGridNo;
@@ -5997,19 +6002,6 @@ BOOLEAN BuildFortification( UINT32 flag )
if ( gusSelectedSoldier == NOBODY )
return FALSE;
// comment this in to forbid building while enemies are around
/*if( (gTacticalStatus.uiFlags & INCOMBAT) && (gTacticalStatus.uiFlags & TURNBASED) )
{
return FALSE;
}
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 FALSE;
}*/
if( gbWorldSectorZ > 0 || gsInterfaceLevel > 0)
{
return FALSE;