Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vegaserver.cpp File Reference
#include <iostream>
#include <stdlib.h>
#include "vs_globals.h"
#include "networking/netserver.h"
#include "cmd/script/mission.h"
#include "force_feedback.h"
#include "lin_time.h"
#include "options.h"

Go to the source code of this file.

Functions

void VSExit (int code)
 
int main (int argc, char **argv)
 

Variables

char SERVER = 1
 
Universe_Universe
 
LeakVector< Mission * > active_missions
 
vs_options game_options
 needed for assert() calls. More...
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 44 of file vegaserver.cpp.

References VSFileSystem::ChangeToProgramDirectory(), forcefeedback, InitTime(), setNewTime(), NetServer::start(), VEGA_EPOCH, and VSServer.

45 {
46  //#ifndef _WIN32
47  //feenableexcept(FE_DIVBYZERO|FE_INVALID);//|FE_OVERFLOW|FE_UNDERFLOW)
48  //#endif
50 
51  //Stupid static variable somewhere, so need to initialize it twice.
52  InitTime();
53  setNewTime( 0 );
54  setNewTime( ( (double) time( NULL ) )-VEGA_EPOCH );
55  VSServer = new NetServer;
56  //Fake forcefeedback
58 
59  VSServer->start( argc, argv );
60 
61  delete VSServer;
62 
63  return 0;
64 }
void VSExit ( int  code)

Definition at line 38 of file vegaserver.cpp.

References NetServer::closeAllSockets(), and VSServer.

39 {
41  exit( 1 );
42 }

Variable Documentation

Universe* _Universe

Definition at line 33 of file vegaserver.cpp.

LeakVector< Mission* > active_missions

Definition at line 34 of file vegaserver.cpp.

vs_options game_options

needed for assert() calls.

Draws cockpit parts Draws gauges, info strings, radar, ...

Definition at line 36 of file vegaserver.cpp.

Referenced by FSM::Node::AddSound(), and NetServer::start().

char SERVER = 1

Definition at line 32 of file vegaserver.cpp.