mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fix: If 'forced turn mode' is active, sometimes enemy groups already present in an enemy-occupied sector are interpreted as pending reinforcements, causing them to spawn at the sector edges instead of inside the sector.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8544 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1661,7 +1661,11 @@ void AddSoldierToSectorGridNo( SOLDIERTYPE *pSoldier, INT32 sGridNo, UINT8 ubDir
|
||||
if ( gGameSettings.fOptions[ TOPTION_TOGGLE_TURN_MODE ])
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_FTM_ENTER_COMBAT ] );
|
||||
if( Random( 100 ) >= Random( 100 ) ) // give a chance for either to go first
|
||||
|
||||
// Flugente 2018-03-11: this part is problematic. If the enemy enters combat first, it is possible for enemie groups that are already present to be counted as pending
|
||||
// reinfocements, causing them to spawn at the edges of a sector instead.
|
||||
// I am thus changing this so that the player team always gets the first turn if combat has not yet been started
|
||||
if ( !(gTacticalStatus.uiFlags & INCOMBAT) || Random( 100 ) >= Random( 100 ) )
|
||||
EnterCombatMode( OUR_TEAM );
|
||||
else
|
||||
EnterCombatMode( ENEMY_TEAM );
|
||||
|
||||
Reference in New Issue
Block a user