Merged revision(s) 7166-7177 from branches/ja2_source_official_2014:

- Flagmasks are unsigned, and should be called and treated as such
- Fix: experience gain from interrogation was too high
- Fix: chance of a prisoner becoming militia was calculated wrong
- default weight maximum for MOVE ITEM assignment increased from 30 to 40 kg
- Fix: snitches report the same event multiple times
- Fix: snitches treat vehicles as persons
- Fix: selection of launchables is inefficient, an does not take into account wether items are depending on day/night cycle
- new key combination: in strategic, pressing [CTRL] + [E] wile both a merc's inventory and the sector inventory are open will fill the merc's inventory with sector items
- trivial code cleanup
- if prisoners are taken in a sector that houses a prison, that prison can also be selected to house them
- Fix: distributing newly taken prisoners in a prison sector no longer redistributes all prisoners, only the new ones
- GetClosestFlaggedSoldierID can also be called without evaluation of sight
- Fix: Covert Ops: throwing/lobbing items or shooting rockets is deemed suspicious behaviour
- Fix: boxing was broken by loading a savegame
- Fix: campaign history rarely recorded kills in autoresolve
- There is no reason why the IDs that boxers are reset to before they are reinitialised would ever need to be altered by a modder. Required script change in stable GameDir r2024.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7178 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-04-30 21:36:18 +00:00
parent 8b494003fd
commit 30060f0595
46 changed files with 759 additions and 711 deletions
+9 -9
View File
@@ -2083,7 +2083,7 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
numBytesRead = ReadFieldByField(hFile, &this->bExtraAgility, sizeof(bExtraAgility), sizeof(INT16), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->bExtraWisdom, sizeof(bExtraWisdom), sizeof(INT16), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->bExtraExpLevel, sizeof(bExtraExpLevel), sizeof(INT8), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->bSoldierFlagMask, sizeof(bSoldierFlagMask), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->usSoldierFlagMask, sizeof(usSoldierFlagMask), sizeof(UINT32), numBytesRead);
if ( guiCurrentSaveGameVersion >= FOOD_CHANGES )
{
@@ -2227,13 +2227,13 @@ BOOLEAN SOLDIERTYPE::Load(HWFILE hFile)
if ( guiCurrentSaveGameVersion >= SNITCH_TRAIT_EXTENDED )
{
numBytesRead = ReadFieldByField(hFile, &this->bSoldierFlagMask2, sizeof(bSoldierFlagMask2), sizeof(INT32), numBytesRead);
numBytesRead = ReadFieldByField(hFile, &this->usSoldierFlagMask2, sizeof(usSoldierFlagMask2), sizeof(UINT32), numBytesRead);
}
else
{
this->bSoldierFlagMask2 = 0;
this->usSoldierFlagMask2 = 0;
for(int i = 0; i < sizeof(bSoldierFlagMask2); ++i)
for(int i = 0; i < sizeof(usSoldierFlagMask2); ++i)
buffer++;
}
@@ -6277,8 +6277,9 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
//now change the savegame format so that temp files are saved and loaded correctly
guiCurrentSaveGameVersion = SAVE_GAME_VERSION;
// Flugente: should not be needed anymore
// WANNE: This should fix the bug if any merc are still under PC control. This could happen after boxing in SAN MONA.
SOLDIERTYPE *pTeamSoldier;
/*SOLDIERTYPE *pTeamSoldier;
for (INT8 bLoop=gTacticalStatus.Team[gbPlayerNum].bFirstID; bLoop <= gTacticalStatus.Team[gbPlayerNum].bLastID; bLoop++)
{
pTeamSoldier=MercPtrs[bLoop];
@@ -6286,9 +6287,8 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
if (pTeamSoldier->flags.uiStatusFlags & SOLDIER_PCUNDERAICONTROL)
pTeamSoldier->flags.uiStatusFlags &= (~SOLDIER_PCUNDERAICONTROL);
if (pTeamSoldier->flags.uiStatusFlags & SOLDIER_BOXER)
pTeamSoldier->flags.uiStatusFlags &= (~SOLDIER_BOXER);
}
pTeamSoldier->DeleteBoxingFlag();
}*/
return( TRUE );
}
@@ -8637,7 +8637,7 @@ BOOLEAN LoadGeneralInfo( HWFILE hFile )
fDisableMapInterfaceDueToBattle = sGeneralInfo.fDisableMapInterfaceDueToBattle;
memcpy( &gsBoxerGridNo, &sGeneralInfo.sBoxerGridNo, NUM_BOXERS * sizeof( INT32 ) );
memcpy( &gubBoxerID, &sGeneralInfo.ubBoxerID, NUM_BOXERS * sizeof( INT8 ) );
memcpy( &gubBoxerID, &sGeneralInfo.ubBoxerID, NUM_BOXERS * sizeof( UINT8 ) );
memcpy( &gfBoxerFought, &sGeneralInfo.fBoxerFought, NUM_BOXERS * sizeof( BOOLEAN ) );
//Load the helicopter status