home *** CD-ROM | disk | FTP | other *** search
Wrap
//============================================================================ // control/server/initialize.cs // // server control initialization module for 3D2E Koob23 sample game // // Copyright (c) 2003 by Kenneth C. Finney. //============================================================================ $pref::Master0 = "2:master.garagegames.com:28002"; $Pref::Server::ConnectionError = "You do not have the correct version of 3D2E client or the related art needed to play on this server. This is the server for Chapter 6. Please check that chapter for directions."; $Pref::Server::FloodProtectionEnabled = 1; $Pref::Server::Info = "3D Game Programming All-In-One by Kenneth C. Finney."; $Pref::Server::MaxPlayers = 64; $Pref::Server::Name = "3D2E Book - Chapter 6 Server"; $Pref::Server::Password = ""; $Pref::Server::Port = 28000; $Pref::Server::RegionMask = 2; $Pref::Server::TimeLimit = 20; $Pref::Net::LagThreshold = "400"; $pref::Net::PacketRateToClient = "10"; $pref::Net::PacketRateToServer = "32"; $pref::Net::PacketSize = "200"; $pref::Net::Port = 28000; function InitializeServer() //---------------------------------------------------------------------------- // Prepare some global server information & load the game-specific module //---------------------------------------------------------------------------- { $Server::GameType = "3D2E"; $Server::MissionType = "Koob23"; $Server::Status = "Unknown"; Echo("\n++++++++++++ Initializing module: Koob23 server ++++++++++++"); // Specify where the mission files are. $Server::MissionFileSpec = "*/maps/*.mis"; InitBaseServer(); // basic server features defined in the common modules // Load up game server support script Exec("./server.cs"); } function InitializeDedicatedServer() { EnableWinConsole(true); Echo("\n--------- Starting Dedicated Server ---------"); $Server::Dedicated = true; if ($mapArgument !$= "") { CreateServer("MultiPlayer", $mapArgument); } else Echo("No map specified (use -map <filename>)"); }