mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +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:
@@ -2174,7 +2174,7 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
|
||||
{
|
||||
// Flugente: note that this enemy has been seen by mercs this turn
|
||||
if ( pOpponent->bTeam == ENEMY_TEAM && pSoldier->bTeam == OUR_TEAM )
|
||||
pOpponent->bSoldierFlagMask |= SOLDIER_ENEMY_OBSERVEDTHISTURN;
|
||||
pOpponent->usSoldierFlagMask |= SOLDIER_ENEMY_OBSERVEDTHISTURN;
|
||||
}
|
||||
|
||||
// if we're seeing a guy we didn't see on our last chance to look for him
|
||||
@@ -2329,10 +2329,10 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
|
||||
else if ( pSoldier->IsAssassin() && pSoldier->bTeam == CIV_TEAM )
|
||||
{
|
||||
// if we are an assassin and still neutral and undercover, approach target and then become hostile
|
||||
if ( pSoldier->aiData.bNeutral && pSoldier->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) )
|
||||
if ( pSoldier->aiData.bNeutral && pSoldier->usSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) )
|
||||
{
|
||||
// only if this guy isn't disguised himself!
|
||||
if ( (pOpponent->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER)) == 0)
|
||||
if ( (pOpponent->usSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER)) == 0)
|
||||
{
|
||||
if ( pSoldier->ubCivilianGroup != NON_CIV_GROUP && gTacticalStatus.fCivGroupHostile[ pSoldier->ubCivilianGroup ] >= CIV_GROUP_WILL_BECOME_HOSTILE )
|
||||
{
|
||||
@@ -2513,10 +2513,10 @@ void ManSeesMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, INT32 sOppGridNo,
|
||||
{
|
||||
// ... check wether he is not neutral against us (account for the fact that we might be covert!)
|
||||
// if we are an NPC assassin
|
||||
if ( pSoldier->bSoldierFlagMask & SOLDIER_ASSASSIN && pSoldier->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) )
|
||||
if ( pSoldier->usSoldierFlagMask & SOLDIER_ASSASSIN && pSoldier->usSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) )
|
||||
{
|
||||
// check wether our opponent would see us as an opponent if we weren't covert
|
||||
if ( !( (pSoldier->aiData.bNeutral || pSoldier->bSoldierFlagMask & SOLDIER_POW) && ( pOpponent->bTeam != CREATURE_TEAM || pOpponent->flags.uiStatusFlags & SOLDIER_VEHICLE ) ) )
|
||||
if ( !( (pSoldier->aiData.bNeutral || pSoldier->usSoldierFlagMask & SOLDIER_POW) && ( pOpponent->bTeam != CREATURE_TEAM || pOpponent->flags.uiStatusFlags & SOLDIER_VEHICLE ) ) )
|
||||
fAddAsOpponent = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -3044,7 +3044,7 @@ IAN COMMENTED THIS OUT MAY 1997 - DO WE NEED THIS?
|
||||
{
|
||||
// Flugente: we consider enemies to be neutral if they are prisoners of war (otherwise the AI would kill prisoners). Bu as we want to remove them, we have to account for that
|
||||
// we also move RecognizeAsCombatant to be the last condition checked, because it is the most computationally expensive one
|
||||
if ( ( !CONSIDERED_NEUTRAL( pOpponent, pSoldier ) || pSoldier->bSoldierFlagMask & SOLDIER_POW ) && pOpponent->RecognizeAsCombatant(pSoldier->ubID) )
|
||||
if ( ( !CONSIDERED_NEUTRAL( pOpponent, pSoldier ) || pSoldier->usSoldierFlagMask & SOLDIER_POW ) && pOpponent->RecognizeAsCombatant(pSoldier->ubID) )
|
||||
RemoveOneOpponent(pOpponent);
|
||||
}
|
||||
UpdatePersonal(pOpponent,ubTarget,NOT_HEARD_OR_SEEN,NOWHERE,0);
|
||||
@@ -3539,7 +3539,7 @@ void SaySeenQuote( SOLDIERTYPE *pSoldier, BOOLEAN fSeenCreature, BOOLEAN fVirgin
|
||||
else
|
||||
{
|
||||
// Flugente: no quotes on seeing enemy when covert
|
||||
if ( (pSoldier->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) ) == 0 )
|
||||
if ( (pSoldier->usSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) ) == 0 )
|
||||
{
|
||||
#ifdef ENGLISH
|
||||
if ( Random( 100 ) < 30 )
|
||||
@@ -3585,7 +3585,7 @@ void OurTeamSeesSomeone( SOLDIERTYPE * pSoldier, INT8 bNumReRevealed, INT8 bNumN
|
||||
if ( pSoldier->bTeam == gbPlayerNum )
|
||||
{
|
||||
// Flugente: disguised mercs do not alert us if they see an enemy, as otherwise one has to continously give them new orders
|
||||
if ( !(pSoldier->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER)) )
|
||||
if ( !(pSoldier->usSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER)) )
|
||||
{
|
||||
// STOP IF WE WERE MOVING....
|
||||
/// Speek up!
|
||||
|
||||
Reference in New Issue
Block a user