mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Bugfixes / Improvements (macros) of Assignments (by Franimus)
- Fixed warning for INT8 overflow on scroll region priority, seemingly had no effect though - Use new assignment macros - Bugfix - POWs' activity level being overwritten - Feature - automatically bandage bleeding mercs on a PATIENT assignment - Bugfix - mercs treated at facilities should not use mercs' medkits - Added 3 new enums for facility doctor, patient, and repair - Bugfix for facility patients not detected as being in a facility - Bugfix - iBurstAPCost was ignoring half of its calculation due to extraneous semicolon git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7988 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2166,7 +2166,17 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
|
||||
numBytesRead = ReadFieldByField(hFile, &this->wornDesertCamo, sizeof(wornDesertCamo), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->snowCamo, sizeof(snowCamo), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->wornSnowCamo, sizeof(wornSnowCamo), sizeof(INT8), numBytesRead);
|
||||
// Preserve old savegames by detecting if the assignment is not saved as FACILITY_ but really should be
|
||||
numBytesRead = ReadFieldByField(hFile, &this->sFacilityTypeOperated, sizeof(sFacilityTypeOperated), sizeof(INT16), numBytesRead);
|
||||
if (this->sFacilityTypeOperated > 0)
|
||||
{
|
||||
if (this->bAssignment == DOCTOR)
|
||||
this->bAssignment = FACILITY_DOCTOR;
|
||||
else if (this->bAssignment == PATIENT)
|
||||
this->bAssignment = FACILITY_PATIENT;
|
||||
else if (this->bAssignment == REPAIR)
|
||||
this->bAssignment = FACILITY_REPAIR;
|
||||
}
|
||||
numBytesRead = ReadFieldByField(hFile, &this->bScopeMode, sizeof(bScopeMode), sizeof(INT8), numBytesRead);
|
||||
numBytesRead = ReadFieldByField(hFile, &this->bUnusedINT8_1, sizeof(bUnusedINT8_1), sizeof(INT8), numBytesRead );
|
||||
numBytesRead = ReadFieldByField(hFile, &this->bUnusedINT8_2, sizeof(bUnusedINT8_2), sizeof(INT8), numBytesRead );
|
||||
|
||||
Reference in New Issue
Block a user