mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Merged Multiplayer UI patch from Zathras:
New Features - Added hits, misses, accuracy to scoreboard - Added in-game chat with history - Added more options from the ini to the host screen, Use NIV and Enable civillians bugfixes - Clients connecting at the same time controlling the wrong client - Team Deathmatch working again - Refreshing the player list after a player changes team / edge - AI is always on for Co-op now - There is now always a scoreboard in Co-op even when you lose. - scores on the Co-op scoreboard have been fixed for all deaths including bleeding - Start Game button now only appears for server - Fixed cleaning up game resources on disconnection - Disabled the 1,2,3,4 keys for connecting / disconnecting - Fixed victory conditions for all game modes - Fixed players names getting copied into TeamTurnString each game resulting in multiple names - Fixed Assertion bug caused by the game sometimes calling SetCurrentWorldSector more than once before placement of mercs - Fixed a bug that was possible when merging items such as M14 and EBR stock on mapscreen. - Fixed bug with game starting while a player was in chat, closes chat window when game is starting - Fixed bug with game starting while a player was in the options screen, if the player leaves the mapscreen while ready, they are set to unready - Team and Spawn direction popups changed to use buttons to open/close them - Disabled players joining after the laptop has been unlocked, as they would be out of state with any hires git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2628 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include "GameSettings.h"
|
||||
#include "_Ja25EnglishText.h"
|
||||
#include "SaveLoadScreen.h"
|
||||
#include "game init.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
@@ -1649,7 +1650,7 @@ BOOLEAN AnyUsableRealMercenariesOnTeam( void )
|
||||
|
||||
void RequestTriggerExitFromMapscreen( INT8 bExitToWhere )
|
||||
{
|
||||
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_SAVE ) );
|
||||
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_MAINMENU ) );
|
||||
|
||||
// if allowed to do so
|
||||
if ( AllowedToExitFromMapscreenTo( bExitToWhere ) )
|
||||
@@ -1665,6 +1666,18 @@ void RequestTriggerExitFromMapscreen( INT8 bExitToWhere )
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (!(bExitToWhere == MAP_EXIT_TO_TACTICAL || bExitToWhere == MAP_EXIT_TO_MAINMENU))
|
||||
{
|
||||
// OJW - 20090301
|
||||
if (is_networked && is_client)
|
||||
{
|
||||
if (client_ready[CLIENT_NUM-1]==1 && is_game_started == false)
|
||||
{
|
||||
// un-ready if we are not on map screen
|
||||
start_battle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// permit it, and get the ball rolling
|
||||
gbExitingMapScreenToWhere = bExitToWhere;
|
||||
@@ -1680,7 +1693,7 @@ void RequestTriggerExitFromMapscreen( INT8 bExitToWhere )
|
||||
|
||||
BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere )
|
||||
{
|
||||
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_SAVE ) );
|
||||
Assert( ( bExitToWhere >= MAP_EXIT_TO_LAPTOP ) && ( bExitToWhere <= MAP_EXIT_TO_MAINMENU ) );
|
||||
|
||||
// if already leaving, disallow any other attempts to exit
|
||||
if ( fLeavingMapScreen )
|
||||
@@ -1688,6 +1701,13 @@ BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// OJW - 20090210 - clean resources on disconnect
|
||||
if (bExitToWhere == MAP_EXIT_TO_MAINMENU)
|
||||
{
|
||||
// always allow this
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
// WANNE: At least one merc must be hired so we can go to tactical.
|
||||
// This was an exploit. If you go to tactical in Omerta and have not hired any merc
|
||||
// then go back to laptop and hire a merc. After the merc arrives the heli landing was not
|
||||
@@ -1839,7 +1859,12 @@ void HandleExitsFromMapScreen( void )
|
||||
guiPreviousOptionScreen = guiCurrentScreen;
|
||||
SetPendingNewScreen( SAVE_LOAD_SCREEN );
|
||||
break;
|
||||
|
||||
// OJW - 20090210 - clean resources on disconnect
|
||||
case MAP_EXIT_TO_MAINMENU:
|
||||
// Re-initialise the game
|
||||
ReStartingGame();
|
||||
SetPendingNewScreen( MAINMENU_SCREEN );
|
||||
break;
|
||||
default:
|
||||
// invalid exit type
|
||||
Assert( FALSE );
|
||||
|
||||
Reference in New Issue
Block a user