- 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:
Flugente
2012-09-20 19:36:31 +00:00
parent 446086c506
commit 9edcd360a5
3 changed files with 13 additions and 12 deletions
+12 -3
View File
@@ -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;
-8
View File
@@ -3,19 +3,11 @@
#include "soldier control.h"
#define FOOD_BAD_THRESHOLD 0.5f // must be > 0 !!!!!
#define FOOD_BAD_THRESHOLD_INVERSE 1.0f/FOOD_BAD_THRESHOLD
#define FOOD_MIN - 20000
#define FOOD_MAX 10000
#define DRINK_MIN - 20000
#define DRINK_MAX 10000
#define FOOD_MORALE_DRINK_TO_FOOD_RATIO 1.0f
#define FOOD_FACILITY_WATER_FACTOR 3.0f
#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)
typedef enum
{
FOOD_STUFFED,
+1 -1
View File
@@ -13017,7 +13017,7 @@ void TransformationMenuPopup_Arm( OBJECTTYPE* pObj )
if ( screen == GAME_SCREEN )
{
// ignite explosions manually - this item is not in the WorldBombs-structure, so we can't add it to the queue
IgniteExplosion( (*pObj)[0]->data.misc.ubBombOwner - 2, gpItemDescSoldier->sX, gpItemDescSoldier->sY, (INT16) (gpWorldLevelData[gpItemDescSoldier->sGridNo].sHeight), gpItemDescSoldier->sGridNo, pObj->usItem, gpItemDescSoldier->pathing.bLevel, gpItemDescSoldier->ubDirection );
IgniteExplosion( gpItemDescSoldier->ubID, gpItemDescSoldier->sX, gpItemDescSoldier->sY, (INT16) (gpWorldLevelData[gpItemDescSoldier->sGridNo].sHeight), gpItemDescSoldier->sGridNo, pObj->usItem, gpItemDescSoldier->pathing.bLevel, gpItemDescSoldier->ubDirection );
}
else
{