mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
- Fix: fully repairing a gun did not always clean it
- Fix: need to sleep modifiers from food were applied wrong - Fix: under certain circumstances, player mercs won an AI interrupt, leading a deadlock or - potentially - AI-controlled player mercs git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5686 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -3809,16 +3809,19 @@ BOOLEAN RepairObject( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOwner, OBJECTTYPE *
|
||||
if ( (*pObj)[ubLoop]->data.objectStatus == threshold && (((*pObj)[ubLoop]->data.objectStatus - ubBeforeRepair) > 4 ))
|
||||
{
|
||||
gMercProfiles[ pSoldier->ubProfile ].records.usItemsRepaired++;
|
||||
|
||||
// if item was fully repaired, consider it cleaned
|
||||
if ( gGameExternalOptions.fDirtSystem )
|
||||
(*pObj)[ubLoop]->data.bDirtLevel = 0.0f;
|
||||
}
|
||||
// if the item was now repaired to a status of 96-99 and the repair was at least 2%, add a point, consider the item repaired (no points will be awarded for it anyway)
|
||||
else if ( (*pObj)[ubLoop]->data.objectStatus > threshold - 5 && (*pObj)[ubLoop]->data.objectStatus < threshold && ((*pObj)[ubLoop]->data.objectStatus - ubBeforeRepair) > 1)
|
||||
{
|
||||
gMercProfiles[ pSoldier->ubProfile ].records.usItemsRepaired++;
|
||||
}
|
||||
|
||||
if ( (*pObj)[ubLoop]->data.objectStatus == threshold )
|
||||
{
|
||||
// if item was fully repaired, consider it cleaned
|
||||
if ( gGameExternalOptions.fDirtSystem )
|
||||
(*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)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user