mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
New feature: food system requires mercs to eat and drink in order to survive
- food and water levels are lowered every hour, eat food to survive - not doing so leads to various penalties and ultimately death - added food items for that purpose. Food can degrade over time. Rotten food poisons. - Mercs automatically consume food if hungry/thirsty and food is in their inventories - for more info, see http://www.bears-pit.com/board/ubbthreads.php/topics/307396/Re_Mercs_need_food_and_water_t.html#Post307396 - this feature requires new STI files from the GameDir trunk. - added a bunch of filler variable to the soldier type, so hopefully savegame compatibility can be maintained easier in the future. WARNING: This will break savegame compatibility git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5411 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#define PTR_PRONE (gAnimControl[ pSoldier->usAnimState ].ubHeight == ANIM_PRONE)
|
||||
|
||||
#define DRUG_TYPE_MAX 32
|
||||
#define FOOD_TYPE_MAX 128
|
||||
|
||||
// TEMP VALUES FOR NAMES
|
||||
#define MAXCIVLASTNAMES 30
|
||||
@@ -1213,6 +1214,15 @@ public:
|
||||
|
||||
INT32 bSoldierFlagMask; // for various soldier-related flags (Illusion, Kill streak, etc.). Easier than adding 32 bool variables
|
||||
|
||||
// Flugente: food system
|
||||
INT32 bFoodLevel; // current level of food saturation
|
||||
INT32 bDrinkLevel; // current level of drink saturation
|
||||
|
||||
UINT8 usStarveDamageHealth; // damage to health due to starvation. Can be cured by surgery, but only if nutrition level is high enough again
|
||||
UINT8 usStarveDamageStrength; // damage to strength due to starvation. Can be cured by surgery, but only if nutrition level is high enough again
|
||||
|
||||
// Flugente: Decrease this filler by 1 for each new UINT8 / BOOLEAN variable, so we can maintain savegame compatibility!!
|
||||
UINT8 ubFiller[20];
|
||||
|
||||
#ifdef JA2UB
|
||||
//ja25
|
||||
@@ -1415,11 +1425,17 @@ public:
|
||||
// returns the poison percentage of the damage we will be doing with the weapon currently in our hand
|
||||
INT16 GetPoisonDamagePercentage( void );
|
||||
|
||||
// add poison
|
||||
void AddPoison( INT8 sPoisonAmount );
|
||||
|
||||
// reset the extra stat variables
|
||||
void ResetExtraStats();
|
||||
|
||||
// Flugente: inventory bombs can ignite while in mapscreen. Workaround: Damage items and health
|
||||
void InventoryExplosion( void );
|
||||
|
||||
// Flugente: Food decay in inventory
|
||||
void SoldierInventoryFoodDecay( void );
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
}; // SOLDIERTYPE;
|
||||
|
||||
Reference in New Issue
Block a user