From: <z-...@us...> - 2012-03-28 10:07:12
|
Revision: 10387 http://armagetronad.svn.sourceforge.net/armagetronad/?rev=10387&view=rev Author: z-man Date: 2012-03-28 10:07:05 +0000 (Wed, 28 Mar 2012) Log Message: ----------- Merging branch 0.2.8 from revision 10379 to 10386: ------------------------------------------------------------------------ r10386 | bazaaarmagetron | 2012-03-28 11:57:27 +0200 (Wed, 28 Mar 2012) | 2 lines Manuel Moos: Taking full control of Windows display driver selection to make sure DirectX is used if we want to. ------------------------------------------------------------------------ r10385 | bazaaarmagetron | 2012-03-26 23:04:04 +0200 (Mon, 26 Mar 2012) | 4 lines author: Manuel Moos "About" display now uses pure clientside fullscreen messages; invoking it on a hybrid server would display the info on all clients. ------------------------------------------------------------------------ r10384 | bazaaarmagetron | 2012-03-26 23:03:24 +0200 (Mon, 26 Mar 2012) | 2 lines Manuel Moos: Fixing freeze after client controlled fullscreen messages. ------------------------------------------------------------------------ r10383 | bazaaarmagetron | 2012-03-26 23:02:46 +0200 (Mon, 26 Mar 2012) | 2 lines Manuel Moos: Fixing recording/playback when Select() is invoked in local games. ------------------------------------------------------------------------ r10382 | bazaaarmagetron | 2012-03-25 12:18:49 +0200 (Sun, 25 Mar 2012) | 2 lines Manuel Moos: Clarification. ------------------------------------------------------------------------ r10381 | bazaaarmagetron | 2012-03-16 20:39:12 +0100 (Fri, 16 Mar 2012) | 1 line Daniel Lee Harple: Move se_commandWriter definition to file scope, so it is initialized on program startup. ------------------------------------------------------------------------ Revision Links: -------------- http://armagetronad.svn.sourceforge.net/armagetronad/?rev=10379&view=rev http://armagetronad.svn.sourceforge.net/armagetronad/?rev=10386&view=rev http://armagetronad.svn.sourceforge.net/armagetronad/?rev=10385&view=rev http://armagetronad.svn.sourceforge.net/armagetronad/?rev=10384&view=rev http://armagetronad.svn.sourceforge.net/armagetronad/?rev=10383&view=rev http://armagetronad.svn.sourceforge.net/armagetronad/?rev=10382&view=rev http://armagetronad.svn.sourceforge.net/armagetronad/?rev=10381&view=rev Modified Paths: -------------- armagetronad/branches/0.4/armagetronad/config/settings_dedicated.cfg armagetronad/branches/0.4/armagetronad/src/engine/ePlayer.cpp armagetronad/branches/0.4/armagetronad/src/network/nSocket.cpp armagetronad/branches/0.4/armagetronad/src/tron/gArmagetron.cpp armagetronad/branches/0.4/armagetronad/src/tron/gGame.cpp Property Changed: ---------------- armagetronad/branches/0.4/ Property changes on: armagetronad/branches/0.4 ___________________________________________________________________ Modified: svn:mergeinfo - /armagetronad/branches/0.2.8:8751-8852,8855-9185,9192-9201,9220-9514,9529-10044,10054-10379 /armagetronad/branches/0.2.8.3:9309-10004 + /armagetronad/branches/0.2.8:8751-8852,8855-9185,9192-9201,9220-9514,9529-10044,10054-10386 /armagetronad/branches/0.2.8.3:9309-10004 Modified: armagetronad/branches/0.4/armagetronad/config/settings_dedicated.cfg =================================================================== --- armagetronad/branches/0.4/armagetronad/config/settings_dedicated.cfg 2012-03-28 09:57:27 UTC (rev 10386) +++ armagetronad/branches/0.4/armagetronad/config/settings_dedicated.cfg 2012-03-28 10:07:05 UTC (rev 10387) @@ -417,6 +417,8 @@ # Should safety checks be done on script commands? Very much recommended to leave this on. CHECK_SCRIPT 1 +# The commands above are only available on Unix. + LADDERLOG_GAME_TIME_INTERVAL -1 # write a line to ladderlog.txt indicating how "old" the current game is at most every n seconds. Negative values disable this feature. WAIT_FOR_EXTERNAL_SCRIPT 0 # set to 1 if you want the server to sleep between rounds until it is set back to 0 or WAIT_FOR_EXTERNAL_SCRIPT_TIMEOUT 3 # seconds Modified: armagetronad/branches/0.4/armagetronad/src/engine/ePlayer.cpp =================================================================== --- armagetronad/branches/0.4/armagetronad/src/engine/ePlayer.cpp 2012-03-28 09:57:27 UTC (rev 10386) +++ armagetronad/branches/0.4/armagetronad/src/engine/ePlayer.cpp 2012-03-28 10:07:05 UTC (rev 10387) @@ -2169,9 +2169,9 @@ static tSettingItem< tAccessLevel > se_adminAccessLevelConf( "ACCESS_LEVEL_ADMIN", se_adminAccessLevel ); static tAccessLevelSetter se_adminAccessLevelConfLevel( se_adminAccessLevelConf, tAccessLevel_Owner ); +static eLadderLogWriter se_commandWriter( "COMMAND", true ); + void handle_command_intercept( ePlayerNetID *p, tString const & command, std::istream & s, tString const & say ) { - static eLadderLogWriter se_commandWriter( "COMMAND", true ); - tString commandArguments; commandArguments.ReadLine( s ); Modified: armagetronad/branches/0.4/armagetronad/src/network/nSocket.cpp =================================================================== --- armagetronad/branches/0.4/armagetronad/src/network/nSocket.cpp 2012-03-28 09:57:27 UTC (rev 10386) +++ armagetronad/branches/0.4/armagetronad/src/network/nSocket.cpp 2012-03-28 10:07:05 UTC (rev 10387) @@ -2997,35 +2997,36 @@ if ( controlSocket_.GetSocket() < 0 ) { tDelay( int( dt * 1000000 ) ); - return false; } + else + { + fd_set rfds; // set of sockets to watch + struct timeval tv; // time value to pass to select() - fd_set rfds; // set of sockets to wathc - struct timeval tv; // time value to pass to select() + FD_ZERO( &rfds ); - FD_ZERO( &rfds ); + // watch the control socket + FD_SET( controlSocket_.GetSocket(), &rfds ); + // con << "Watching " << controlSocket_.GetSocket(); - // watch the control socket - FD_SET( controlSocket_.GetSocket(), &rfds ); - // con << "Watching " << controlSocket_.GetSocket(); + int max = controlSocket_.GetSocket(); - int max = controlSocket_.GetSocket(); + // watch listening sockets + for( nSocketListener::SocketArray::const_iterator iter = listener_.GetSockets().begin(); iter != listener_.GetSockets().end(); ++iter ) + { + FD_SET( (*iter).GetSocket(), &rfds ); + if ( (*iter).GetSocket() > max ) + max = (*iter).GetSocket(); + // con << ", " << (*iter).GetSocket(); + } - // watch listening sockets - for( nSocketListener::SocketArray::const_iterator iter = listener_.GetSockets().begin(); iter != listener_.GetSockets().end(); ++iter ) - { - FD_SET( (*iter).GetSocket(), &rfds ); - if ( (*iter).GetSocket() > max ) - max = (*iter).GetSocket(); - // con << ", " << (*iter).GetSocket(); + // set time + tv.tv_sec = static_cast< long int >( dt ); + tv.tv_usec = static_cast< long int >( (dt-tv.tv_sec)*1000000 ); + + // delegate to system select + retval = select(max+1, &rfds, NULL, NULL, &tv); } - - // set time - tv.tv_sec = static_cast< long int >( dt ); - tv.tv_usec = static_cast< long int >( (dt-tv.tv_sec)*1000000 ); - - // delegate to system select - retval = select(max+1, &rfds, NULL, NULL, &tv); } tRecorder::Record( section, retval ); Modified: armagetronad/branches/0.4/armagetronad/src/tron/gArmagetron.cpp =================================================================== --- armagetronad/branches/0.4/armagetronad/src/tron/gArmagetron.cpp 2012-03-28 09:57:27 UTC (rev 10386) +++ armagetronad/branches/0.4/armagetronad/src/tron/gArmagetron.cpp 2012-03-28 10:07:05 UTC (rev 10387) @@ -666,8 +666,14 @@ #ifdef WIN32 // disable DirectX by default; it causes problems with some boards. - if (!use_directx && !getenv("SDL_VIDEODRIVER") ) { - sg_PutEnv("SDL_VIDEODRIVER=windib"); + if (!getenv( "SDL_VIDEODRIVER") ) { + if (use_directx) { + sg_PutEnv( "SDL_VIDEODRIVER=directx" ); + } + else + { + sg_PutEnv( "SDL_VIDEODRIVER=windib" ); + } } #endif Modified: armagetronad/branches/0.4/armagetronad/src/tron/gGame.cpp =================================================================== --- armagetronad/branches/0.4/armagetronad/src/tron/gGame.cpp 2012-03-28 09:57:27 UTC (rev 10386) +++ armagetronad/branches/0.4/armagetronad/src/tron/gGame.cpp 2012-03-28 10:07:05 UTC (rev 10387) @@ -2176,7 +2176,7 @@ versionInfo << "$version_info_gl_version"; versionInfo << gl_version; - sg_FullscreenMessage("$version_info_title", versionInfo, 1000); + sg_ClientFullscreenMessage("$version_info_title", versionInfo, 1000); } void sg_StartupPlayerMenu(); @@ -5015,6 +5015,11 @@ void sg_FullscreenMessageWait() { + if( sn_GetNetState() != nSERVER ) + { + return; + } + // wait for the clients to have seen the message { // stop the game This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |