mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New feature: advanced repair/dirt system
- items now have an internal repair value that can be lowered through damage taken. They can only be repaired up to that value by your mercs, onyl smiths can fully restore it to 100% - guns get dirty over time, especially when shooting. Thsi can cause them to jam. Use cleaning kits (item #1576) to clean them by pressing 'Alt' + '.' - more on this feature in http://www.bears-pit.com/board/ubbthreads.php/topics/308926/New_feature_advanced_repair_di.html#Post308926 - this requires GameDir revision 1496 or higher WARING! THIS BREAKS SAVEGAME COMPATIBIITY! git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5480 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+10
-2
@@ -2690,6 +2690,9 @@ BOOLEAN BulletHitMerc( BULLET * pBullet, STRUCTURE * pStructure, BOOLEAN fIntend
|
||||
// just break it...
|
||||
pTarget->inv[ bHeadSlot ][0]->data.objectStatus = 1;
|
||||
}
|
||||
|
||||
// Flugente: also lower the repair threshold
|
||||
pTarget->inv[ bHeadSlot ][0]->data.sRepairThreshold = max(pTarget->inv[ bHeadSlot ][0]->data.objectStatus, pTarget->inv[ bHeadSlot ][0]->data.sRepairThreshold - iImpact / 6);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5761,10 +5764,10 @@ INT8 FireBulletGivenTargetTrapOnly( SOLDIERTYPE* pThrower, OBJECTTYPE* pObj, INT
|
||||
|
||||
if ( overheatjampercentage > 1.0 )
|
||||
iOverheatReliabilityMalus = (INT16)floor(overheatjampercentage*overheatjampercentage);
|
||||
|
||||
GunIncreaseHeat( pObj );
|
||||
}
|
||||
|
||||
GunIncreaseHeat( pObj );
|
||||
|
||||
// Flugente : Added a malus to reliability for overheated guns
|
||||
// HEADROCK HAM 5: Variable NCTH base change
|
||||
UINT32 uiDepreciateTest = 0;
|
||||
@@ -5782,6 +5785,11 @@ INT8 FireBulletGivenTargetTrapOnly( SOLDIERTYPE* pThrower, OBJECTTYPE* pObj, INT
|
||||
if ( !PreRandom( uiDepreciateTest ) && ( (*pObj)[0]->data.objectStatus > 1) )
|
||||
{
|
||||
(*pObj)[0]->data.objectStatus--;
|
||||
|
||||
if ( Random(100) < Item[pObj->usItem].usDamageChance )
|
||||
{
|
||||
(*pObj)[0]->data.sRepairThreshold--;
|
||||
}
|
||||
}
|
||||
///////////////////////// OVERHEATING AND STATUS REDUCTION ////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user