CGameState

From Project X Wiki
Revision as of 05:49, 7 February 2010 by Entuser (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Up one category:
Scripting

Contains information about resolution, landscape, teams and worms.

Fields

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

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.