mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
dirt system: added an option that controls wether a gun also gets cleaned on fully repairing it
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5904 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1569,6 +1569,7 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.fAdvRepairSystem = iniReader.ReadBoolean("Strategic Gameplay Settings","ADVANCED_REPAIR", FALSE);
|
gGameExternalOptions.fAdvRepairSystem = iniReader.ReadBoolean("Strategic Gameplay Settings","ADVANCED_REPAIR", FALSE);
|
||||||
gGameExternalOptions.fOnlyRepairGunsArmour = iniReader.ReadBoolean("Strategic Gameplay Settings","ONLY_REPAIR_GUNS_AND_ARMOUR", FALSE);
|
gGameExternalOptions.fOnlyRepairGunsArmour = iniReader.ReadBoolean("Strategic Gameplay Settings","ONLY_REPAIR_GUNS_AND_ARMOUR", FALSE);
|
||||||
gGameExternalOptions.fDirtSystem = iniReader.ReadBoolean("Strategic Gameplay Settings","DIRT_SYSTEM", FALSE);
|
gGameExternalOptions.fDirtSystem = iniReader.ReadBoolean("Strategic Gameplay Settings","DIRT_SYSTEM", FALSE);
|
||||||
|
gGameExternalOptions.fFullRepairCleansGun = iniReader.ReadBoolean("Strategic Gameplay Settings","FULL_REPAIR_CLEANS_GUN", FALSE);
|
||||||
gGameExternalOptions.usSectorDirtDivider = iniReader.ReadInteger("Strategic Gameplay Settings","SECTOR_DIRT_DIVIDER", 1000, 1, 100000);
|
gGameExternalOptions.usSectorDirtDivider = iniReader.ReadInteger("Strategic Gameplay Settings","SECTOR_DIRT_DIVIDER", 1000, 1, 100000);
|
||||||
|
|
||||||
// Flugente: prisoner system
|
// Flugente: prisoner system
|
||||||
|
|||||||
@@ -1182,6 +1182,7 @@ typedef struct
|
|||||||
BOOLEAN fAdvRepairSystem; // allow thresholds to repairing
|
BOOLEAN fAdvRepairSystem; // allow thresholds to repairing
|
||||||
BOOLEAN fOnlyRepairGunsArmour; // we can only repair guns and armour
|
BOOLEAN fOnlyRepairGunsArmour; // we can only repair guns and armour
|
||||||
BOOLEAN fDirtSystem; // allow dirt on items increase the chance for weapon jamming
|
BOOLEAN fDirtSystem; // allow dirt on items increase the chance for weapon jamming
|
||||||
|
BOOLEAN fFullRepairCleansGun; // repairing a gun up to its current repair threshold also cleans the gun
|
||||||
UINT32 usSectorDirtDivider; // divide a guns dirt factor by this to get dirt increase for every turn
|
UINT32 usSectorDirtDivider; // divide a guns dirt factor by this to get dirt increase for every turn
|
||||||
|
|
||||||
// Flugente: prisoner related settings
|
// Flugente: prisoner related settings
|
||||||
|
|||||||
@@ -3935,7 +3935,7 @@ BOOLEAN RepairObject( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOwner, OBJECTTYPE *
|
|||||||
if ( (*pObj)[ubLoop]->data.objectStatus == threshold )
|
if ( (*pObj)[ubLoop]->data.objectStatus == threshold )
|
||||||
{
|
{
|
||||||
// if item was fully repaired, consider it cleaned
|
// if item was fully repaired, consider it cleaned
|
||||||
if ( gGameExternalOptions.fDirtSystem )
|
if ( gGameExternalOptions.fDirtSystem && gGameExternalOptions.fFullRepairCleansGun )
|
||||||
(*pObj)[ubLoop]->data.bDirtLevel = 0.0f;
|
(*pObj)[ubLoop]->data.bDirtLevel = 0.0f;
|
||||||
}
|
}
|
||||||
// note: this system is bad if we can repair only 1% per hour (which is rather we are total losers)
|
// note: this system is bad if we can repair only 1% per hour (which is rather we are total losers)
|
||||||
|
|||||||
Reference in New Issue
Block a user