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:
silversurfer
2020-10-16 07:52:46 +00:00
parent 8c74a30b35
commit d867051cd6
2 changed files with 10 additions and 9 deletions
+2 -2
View File
@@ -55,8 +55,8 @@
#endif
CHAR8 czVersionNumber[16] = { "Build 20.08.01" }; //YY.MM.DD
CHAR8 czVersionNumber[16] = { "Build 20.10.16" }; //YY.MM.DD
CHAR16 zTrackingNumber[16] = { L"Z" };
CHAR16 zRevisionNumber[16] = { L"Revision 8875" };
CHAR16 zRevisionNumber[16] = { L"Revision 8900" };
// SAVE_GAME_VERSION is defined in header, change it there
+8 -7
View File
@@ -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 )