mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- water from swamp sectors is now less poisonous. Also lowered the amount of poison bad food gives.
- fix: igniting explosives in inventory now correctly triggers faction hostilities. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5579 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+12
-3
@@ -37,6 +37,15 @@ extern BOOLEAN IsVehicle(SOLDIERTYPE *pSoldier);
|
||||
|
||||
extern SECTOR_EXT_DATA SectorExternalData[256][4];
|
||||
|
||||
#define FOOD_BAD_THRESHOLD 0.5f // must be > 0 !!!!!
|
||||
#define FOOD_BAD_THRESHOLD_INVERSE 1.0f/FOOD_BAD_THRESHOLD
|
||||
|
||||
#define FOOD_MORALE_DRINK_TO_FOOD_RATIO 1.0f
|
||||
#define FOOD_FACILITY_WATER_FACTOR 3.0f // in a facility that serves food, only the food value is specified in the xml. drink value is food value multiplied by this
|
||||
|
||||
#define FOOD_POW_MULTIPLICATOR 1.2f // multiplicator to the water we get when POWs (so many times our water digestion rate, so we will barely survive)
|
||||
#define FOOD_WATER_POISONOUS_TEMPERATURE 20000.0f // termperature value of water taken out of swamps etc.
|
||||
|
||||
// these midifiers are applied separately for both food and water
|
||||
// apart from the ubStatDamageChance values, be careful not to set any modifiers below -50 or above 0 unless you know what you are doing!!!
|
||||
FoodMoraleMod FoodMoraleMods[NUM_FOOD_MORALE_TYPES] =
|
||||
@@ -130,8 +139,8 @@ BOOLEAN ApplyFood( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObject, BOOLEAN fForce, B
|
||||
INT32 maxpts = max(Food[foodtype].bFoodPoints, Food[foodtype].bDrinkPoints);
|
||||
|
||||
// divide by 100 (poison sum is in [0, 99]
|
||||
// multiply with FOOD_BAD_THRESHOLD for more reasonable values
|
||||
INT8 poisonadd = (INT8)(0.01 * maxpts * (1.0 - foodcondition) * FOOD_BAD_THRESHOLD );
|
||||
// multiply with 0.25 for more reasonable values
|
||||
INT8 poisonadd = (INT8)(0.01 * 0.25 * maxpts * (1.0 - foodcondition) );
|
||||
|
||||
pSoldier->AddPoison(poisonadd);
|
||||
}
|
||||
@@ -754,7 +763,7 @@ void SectorFillCanteens( void )
|
||||
|
||||
// if the water in this sector is poisoned, we add a different temperature - resulting in worsening of the item's decay status
|
||||
if ( waterquality == WATER_POISONOUS )
|
||||
addtemperature = 0.0f;
|
||||
addtemperature = FOOD_WATER_POISONOUS_TEMPERATURE;
|
||||
|
||||
// first step: fill all canteens in inventories
|
||||
INT8 bMercID, bLastTeamID;
|
||||
|
||||
Reference in New Issue
Block a user