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:
+12
-13
@@ -732,7 +732,7 @@ INT8 DecideActionGreen(SOLDIERTYPE *pSoldier)
|
||||
{
|
||||
if (usRoom == BOXING_RING)
|
||||
{
|
||||
for ( ubLoop = 0; ubLoop < NUM_BOXERS; ubLoop++ )
|
||||
for ( ubLoop = 0; ubLoop < NUM_BOXERS; ++ubLoop )
|
||||
{
|
||||
if (pSoldier->ubID == gubBoxerID[ ubLoop ])
|
||||
{
|
||||
@@ -757,8 +757,7 @@ INT8 DecideActionGreen(SOLDIERTYPE *pSoldier)
|
||||
if (pTeamSoldier->flags.uiStatusFlags & SOLDIER_PCUNDERAICONTROL)
|
||||
pTeamSoldier->flags.uiStatusFlags &= (~SOLDIER_PCUNDERAICONTROL);
|
||||
|
||||
if (pTeamSoldier->flags.uiStatusFlags & SOLDIER_BOXER)
|
||||
pTeamSoldier->flags.uiStatusFlags &= (~SOLDIER_BOXER);
|
||||
pTeamSoldier->DeleteBoxingFlag( );
|
||||
}
|
||||
|
||||
if (pSoldier->bTeam == gbPlayerNum || CountPeopleInBoxingRing() == 0)
|
||||
@@ -885,7 +884,7 @@ INT8 DecideActionGreen(SOLDIERTYPE *pSoldier)
|
||||
}
|
||||
|
||||
//ddd{
|
||||
if( !(pSoldier->bSoldierFlagMask & SOLDIER_RAISED_REDALERT) && gGameExternalOptions.bNewTacticalAIBehavior && pSoldier->bTeam == ENEMY_TEAM )
|
||||
if( !(pSoldier->usSoldierFlagMask & SOLDIER_RAISED_REDALERT) && gGameExternalOptions.bNewTacticalAIBehavior && pSoldier->bTeam == ENEMY_TEAM )
|
||||
{
|
||||
if ( !(gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT) )
|
||||
{
|
||||
@@ -922,7 +921,7 @@ INT8 DecideActionGreen(SOLDIERTYPE *pSoldier)
|
||||
// Flugente: if we see one of our buddies in handcuffs, its a clear sign of enemy activity!
|
||||
if ( gGameExternalOptions.fAllowPrisonerSystem && pSoldier->bTeam == ENEMY_TEAM && !gTacticalStatus.Team[pSoldier->bTeam].bAwareOfOpposition )
|
||||
{
|
||||
UINT8 ubPerson = GetClosestFlaggedSoldierID( pSoldier, 20, ENEMY_TEAM, SOLDIER_POW );
|
||||
UINT8 ubPerson = GetClosestFlaggedSoldierID( pSoldier, 20, ENEMY_TEAM, SOLDIER_POW, TRUE );
|
||||
|
||||
if ( ubPerson != NOBODY )
|
||||
{
|
||||
@@ -1604,7 +1603,7 @@ INT8 DecideActionYellow(SOLDIERTYPE *pSoldier)
|
||||
// Flugente: if we see one of our buddies captured, it is a clear sign of enemy activity!
|
||||
if ( gGameExternalOptions.fAllowPrisonerSystem && pSoldier->bTeam == ENEMY_TEAM )
|
||||
{
|
||||
UINT8 ubPerson = GetClosestFlaggedSoldierID( pSoldier, 20, ENEMY_TEAM, SOLDIER_POW );
|
||||
UINT8 ubPerson = GetClosestFlaggedSoldierID( pSoldier, 20, ENEMY_TEAM, SOLDIER_POW, TRUE );
|
||||
|
||||
if ( ubPerson != NOBODY )
|
||||
{
|
||||
@@ -1637,7 +1636,7 @@ INT8 DecideActionYellow(SOLDIERTYPE *pSoldier)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( !(pSoldier->bSoldierFlagMask & SOLDIER_RAISED_REDALERT) && !gTacticalStatus.Team[pSoldier->bTeam].bAwareOfOpposition )
|
||||
else if ( !(pSoldier->usSoldierFlagMask & SOLDIER_RAISED_REDALERT) && !gTacticalStatus.Team[pSoldier->bTeam].bAwareOfOpposition )
|
||||
{
|
||||
// raise alarm!
|
||||
return( AI_ACTION_RED_ALERT );
|
||||
@@ -2778,7 +2777,7 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier, UINT8 ubUnconsciousOK)
|
||||
}
|
||||
}
|
||||
// frequencies are clear, lets call for help
|
||||
else if ( !(pSoldier->bSoldierFlagMask & SOLDIER_RAISED_REDALERT) )
|
||||
else if ( !(pSoldier->usSoldierFlagMask & SOLDIER_RAISED_REDALERT) )
|
||||
{
|
||||
// raise alarm!
|
||||
return( AI_ACTION_RED_ALERT );
|
||||
@@ -2964,7 +2963,7 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier, UINT8 ubUnconsciousOK)
|
||||
// Flugente: if we see one of our buddies captured, it is a clear sign of enemy activity!
|
||||
if ( gGameExternalOptions.fAllowPrisonerSystem && pSoldier->bTeam == ENEMY_TEAM )
|
||||
{
|
||||
UINT8 ubPerson = GetClosestFlaggedSoldierID( pSoldier, 20, ENEMY_TEAM, SOLDIER_POW );
|
||||
UINT8 ubPerson = GetClosestFlaggedSoldierID( pSoldier, 20, ENEMY_TEAM, SOLDIER_POW, TRUE );
|
||||
|
||||
if ( ubPerson != NOBODY )
|
||||
{
|
||||
@@ -3169,7 +3168,7 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier, UINT8 ubUnconsciousOK)
|
||||
|
||||
// if we're a computer merc, and we have the action points remaining to RADIO
|
||||
// (we never want NPCs to choose to radio if they would have to wait a turn)
|
||||
if ( !(pSoldier->bSoldierFlagMask & SOLDIER_RAISED_REDALERT) && !fCivilian && (pSoldier->bActionPoints >= APBPConstants[AP_RADIO]) && (gTacticalStatus.Team[pSoldier->bTeam].bMenInSector > 1) )
|
||||
if ( !(pSoldier->usSoldierFlagMask & SOLDIER_RAISED_REDALERT) && !fCivilian && (pSoldier->bActionPoints >= APBPConstants[AP_RADIO]) && (gTacticalStatus.Team[pSoldier->bTeam].bMenInSector > 1) )
|
||||
{
|
||||
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"decideactionred: checking to radio red alert");
|
||||
@@ -4665,7 +4664,7 @@ INT16 ubMinAPCost;
|
||||
}
|
||||
}
|
||||
// frequencies are clear, lets call for help
|
||||
else if ( !(pSoldier->bSoldierFlagMask & SOLDIER_RAISED_REDALERT) )
|
||||
else if ( !(pSoldier->usSoldierFlagMask & SOLDIER_RAISED_REDALERT) )
|
||||
{
|
||||
// raise alarm!
|
||||
return( AI_ACTION_RED_ALERT );
|
||||
@@ -6048,7 +6047,7 @@ L_NEWAIM:
|
||||
// (we never want NPCs to choose to radio if they would have to wait a turn)
|
||||
// and we're not swimming in deep water, and somebody has called for spotters
|
||||
// and we see the location of at least 2 opponents
|
||||
if ( !(pSoldier->bSoldierFlagMask & SOLDIER_RAISED_REDALERT) && (gTacticalStatus.ubSpottersCalledForBy != NOBODY) && (pSoldier->bActionPoints >= APBPConstants[AP_RADIO]) &&
|
||||
if ( !(pSoldier->usSoldierFlagMask & SOLDIER_RAISED_REDALERT) && (gTacticalStatus.ubSpottersCalledForBy != NOBODY) && (pSoldier->bActionPoints >= APBPConstants[AP_RADIO]) &&
|
||||
(pSoldier->aiData.bOppCnt > 1) && !fCivilian &&
|
||||
(gTacticalStatus.Team[pSoldier->bTeam].bMenInSector > 1) && !bInDeepWater)
|
||||
{
|
||||
@@ -6187,7 +6186,7 @@ L_NEWAIM:
|
||||
// RADIO RED ALERT: determine %chance to call others and report contact
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if ( !(pSoldier->bSoldierFlagMask & SOLDIER_RAISED_REDALERT) && pSoldier->bTeam == MILITIA_TEAM && (pSoldier->bActionPoints >= APBPConstants[AP_RADIO]) && (gTacticalStatus.Team[pSoldier->bTeam].bMenInSector > 1) )
|
||||
if ( !(pSoldier->usSoldierFlagMask & SOLDIER_RAISED_REDALERT) && pSoldier->bTeam == MILITIA_TEAM && (pSoldier->bActionPoints >= APBPConstants[AP_RADIO]) && (gTacticalStatus.Team[pSoldier->bTeam].bMenInSector > 1) )
|
||||
{
|
||||
|
||||
// if there hasn't been an initial RED ALERT yet in this sector
|
||||
|
||||
Reference in New Issue
Block a user