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:
Wanne
2009-03-19 15:31:55 +00:00
parent d28c42b353
commit 8fa1c2a4e6
55 changed files with 8514 additions and 362 deletions
+39 -13
View File
@@ -6218,21 +6218,29 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
return( FALSE );
}
// We can only check for end of battle if in combat mode or there are enemies
// present (they might bleed to death or run off the map!)
if ( ! ( gTacticalStatus.uiFlags & INCOMBAT ) )
// OJW - 090212 - Fix end conditions for multiplayer - TeamDM
if(is_server)
{
if ( ! (gTacticalStatus.fEnemyInSector) )
// check the server's conditions for continueing the game, if the server wants to continue the game it returns true
// hence we return false that the battle has ended. If not, when this function returns below we will force the game to end.
if ( check_status() )
return(FALSE);
// the block of code below would always cause this function to exit before checking the servers desires
// in cases of team deathmatch where there were no more enemies
}
else
{
// We can only check for end of battle if in combat mode or there are enemies
// present (they might bleed to death or run off the map!)
if ( ! ( gTacticalStatus.uiFlags & INCOMBAT ) )
{
return( FALSE );
if ( ! (gTacticalStatus.fEnemyInSector) )
{
return( FALSE );
}
}
}
if(is_server && check_status())
{
return(FALSE);
}
// ATE: If attack busy count.. get out...
if ( (gTacticalStatus.ubAttackBusyCount > 0 ) )
{
@@ -6329,6 +6337,10 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
//Whenever returning TRUE, make sure you clear gfBlitBattleSectorLocator;
LogBattleResults( LOG_DEFEAT );
gfBlitBattleSectorLocator = FALSE;
// If we are the server, we escape this function at the top if we think the game should still be running
// hence if we get here the game is over for all clients and we should report it
if (is_networked && is_server)
game_over();
return( TRUE );
}
@@ -6438,11 +6450,15 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
{
SetMusicMode( MUSIC_TACTICAL_VICTORY );
ShouldBeginAutoBandage( );
// OJW - 20081222 - dont auto-bandage if networked
if (!is_networked)
ShouldBeginAutoBandage( );
}
else if ( gfLastMercTalkedAboutKillingID != NOBODY && ( MercPtrs[ gfLastMercTalkedAboutKillingID ]->flags.uiStatusFlags & SOLDIER_MONSTER ) )
{
ShouldBeginAutoBandage( );
// OJW - 20081222 - dont auto-bandage if networked
if (!is_networked)
ShouldBeginAutoBandage( );
}
// Say battle end quote....
@@ -6474,7 +6490,9 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
{
// Change to nothing music...
SetMusicMode( MUSIC_TACTICAL_NOTHING );
ShouldBeginAutoBandage();
// OJW - 20081222 - dont auto bandage if networked
if (!is_networked)
ShouldBeginAutoBandage();
}
HandleMilitiaStatusInCurrentMapBeforeLoadingNewMap();
@@ -6550,8 +6568,16 @@ BOOLEAN CheckForEndOfBattle( BOOLEAN fAnEnemyRetreated )
if(gGameExternalOptions.gfRevealItems)
RevealAllDroppedEnemyItems();
// If we are the server, we escape this function at the top if we think the game should still be running
// hence if we get here the game is over for all clients and we should report it
if (is_networked && is_server)
game_over();
return( TRUE );
}
// If we are the server, we escape this function at the top if we think the game should still be running
// hence if we get here the game is over for all clients and we should report it
if (is_networked && is_server)
game_over();
return( FALSE );
}