mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
fix: when multiple mercs are repairing, it could happen that one of them didn't spend any points, causing an error message about insufficient skill
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8900 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -5646,18 +5646,19 @@ void HandleRepairBySoldier( SOLDIERTYPE *pSoldier )
|
||||
bRepairing = TRUE;
|
||||
}
|
||||
|
||||
// if nothing got repaired or cleaned, there's a problem
|
||||
if ( ubRepairPtsUsed == 0 && ubCleaningPtsUsed == 0 )
|
||||
{
|
||||
// he can't repair anything because he doesn't have enough skill!
|
||||
AssignmentAborted( pSoldier, INSUF_REPAIR_SKILL );
|
||||
}
|
||||
// nothing more to do?
|
||||
else if ( !bCleaning && !bRepairing )
|
||||
if ( !bCleaning && !bRepairing )
|
||||
{
|
||||
AssignmentDone( pSoldier, TRUE, TRUE );
|
||||
StopTimeCompression();
|
||||
}
|
||||
// if nothing got repaired or cleaned, there's a problem
|
||||
else if (ubRepairPtsUsed == 0 && ubCleaningPtsUsed == 0)
|
||||
{
|
||||
// he can't repair anything because he doesn't have enough skill!
|
||||
AssignmentAborted(pSoldier, INSUF_REPAIR_SKILL);
|
||||
StopTimeCompression();
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN IsItemRepairable(SOLDIERTYPE* pSoldier, UINT16 usItem, INT16 bStatus, INT16 bThreshold )
|
||||
|
||||
Reference in New Issue
Block a user