diff --git a/Multiplayer/connect.h b/Multiplayer/connect.h index ac31a953..d1d94f10 100644 --- a/Multiplayer/connect.h +++ b/Multiplayer/connect.h @@ -148,9 +148,13 @@ extern char cServerName[30]; //OJW - 20081224 #define MAX_CONNECT_RETRIES 5 +// WANNE: Completly disable interrupts in a multiplayer COOP game (see TeamTurns.cpp::StandardInterruptConditionsMet), because we still have problems in the code with AI interrupts calculated on the pure client +// This also disabled the "override turn" dialog, which would be displayed on the server by pressing ALT + E, because it should not be needed anymore +#define DISABLE_MP_INTERRUPTS_IN_COOP + // WANNE: After some MP-Tests: It seems there are still problems with enemy interupt and if this define is enabled the ALT + E (give turn to client) does not work either. So I disabled this define for now ... // WANNE: If this define is enabled, it hopefully fixes the "enemy AI got stuck on pure client interrupt". (this "fix" was added in revision 5623) -//#define INTERRUPT_MP_DEADLOCK_FIX +#define INTERRUPT_MP_DEADLOCK_FIX // WANNE: This features seems to work without any errors, so it is enabled :) #define ENABLE_MP_FRIENDLY_PLAYERS_SHARE_SAME_FOV diff --git a/Tactical/TeamTurns.cpp b/Tactical/TeamTurns.cpp index 39ddd3d6..db6a6033 100644 --- a/Tactical/TeamTurns.cpp +++ b/Tactical/TeamTurns.cpp @@ -1506,6 +1506,15 @@ BOOLEAN StandardInterruptConditionsMet( SOLDIERTYPE * pSoldier, UINT8 ubOpponent INT8 bDir; SOLDIERTYPE * pOpponent; +#ifdef DISABLE_MP_INTERRUPTS_IN_COOP + + if (is_networked == TRUE && cGameType == MP_TYPE_COOP) + { + return ( FALSE ); + } + +#endif + if ( (gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT) && !(gubSightFlags & SIGHT_INTERRUPT) ) { return( FALSE ); diff --git a/Tactical/Turn Based Input.cpp b/Tactical/Turn Based Input.cpp index 81be8a6f..a4f1c25d 100644 --- a/Tactical/Turn Based Input.cpp +++ b/Tactical/Turn Based Input.cpp @@ -1880,6 +1880,11 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) } */ +//#ifdef DISABLE_MP_INTERRUPTS_IN_COOP + + // WANNE: Not needed to show the override turn dialog +//#else + if ((InputEvent.usEvent == KEY_DOWN )&& ( InputEvent.usParam == 'e') ) { if( InputEvent.usKeyState & ALT_DOWN ) @@ -1891,6 +1896,8 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) } } +//#endif + if ((InputEvent.usEvent == KEY_DOWN )&& ( InputEvent.usParam == 'k') ) { if( InputEvent.usKeyState & ALT_DOWN )