[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netPanzer-CVS] netpanzer ./ChangeLog ./README src/NetPanzer/Co...
From: |
Matthias Braun |
Subject: |
[netPanzer-CVS] netpanzer ./ChangeLog ./README src/NetPanzer/Co... |
Date: |
Wed, 22 Oct 2003 19:05:41 -0400 |
CVSROOT: /cvsroot/netpanzer
Module name: netpanzer
Branch:
Changes by: Matthias Braun <address@hidden> 03/10/22 19:05:41
Modified files:
. : ChangeLog README
src/NetPanzer/Core: main.cpp
src/NetPanzer/Interfaces: BaseGameManager.cpp
DedicatedGameManager.cpp
GameConfig.cpp GameConfig.hpp
MouseInterface.cpp
PlayerGameManager.cpp
src/NetPanzer/Interfaces/unix: NetworkClientUnix.cpp
src/NetPanzer/Views/MainMenu/Multi: MapSelectionView.cpp
src/Lib : Exception.cpp Exception.hpp Log.cpp
src/Lib/2D : ColorTable.cpp
src/UILib/SDL : SDLSound.cpp
Log message:
23-Oct-2003 by Matthias Braun
-make dedicated server start automatic. Only the configuration file is
read, no
need interactively do settings anymore.
-Documented dedicated server settings in README file
-Changed exception class to inherid from std::exception
-fixed signal handler to really shutdown the app
Patches:
Index: netpanzer/ChangeLog
diff -u netpanzer/ChangeLog:1.16 netpanzer/ChangeLog:1.17
--- netpanzer/ChangeLog:1.16 Wed Oct 22 09:19:27 2003
+++ netpanzer/ChangeLog Wed Oct 22 19:05:39 2003
@@ -1,3 +1,10 @@
+23-Oct-2003 by Matthias Braun
+-make dedicated server start automatic. Only the configuration file is read, no
+ need interactively do settings anymore.
+-Documented dedicated server settings in README file
+-Changed exception class to inherid from std::exception
+-fixed signal handler to really shutdown the app
+
22-Oct-2003 by Ivo Danihelka
-split GameManager to BotGameManager, DedicatedGameManager
and PlayerGameManager
Index: netpanzer/README
diff -u netpanzer/README:1.2 netpanzer/README:1.3
--- netpanzer/README:1.2 Sun Oct 12 15:22:12 2003
+++ netpanzer/README Wed Oct 22 19:05:39 2003
@@ -5,7 +5,9 @@
1. Introduction
2. Building and Installation
3. Gameplay
-4. Contact
+4. Dedicated Server and Game Configuration
+5. Bot Player
+6. Contact
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -86,10 +88,6 @@
netpanzer
-a dedicated server can be started with
-
-netpanzer -d
-
Note that on first startup the game needs some time to precalculate some data.
This might take up to 5 minutes. So just wait a bit when you have a black
screen.
@@ -103,11 +101,91 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-4. Contact
+4. Dedicated Server and Configuration Files
+
+You can start a dedicated netpanzer server (a pure server, without any video
+output). By starting netpanzer with the -d commandline option.
+
+The server reads the configuration from
+ $HOME/.netpanzer/config/netpanzer-dedicated.xml
+. The format is basically the same as the normal configuration file of
+netpanzer. Here's a short introduction into the option specific to a server in
+the server section of the xml file:
+
+*maxplayers [number], default 8
+ Number of players and bots that are able to play simultaneously on the
+ server.
+
+*map [name], default "Bad Neuburg"
+ Name of the map to start.
+
+*maxunits [number], default 500
+ Number of maximum available units for all players. (Each
+ player will be able to have maxplayers/maxunits units at once)
+
+*initialunits [number], default 5
+ Number of units that each player starts with when he joins or after he's
+ been killed.
+
+*gametpye [0,1,2], default 0
+ Type of game: (0=Objectives, 1=FragLimit, 2=TimeLimit)
+
+*timelimit [number], default 50
+ timelimit of the map in minutes (used when gametype = 2)
+
+*fraglimit [number], default 500
+ fraglimit of the map (used when gametype=1)
+
+*objectivepercentage [number], default 50
+ Percentage of outposts that has to be captured to win the game.
+ (used when gametype=0)
+
+*mapcycling [yes,no], default no
+ cycle to next map after a map ended. (Currently not working correctly...)
+
+*poweups [yes,no], default yes
+ enable/disable powerups
+
+*allowallies [yes,no], default yes
+ allow/disallow players to allie
-You can contact is at the netpanzer-devel mailinglist at Savannah:
+*cloudcoverage [number], default 65
+ Number of clouds flying over the map.
+
+*windspeed [number], default 30
+ windspeed that affects particles and clouds
+
+*respawntype [0,1], default 1
+ Spawn mode: 0=Round Robin, 1=Random
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+5. Bot Players
+
+Netpanzer provides a bot player for these times when you don't have a human
+opponent. You can start netpanzer in a special mode where it connects to a
+server and simulates a real player. You can start netpanzer like this to
connect
+as bot to a server:
+
+netpanzer -b servername
+
+Example:
+This example shows how you can play locally against 2 bots:
+
+netpanzer -d &
+netpanzer -b localhost &
+netpanzer -b localhost &
+netpanzer
+
+... now press multiplayer and join to server address localhost ...
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-http://mail.nongnu.org/mailman/listinfo/netpanzer-devel
+6. Contact
+Bugs should be reported to the bug trackker on savannah:
+ https://savannah.nongnu.org/bugs/?group=netpanzer
+You can contact us at the netpanzer-devel mailinglist at Savannah:
+ http://mail.nongnu.org/mailman/listinfo/netpanzer-devel
or you might be able to catch us in irc at irc.freenode.net #netpanzer.
Index: netpanzer/src/Lib/2D/ColorTable.cpp
diff -u netpanzer/src/Lib/2D/ColorTable.cpp:1.15
netpanzer/src/Lib/2D/ColorTable.cpp:1.16
--- netpanzer/src/Lib/2D/ColorTable.cpp:1.15 Sun Oct 5 09:50:09 2003
+++ netpanzer/src/Lib/2D/ColorTable.cpp Wed Oct 22 19:05:40 2003
@@ -117,7 +117,7 @@
return;
} catch(Exception e) {
LOG( ("Error while loading palette '%s': %s", filename,
- e.getMessage()) );
+ e.what()) );
}
}
@@ -155,7 +155,7 @@
saveTable(filename);
} catch(Exception e) {
LOG ( ("Caching of ColorTable '%s' failed: %s", filename,
- e.getMessage()) );
+ e.what()) );
}
} // end createBrightenFilter
@@ -170,7 +170,7 @@
loadTable(filename);
return;
} catch(Exception e) {
- LOG( ("Error while loading palette'%s': %s", filename,
e.getMessage()) );
+ LOG( ("Error while loading palette'%s': %s", filename, e.what()) );
}
}
@@ -199,7 +199,7 @@
saveTable(filename);
} catch(Exception e) {
LOG ( ("Caching of ColorTable '%s' failed: %s", filename,
- e.getMessage()) );
+ e.what()) );
}
} // end createDarkenFilter
@@ -217,7 +217,7 @@
loadTable(filename);
return;
} catch(Exception e) {
- LOG( ("Error while loading palette'%s': %s", filename,
e.getMessage()) );
+ LOG( ("Error while loading palette'%s': %s", filename, e.what()) );
}
}
@@ -269,7 +269,7 @@
saveTable(filename);
} catch(Exception e) {
LOG ( ("Caching of ColorTable '%s' failed: %s", filename,
- e.getMessage()) );
+ e.what()) );
}
} // end ColorTable::create
@@ -328,7 +328,7 @@
loadTable(filename);
return;
} catch(Exception e) {
- LOG( ("Error while loading palette'%s': %s", filename,
e.getMessage()) );
+ LOG( ("Error while loading palette'%s': %s", filename, e.what()) );
}
}
@@ -371,7 +371,7 @@
saveTable(filename);
} catch(Exception e) {
LOG ( ("Caching of ColorTable '%s' failed: %s",
- filename, e.getMessage()) );
+ filename, e.what()) );
}
} // end ColorTable::createTrans0
@@ -393,7 +393,7 @@
loadTable(filename);
return;
} catch(Exception e) {
- LOG( ("Error while loading palette'%s': %s", filename,
e.getMessage()) );
+ LOG( ("Error while loading palette'%s': %s", filename, e.what()) );
}
}
@@ -427,6 +427,6 @@
try {
saveTable(filename);
} catch(Exception e) {
- LOG ( ("Caching of ColorTable '%s' failed: %s", filename,
e.getMessage()) );
+ LOG ( ("Caching of ColorTable '%s' failed: %s", filename, e.what()) );
}
} // end ColorTable::createLightDarkFilter
Index: netpanzer/src/Lib/Exception.cpp
diff -u netpanzer/src/Lib/Exception.cpp:1.4 netpanzer/src/Lib/Exception.cpp:1.5
--- netpanzer/src/Lib/Exception.cpp:1.4 Fri Sep 19 20:05:28 2003
+++ netpanzer/src/Lib/Exception.cpp Wed Oct 22 19:05:40 2003
@@ -22,7 +22,7 @@
#include <string.h>
#include "Exception.hpp"
-Exception::Exception(const char* msg, ...)
+Exception::Exception(const char* msg, ...) throw()
{
va_list args;
va_start(args, msg);
@@ -33,19 +33,19 @@
va_end(args);
}
-Exception::Exception(const Exception& other)
+Exception::Exception(const Exception& other) throw()
{
size_t len = strlen(other.message);
message = new char[len+1];
memcpy(message, other.message, len+1);
}
-Exception::~Exception()
+Exception::~Exception() throw()
{
delete[] message;
}
-const char* Exception::getMessage()
+const char* Exception::what() const throw()
{
return message;
}
Index: netpanzer/src/Lib/Exception.hpp
diff -u netpanzer/src/Lib/Exception.hpp:1.5 netpanzer/src/Lib/Exception.hpp:1.6
--- netpanzer/src/Lib/Exception.hpp:1.5 Tue Sep 16 16:16:09 2003
+++ netpanzer/src/Lib/Exception.hpp Wed Oct 22 19:05:40 2003
@@ -18,17 +18,17 @@
#ifndef __SOCKET_EXCEPTION_H__
#define __SOCKET_EXCEPTION_H__
-#include <config.h>
+#include <exception>
-class Exception
+class Exception : public std::exception
{
public:
- Exception(const char* message, ...)
+ Exception(const char* message, ...) throw()
__attribute__((format (__printf__, 2, 3)));
- Exception(const Exception& other);
- ~Exception();
+ Exception(const Exception& other) throw();
+ virtual ~Exception() throw();
- const char* getMessage();
+ const char* what() const throw();
private:
char* message;
Index: netpanzer/src/Lib/Log.cpp
diff -u netpanzer/src/Lib/Log.cpp:1.9 netpanzer/src/Lib/Log.cpp:1.10
--- netpanzer/src/Lib/Log.cpp:1.9 Tue Sep 23 21:26:18 2003
+++ netpanzer/src/Lib/Log.cpp Wed Oct 22 19:05:40 2003
@@ -54,7 +54,7 @@
try {
m_logfile = FileSystem::openWrite(filename);
} catch(Exception& e) {
- fprintf(stderr, "cannot open '%s': %s\n", filename, e.getMessage());
+ fprintf(stderr, "cannot open '%s': %s\n", filename, e.what());
m_logfile = 0;
}
}
Index: netpanzer/src/NetPanzer/Core/main.cpp
diff -u netpanzer/src/NetPanzer/Core/main.cpp:1.15
netpanzer/src/NetPanzer/Core/main.cpp:1.16
--- netpanzer/src/NetPanzer/Core/main.cpp:1.15 Wed Oct 22 09:19:29 2003
+++ netpanzer/src/NetPanzer/Core/main.cpp Wed Oct 22 19:05:40 2003
@@ -34,6 +34,7 @@
#include "cMouse.hpp"
#include "BaseGameManager.hpp"
+#include "GameConfig.hpp"
#include "DedicatedGameManager.hpp"
#include "BotGameManager.hpp"
#include "PlayerGameManager.hpp"
@@ -110,6 +111,7 @@
void shutdown()
{
SDL_Quit();
+ gameconfig->saveConfig();
LOGGER.closeLogFile();
FileSystem::shutdown();
}
@@ -134,9 +136,10 @@
default: sigtype = "UNKNOWN"; break;
}
- std::cerr << "Received signal " << sigtype << "(" << signum << ")" <<
- "aborting and trying to shutdown." << std::endl;
+ std::cerr << "Received signal " << sigtype << "(" << signum << ")"
+ << std::endl << "aborting and trying to shutdown." << std::endl;
shutdown();
+ raise(signum);
}
//-----------------------------------------------------------------
@@ -186,8 +189,8 @@
// Initialize libphysfs
try {
FileSystem::initialize(argv[0], "netpanzer", "netpanzer");
- } catch(Exception e) {
- fprintf(stderr, "%s", e.getMessage());
+ } catch(std::exception& e) {
+ fprintf(stderr, "%s", e.what());
shutdown();
exit(1);
}
@@ -229,7 +232,7 @@
manager->initialize();
return manager;
} catch(Exception e) {
- LOGGER.warning("Couldn't initialize the game: %s", e.getMessage());
+ LOGGER.warning("Couldn't initialize the game: %s", e.what());
shutdown();
exit(1);
}
@@ -260,7 +263,7 @@
shutdown();
} catch(Exception e) {
LOGGER.warning("An unexpected exception occured: %s\nShutdown needed.",
- e.getMessage());
+ e.what());
shutdown();
throw;
} catch(...) {
Index: netpanzer/src/NetPanzer/Interfaces/BaseGameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/BaseGameManager.cpp:1.1
netpanzer/src/NetPanzer/Interfaces/BaseGameManager.cpp:1.2
--- netpanzer/src/NetPanzer/Interfaces/BaseGameManager.cpp:1.1 Wed Oct 22
09:19:30 2003
+++ netpanzer/src/NetPanzer/Interfaces/BaseGameManager.cpp Wed Oct 22
19:05:40 2003
@@ -186,7 +186,7 @@
initializeNetworkSubSystem();
initializeInputDevices();
} catch(Exception &e) {
- LOGGER.warning("Initialisation failed:\n%s", e.getMessage());
+ LOGGER.warning("Initialisation failed:\n%s", e.what());
shutdown();
throw Exception("bootstrap failed.");
}
Index: netpanzer/src/NetPanzer/Interfaces/DedicatedGameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/DedicatedGameManager.cpp:1.2
netpanzer/src/NetPanzer/Interfaces/DedicatedGameManager.cpp:1.3
--- netpanzer/src/NetPanzer/Interfaces/DedicatedGameManager.cpp:1.2 Wed Oct
22 13:50:46 2003
+++ netpanzer/src/NetPanzer/Interfaces/DedicatedGameManager.cpp Wed Oct 22
19:05:40 2003
@@ -34,6 +34,7 @@
#include "Particle2D.hpp"
#include "ParticleInterface.hpp"
#include "Physics.hpp"
+#include "Log.hpp"
#include "Server.hpp"
//-----------------------------------------------------------------
@@ -111,127 +112,29 @@
}
#endif
}
-//-----------------------------------------------------------------
-// custom version of readString that doesn't return the trailing \n
-static inline void readString(char* buffer, size_t buffersize, FILE* file)
-{
- fgets(buffer, buffersize, file);
- buffer[strlen(buffer)-1] = '\0';
-}
+
//-----------------------------------------------------------------
bool DedicatedGameManager::launchNetPanzerGame()
{
ConsoleInterface::postMessage( "netPanzer Dedicated Server");
- char input_str[256];
-
- MapsManager::getCurrentMap( input_str );
- gameconfig->map = input_str;
+ LOGGER.info("Server Settings:");
+ LOGGER.info("Map: %s", gameconfig->map.c_str());
+ LOGGER.info("MaxPlayers: %d", (int) gameconfig->maxplayers);
+ LOGGER.info("MaxUnits: %d", (int) gameconfig->maxunits);
+ LOGGER.info("Gametype: %s", gameconfig->getGameTypeString());
+ LOGGER.info("ObjectivePercentage: %d",
+ (int) gameconfig->objectiveoccupationpercentage);
+ LOGGER.info("TimeLimit: %d", (int) gameconfig->timelimit);
+ LOGGER.info("FragLimit: %d", (int) gameconfig->fraglimit);
+ LOGGER.info("RespawnType: %s", gameconfig->getRespawnTypeString());
+ LOGGER.info("MapCycling: %s", gameconfig->mapcycling ? "yes" : "no");
+ LOGGER.info("Powerups: %s", gameconfig->powerups ? "yes" : "no");
+ LOGGER.info("AllowAllies: %s", gameconfig->allowallies ? "yes" : "no");
+ LOGGER.info("CloudCoverage: %d (WindSpeed %d)",
+ (int) gameconfig->cloudcoverage, (int) gameconfig->windspeed);
const char* mapname = gameconfig->map.c_str();
- printf( "Map Name <%s> : ", mapname);
- fflush(stdout);
- readString(input_str, 256, stdin);
- if ( strlen(input_str) > 0 ) {
- gameconfig->map = input_str;
- }
-
- printf( "Players <%d> : ", (int) gameconfig->maxplayers );
- fflush(stdout);
- readString(input_str, 256, stdin);
- if ( strlen(input_str) > 0 ) {
- int players;
- sscanf( input_str, "%d", &players );
- gameconfig->maxplayers = players;
- }
-
- printf( "Units <%d> : ", (int) gameconfig->maxunits );
- fflush(stdout);
- readString(input_str, 256, stdin);
- if ( strlen(input_str) > 0 ) {
- int units;
- sscanf( input_str, "%d", &units );
- gameconfig->maxunits = units;
- }
-
- int game_type = 1;
-
- do {
- printf( "Game Type\n" );
- printf( "(1) Objective \n");
- printf( "(2) Frag Limit \n" );
- printf( "(3) Time Limit \n" );
- printf( "Choose <1>: " );
- fflush(stdout);
- readString(input_str, 256, stdin);
- sscanf( input_str, "%d", &game_type );
- } while( (game_type < 1) || (game_type > 3) );
-
- switch( game_type ) {
- case 1 : {
- gameconfig->gametype = _gametype_objective;
- printf( "Outpost Occupation <%d %%> : ",
- (int) gameconfig->objectiveoccupationpercentage );
- fflush(stdout);
- readString(input_str, 256, stdin);
- if ( strlen(input_str) > 0 ) {
- int percent;
- sscanf( input_str, "%d", &percent );
- gameconfig->objectiveoccupationpercentage = percent;
- }
- }
- break;
-
- case 2 : {
- gameconfig->gametype = _gametype_fraglimit;
- printf( "Frag Limit <%d> frags : ", (int) gameconfig->fraglimit );
- fflush(stdout);
- readString(input_str, 256, stdin);
- if ( strlen(input_str) > 0 ) {
- int frags;
- sscanf( input_str, "%d", &frags);
- gameconfig->fraglimit = frags;
- }
- }
- break;
-
- case 3 : {
- gameconfig->gametype = _gametype_timelimit;
- printf( "Time Limit <%d> minutes: ", (int) gameconfig->timelimit );
- fflush(stdout);
- readString(input_str, 256, stdin);
- if ( strlen(input_str) > 0 ) {
- int time_limit;
- sscanf( input_str, "%d", &time_limit );
- gameconfig->timelimit = time_limit;
- }
- }
- break;
-
- } // ** switch
-
- printf( "PowerUps <%s> (Y/N) : ",
- (bool) gameconfig->powerups ? "Y" : "N" );
- fflush(stdout);
- readString(input_str, 256, stdin);
- if ( strlen(input_str) > 0 ) {
- if ( strcasecmp( "y", input_str ) == 0 ) {
- gameconfig->powerups = true;
- } else {
- gameconfig->powerups = false;
- }
- }
-
- printf( "Server Name <%s> :", gameconfig->playername.c_str() );
- fflush(stdout);
- readString(input_str, 256, stdin);
- if ( strlen(input_str) > 0 ) {
- gameconfig->playername = input_str;
- } else {
- gameconfig->playername = "Dedicated Server";
- }
-
- mapname = gameconfig->map.c_str();
MapsManager::setCycleStartMap(mapname);
GameManager::dedicatedLoadGameMap(mapname);
@@ -252,5 +155,3 @@
GameManager::startGameTimer();
return true;
}
-
-
Index: netpanzer/src/NetPanzer/Interfaces/GameConfig.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/GameConfig.cpp:1.13
netpanzer/src/NetPanzer/Interfaces/GameConfig.cpp:1.14
--- netpanzer/src/NetPanzer/Interfaces/GameConfig.cpp:1.13 Thu Oct 16
21:08:30 2003
+++ netpanzer/src/NetPanzer/Interfaces/GameConfig.cpp Wed Oct 22 19:05:40 2003
@@ -26,10 +26,10 @@
GameConfig::GameConfig(const std::string& newconfigfile)
// VariableName("Name", value [, minimum, maximum])
- : gametype("gametype", _gametype_objective, 0, _gametype_last-1),
- hostorjoin("hostorjoin", _game_session_join, 0, _game_session_last-1),
+ : hostorjoin("hostorjoin", _game_session_join, 0, _game_session_last-1),
playername("name", "Player"),
- vehicelgeneration("vehiclegeneration", true),
+
+ gametype("gametype", _gametype_objective, 0, _gametype_last-1),
maxplayers("maxplayers", 8, 1, 25),
maxunits("maxunits", 500, 25, 10000),
initialunits("initialunits", 5, 0, 100),
@@ -42,8 +42,8 @@
cloudcoverage("cloudcoverage", 0),
respawntype("respawntype", _game_config_respawn_type_random, 0,
_game_config_respawn_type_last-1),
- windspeed("windspeed", 0),
- map("map"),
+ windspeed("windspeed", 30),
+ map("map", "Bad Neuburg"),
screenresolution("resolution", 0, 0, 2),
fullscreen("fullscreen", true),
@@ -77,12 +77,11 @@
{
configfile = newconfigfile;
- gamesettings.push_back(&gametype);
//gamesettings.push_back(&hostorjoin);
playersettings.push_back(&playername);
- serversettings.push_back(&vehicelgeneration);
+ serversettings.push_back(&gametype);
serversettings.push_back(&maxplayers);
serversettings.push_back(&maxunits);
serversettings.push_back(&initialunits);
@@ -130,7 +129,7 @@
try {
loadConfig();
} catch(Exception e) {
- LOG(("couldn't read game configuration: %s", e.getMessage()));
+ LOG(("couldn't read game configuration: %s", e.what()));
}
}
@@ -139,7 +138,7 @@
try {
saveConfig();
} catch(Exception e) {
- LOG(("couldn't save game configuration: %s", e.getMessage()));
+ LOG(("couldn't save game configuration: %s", e.what()));
}
}
@@ -188,7 +187,7 @@
section.readString(confstring->getName().c_str());
} catch(Exception& e) {
LOG(("Skipping config '%s': %s", var->getName().c_str(),
- e.getMessage()));
+ e.what()));
}
}
} catch(Exception& e) {
Index: netpanzer/src/NetPanzer/Interfaces/GameConfig.hpp
diff -u netpanzer/src/NetPanzer/Interfaces/GameConfig.hpp:1.11
netpanzer/src/NetPanzer/Interfaces/GameConfig.hpp:1.12
--- netpanzer/src/NetPanzer/Interfaces/GameConfig.hpp:1.11 Sat Oct 4
10:44:38 2003
+++ netpanzer/src/NetPanzer/Interfaces/GameConfig.hpp Wed Oct 22 19:05:40 2003
@@ -67,7 +67,6 @@
enum { _game_config_respawn_type_round_robin,
_game_config_respawn_type_random,
- _game_config_respawn_type_max,
_game_config_respawn_type_last
};
@@ -105,15 +104,17 @@
GameConfig(const std::string& configfile);
~GameConfig();
+ void loadConfig();
+ void saveConfig();
+
// game Settings
- ConfigInt gametype; //Objectives, FragLimit, TimeLimit
ConfigInt hostorjoin; //1=host, 2=join
// player settings
ConfigString playername;
// server settings
- ConfigBool vehicelgeneration;
+ ConfigInt gametype; //Objectives, FragLimit, TimeLimit
ConfigInt maxplayers;
ConfigInt maxunits;
ConfigInt initialunits;
@@ -197,10 +198,6 @@
case _game_config_respawn_type_random :
return( "Random" );
break;
-
- case _game_config_respawn_type_max :
- return( "Max" );
- break;
} // ** switch
assert(false);
@@ -285,9 +282,6 @@
return( Color::white );
}
- void loadConfig();
- void saveConfig();
-
void loadSettings(XmlConfig& config, const char* name,
std::vector<ConfigVariable*>& settings);
void saveSettings(XmlStore& config, const char* name,
Index: netpanzer/src/NetPanzer/Interfaces/MouseInterface.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/MouseInterface.cpp:1.16
netpanzer/src/NetPanzer/Interfaces/MouseInterface.cpp:1.17
--- netpanzer/src/NetPanzer/Interfaces/MouseInterface.cpp:1.16 Fri Oct 3
10:45:10 2003
+++ netpanzer/src/NetPanzer/Interfaces/MouseInterface.cpp Wed Oct 22
19:05:40 2003
@@ -76,7 +76,7 @@
surface->setOffsetCenter();
cursors.insert(std::pair<std::string,Surface*> (*i, surface));
} catch(Exception& e) {
- LOG(("Couldn't load cursorfile '%s': %s", *i, e.getMessage()));
+ LOG(("Couldn't load cursorfile '%s': %s", *i, e.what()));
}
}
FileSystem::freeList(cursorfiles);
Index: netpanzer/src/NetPanzer/Interfaces/PlayerGameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/PlayerGameManager.cpp:1.2
netpanzer/src/NetPanzer/Interfaces/PlayerGameManager.cpp:1.3
--- netpanzer/src/NetPanzer/Interfaces/PlayerGameManager.cpp:1.2 Wed Oct
22 13:50:46 2003
+++ netpanzer/src/NetPanzer/Interfaces/PlayerGameManager.cpp Wed Oct 22
19:05:40 2003
@@ -142,7 +142,7 @@
try {
sound = new SDLSound();
} catch(Exception e) {
- LOGGER.warning("Couldn't initialize sound: %s", e.getMessage());
+ LOGGER.warning("Couldn't initialize sound: %s", e.what());
sound = new DummySound();
}
Index: netpanzer/src/NetPanzer/Interfaces/unix/NetworkClientUnix.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/unix/NetworkClientUnix.cpp:1.10
netpanzer/src/NetPanzer/Interfaces/unix/NetworkClientUnix.cpp:1.11
--- netpanzer/src/NetPanzer/Interfaces/unix/NetworkClientUnix.cpp:1.10 Wed Oct
22 09:19:31 2003
+++ netpanzer/src/NetPanzer/Interfaces/unix/NetworkClientUnix.cpp Wed Oct
22 19:05:40 2003
@@ -86,9 +86,9 @@
try {
clientsocket = new ClientSocket(session_name,
_NETPANZER_DEFAULT_PORT_TCP);
} catch(Exception e) {
- LOG( ( "Couldn't connect to server:\n%s.", e.getMessage()) );
+ LOG( ( "Couldn't connect to server:\n%s.", e.what()) );
char text[128];
- snprintf(text, 128, "connection error: %s", e.getMessage());
+ snprintf(text, 128, "connection error: %s", e.what());
lobbyView->scrollAndUpdate(text);
return false;
}
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp:1.17
netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp:1.18
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp:1.17
Mon Oct 13 10:30:23 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp Wed Oct
22 19:05:40 2003
@@ -183,7 +183,7 @@
file = std::auto_ptr<ReadFile>
(FileSystem::openRead(mapfiles[i].c_str()));
} catch(Exception& e) {
LOGGER.warning("cannot open map file '%s': %s",
- mapfiles[i].c_str(), e.getMessage());
+ mapfiles[i].c_str(), e.what());
continue;
}
Index: netpanzer/src/UILib/SDL/SDLSound.cpp
diff -u netpanzer/src/UILib/SDL/SDLSound.cpp:1.12
netpanzer/src/UILib/SDL/SDLSound.cpp:1.13
--- netpanzer/src/UILib/SDL/SDLSound.cpp:1.12 Sat Sep 20 13:52:47 2003
+++ netpanzer/src/UILib/SDL/SDLSound.cpp Wed Oct 22 19:05:41 2003
@@ -193,7 +193,7 @@
}
} catch (Exception &e) {
LOG (("Couldn't load wav '%s': %s",
- filename.c_str(), e.getMessage()));
+ filename.c_str(), e.what()));
}
}
}
@@ -292,7 +292,7 @@
}
} catch (Exception &e) {
LOG (("Failed to load song '%s': %s",
- toplay, e.getMessage()));
+ toplay, e.what()));
}
#else
music = Mix_LoadMUS(FileSystem::getRealName(toplay).c_str());
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [netPanzer-CVS] netpanzer ./ChangeLog ./README src/NetPanzer/Co...,
Matthias Braun <=