mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- Fix: security check for underflows when adding reinforcements
- Fix: added defined heights for kid's heads and torsos to correctly apply headshots - Fix: While filling canteens, poisoned water from sectors is only consumed if no water drum is found git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5684 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+9
-6
@@ -759,7 +759,14 @@ void SectorFillCanteens( void )
|
||||
// If not, see if there is a water drum, and fill up the canteens from that one
|
||||
UINT8 waterquality = GetWaterQuality(gWorldSectorX, gWorldSectorY, gbWorldSectorZ);
|
||||
|
||||
if ( waterquality == WATER_DRINKABLE || waterquality == WATER_POISONOUS )
|
||||
// search for a water drum
|
||||
BOOLEAN waterdrumfound = FALSE;
|
||||
OBJECTTYPE* pWaterDrum = GetUsableWaterDrumInSector();
|
||||
if ( !pWaterDrum || !(pWaterDrum->exists()) )
|
||||
waterdrumfound = TRUE;
|
||||
|
||||
// drink from sector if water is ok, or it is poisonous but we haven't found a useable water drum
|
||||
if ( waterquality == WATER_DRINKABLE || (waterquality == WATER_POISONOUS && !waterdrumfound) )
|
||||
{
|
||||
// the temperature of the water in this sector (temperature reflects the quality)
|
||||
FLOAT addtemperature = OVERHEATING_MAX_TEMPERATURE;
|
||||
@@ -837,12 +844,8 @@ void SectorFillCanteens( void )
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else if ( waterdrumfound )
|
||||
{
|
||||
OBJECTTYPE* pWaterDrum = GetUsableWaterDrumInSector();
|
||||
if ( !pWaterDrum || !(pWaterDrum->exists()) )
|
||||
return;
|
||||
|
||||
INT32 drumsize = Food[Item[pWaterDrum->usItem].foodtype].bDrinkPoints;
|
||||
|
||||
// first step: fill all canteens in inventories
|
||||
|
||||
Reference in New Issue
Block a user