Difference between revisions of "CGameState"

From Project X Wiki
Jump to: navigation, search
 
 
Line 10: Line 10:
 
   int ALevel;
 
   int ALevel;
 
   [[CGameInfo]] Info;
 
   [[CGameInfo]] Info;
   int CurTeam;
+
   int landSelectX;
 +
  int landSelectY;
 
   int ResX;
 
   int ResX;
 
   int ResY;
 
   int ResY;
Line 18: Line 19:
 
  };
 
  };
  
 +
landSelectX, landSelectY - the position of the mouse cursor (of homing weapons). <br />
 
ResX, ResY - resolution of the screen. <br />
 
ResX, ResY - resolution of the screen. <br />
 
LevelSX, LevelSY - dimenisons of the map. <br />
 
LevelSX, LevelSY - dimenisons of the map. <br />

Latest revision as of 16:22, 8 February 2012

Up one category:
Scripting

Contains information about resolution, landscape, teams and worms.

Fields

struct CGameState
{
 CEnv* env;
 int ALevel;
 CGameInfo Info;
 int landSelectX;
 int landSelectY;
 int ResX;
 int ResY;
 int LevelSX;
 int LevelSY;
 int Tick;
};

landSelectX, landSelectY - the position of the mouse cursor (of homing weapons).
ResX, ResY - resolution of the screen.
LevelSX, LevelSY - dimenisons of the map.
Tick - current frame since beginning of the game.

Methods

int GetRandom();

Generates synchronized random number. Call this only in synchronized procedures for prevent desycnhronization.