mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
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:
@@ -1264,7 +1264,7 @@ BOOLEAN TacticalCopySoldierFromProfile( SOLDIERTYPE *pSoldier, SOLDIERCREATE_STR
|
||||
// Flugente: if playing with the covert trait, the assassins come covert, so they are tougher to find
|
||||
if ( gGameExternalOptions.fAssassinsAreDisguised && gGameOptions.fNewTraitSystem && pSoldier->IsAssassin() )
|
||||
{
|
||||
pSoldier->bSoldierFlagMask |= (SOLDIER_COVERT_SOLDIER|SOLDIER_COVERT_NPC_SPECIAL|SOLDIER_NEW_VEST|SOLDIER_NEW_PANTS);
|
||||
pSoldier->usSoldierFlagMask |= (SOLDIER_COVERT_SOLDIER|SOLDIER_COVERT_NPC_SPECIAL|SOLDIER_NEW_VEST|SOLDIER_NEW_PANTS);
|
||||
|
||||
UINT8 rnd = Random(11);
|
||||
|
||||
@@ -1718,7 +1718,7 @@ BOOLEAN TacticalCopySoldierFromCreateStruct( SOLDIERTYPE *pSoldier, SOLDIERCREAT
|
||||
|
||||
// this guy becomes an officer if there are enough soldiers around, and we aren't already at max of officers
|
||||
if ( numenemies > gGameExternalOptions.usEnemyOfficersPerTeamSize * numofficers && numofficers < gGameExternalOptions.usEnemyOfficersMax )
|
||||
pSoldier->bSoldierFlagMask |= SOLDIER_ENEMY_OFFICER;
|
||||
pSoldier->usSoldierFlagMask |= SOLDIER_ENEMY_OFFICER;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3047,7 +3047,7 @@ SOLDIERTYPE* ReserveTacticalMilitiaSoldierForAutoresolve( UINT8 ubSoldierClass )
|
||||
return NULL;
|
||||
|
||||
// the militia in autoresolve will drop their gear after combat. For this reason, there is no need for MercPtrs[i] to also drop it
|
||||
MercPtrs[i]->bSoldierFlagMask |= SOLDIER_EQUIPMENT_DROPPED;
|
||||
MercPtrs[i]->usSoldierFlagMask |= SOLDIER_EQUIPMENT_DROPPED;
|
||||
|
||||
//Assign a bogus ID, then return it
|
||||
pSoldier->ubID = NUM_PROFILES;
|
||||
@@ -3162,7 +3162,7 @@ SOLDIERTYPE* TacticalCreateEnemyAssassin(UINT8 disguisetype)
|
||||
pSoldier->stats.bAgility = (INT8)( 70 + Random( 16 ) );
|
||||
|
||||
// add assassin flag
|
||||
pSoldier->bSoldierFlagMask |= (SOLDIER_COVERT_SOLDIER|SOLDIER_ASSASSIN);
|
||||
pSoldier->usSoldierFlagMask |= (SOLDIER_COVERT_SOLDIER|SOLDIER_ASSASSIN);
|
||||
|
||||
// add spy trait lvl2
|
||||
pSoldier->stats.ubSkillTraits[0] = COVERT_NT;
|
||||
@@ -3247,8 +3247,8 @@ void CreateAssassin(UINT8 disguisetype)
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
|
||||
// add correct flags. Undo SOLDIER_COVERT_CIV flag, we disguise as militia, not as a civilian (player cannot disguise as militia, thus he becomes a civilian)
|
||||
pSoldier->bSoldierFlagMask &= ~SOLDIER_COVERT_CIV;
|
||||
pSoldier->bSoldierFlagMask |= (SOLDIER_COVERT_SOLDIER|SOLDIER_ASSASSIN);
|
||||
pSoldier->usSoldierFlagMask &= ~SOLDIER_COVERT_CIV;
|
||||
pSoldier->usSoldierFlagMask |= (SOLDIER_COVERT_SOLDIER|SOLDIER_ASSASSIN);
|
||||
|
||||
// So we can see them!
|
||||
AllTeamsLookForAll(NO_INTERRUPTS);
|
||||
@@ -3358,7 +3358,7 @@ void CreatePrisonerOfWar()
|
||||
AddSoldierToSector( pSoldier->ubID );
|
||||
|
||||
// mark this guy
|
||||
pSoldier->bSoldierFlagMask |= SOLDIER_POW_PRISON;
|
||||
pSoldier->usSoldierFlagMask |= SOLDIER_POW_PRISON;
|
||||
|
||||
// set correct civ group
|
||||
pSoldier->ubCivilianGroup = POW_PRISON_CIV_GROUP;
|
||||
@@ -5260,9 +5260,10 @@ BOOLEAN AssignTraitsToSoldier( SOLDIERTYPE *pSoldier, SOLDIERCREATE_STRUCT *pCre
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// RETURN TRUE IF ALL TRAITS ASSIGNED OTHERWISE FALSE
|
||||
if (( !gGameOptions.fNewTraitSystem && ATraitAssigned && BTraitAssigned ) || ( gGameOptions.fNewTraitSystem && ATraitAssigned && BTraitAssigned && CTraitAssigned ) )
|
||||
return( TRUE );
|
||||
else
|
||||
return( FALSE );
|
||||
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user