mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
New parameter in DifficultySettings.xml:
LootStatusModifier defines how much his dropped equipment can get damaged when an opponent dies. This externalizes the hardcoded values that depended on difficulty level. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8056 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1017,7 +1017,9 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
|
||||
|
||||
if ( Item[pObj->usItem].damageable && Item[pObj->usItem].usItemClass != IC_THROWING_KNIFE ) // Madd: drop crappier items from enemies on higher difficulty levels - note the quick fix for throwing knives
|
||||
{
|
||||
(*pObj)[0]->data.objectStatus -= (gGameOptions.ubDifficultyLevel - 1) * Random(20);
|
||||
// silversurfer: externalized this
|
||||
//(*pObj)[0]->data.objectStatus -= (gGameOptions.ubDifficultyLevel - 1) * Random(20);
|
||||
(*pObj)[0]->data.objectStatus -= Random( zDiffSetting[gGameOptions.ubDifficultyLevel].usLootStatusModifier );
|
||||
(*pObj)[0]->data.objectStatus = min(max((*pObj)[0]->data.objectStatus,1),100); // never below 1% or above 100%
|
||||
|
||||
(*pObj)[0]->data.sRepairThreshold = max(1, min(100, ((*pObj)[0]->data.objectStatus + 200)/3 ));
|
||||
|
||||
Reference in New Issue
Block a user