C# Class idTech4.Game.idGame

Inheritance: idBaseGame
Afficher le fichier Open project: iainmckay/idtech4.net

Méthodes publiques

Méthode Description
CacheDictionaryMedia ( idDict dict ) : void

This is called after parsing an EntityDef and for each entity spawnArgs before merging the entitydef. It could be done post-merge, but that would avoid the fast pre-cache check associated with each entityDef.

CalculateFieldOfView ( float baseFov, float &fovX, float &fovY ) : void

Calculates the horizontal and vertical field of view based on a horizontal field of view and custom aspect ratio.

Draw ( int clientIndex ) : bool
FindEntityDef ( string name, bool makeDefault ) : idDeclEntity
FindEntityDefDict ( string name, bool makeDefault ) : idDict
FindEntityUsingDef ( idEntity from, string match ) : idEntity

Searches all active entities for the next one using the specified entityDef.

Searches beginning at the entity after from, or the beginning if NULL NULL will be returned if the end of the list is reached.

GetBestGameType ( string map, string gameType ) : string
GetMapLoadingInterface ( string defaultInterface ) : string
GetTimeGroupTime ( int timeGroup ) : int
HandleGuiCommands ( string menuCommand ) : string
HandleMainMenuCommands ( string menuCommand, idUserInterface gui ) : void
Init ( ) : void
InitFromNewMap ( string mapName, idRenderWorld renderWorld, idSoundWorld soundWorld, bool isServer, bool isClient, int randomSeed ) : void
RegisterEntity ( idEntity entity ) : void
RunFrame ( idUserCommand userCommands ) : GameReturn
SelectInitialSpawnPoint ( idPlayer player ) : idEntity

spectators are spawned randomly anywhere. in-game clients are spawned based on distance to active players (randomized on the first half) upon map restart, initial spawns are used (randomized ordered list of spawns flagged "initial"). if there are more players than initial spots, overflow to regular spawning.

SelectTimeGroup ( int timeGroup ) : void
ServerClientBegin ( int clientIndex ) : void
ServerClientConnect ( int clientIndex, string guid ) : void
ServerSendChatMessage ( int to, string name, string text ) : void
SetLocalClient ( int clientIndex ) : void
SetPersistentPlayerInformation ( int clientIndex, idDict playerInfo ) : void
SetServerInfo ( idDict serverInfo ) : void
SetUserInformation ( int clientIndex, idDict userInfo, bool isClient, bool canModify ) : idDict
SpawnEntityDef ( idDict args, bool setDefaults = true ) : idEntity
SpawnPlayer ( int clientIndex ) : void
idGame ( ) : System

Private Methods

Méthode Description
Clear ( ) : void
CreateGameRules ( ) : void
InhibitEntitySpawn ( idDict args ) : bool
InitAsyncNetwork ( ) : void
InitClientDeclRemap ( int clientIndex ) : void
InitConsoleCommands ( ) : void
InitCvars ( ) : void
LoadMap ( string mapName, int randomSeed ) : void
MapPopulate ( ) : void
RandomizeInitialSpawns ( ) : void
SpawnMapEntities ( ) : void

Parses textual entity definitions out of an entstring and spawns gentities.

Method Details

CacheDictionaryMedia() public méthode

This is called after parsing an EntityDef and for each entity spawnArgs before merging the entitydef. It could be done post-merge, but that would avoid the fast pre-cache check associated with each entityDef.
public CacheDictionaryMedia ( idDict dict ) : void
dict idDict
Résultat void

CalculateFieldOfView() public méthode

Calculates the horizontal and vertical field of view based on a horizontal field of view and custom aspect ratio.
public CalculateFieldOfView ( float baseFov, float &fovX, float &fovY ) : void
baseFov float
fovX float
fovY float
Résultat void

Draw() public méthode

public Draw ( int clientIndex ) : bool
clientIndex int
Résultat bool

FindEntityDef() public méthode

public FindEntityDef ( string name, bool makeDefault ) : idDeclEntity
name string
makeDefault bool
Résultat idTech4.Text.Decl.idDeclEntity

FindEntityDefDict() public méthode

public FindEntityDefDict ( string name, bool makeDefault ) : idDict
name string
makeDefault bool
Résultat idDict

FindEntityUsingDef() public méthode

Searches all active entities for the next one using the specified entityDef.
Searches beginning at the entity after from, or the beginning if NULL NULL will be returned if the end of the list is reached.
public FindEntityUsingDef ( idEntity from, string match ) : idEntity
from idEntity
match string
Résultat idEntity

GetBestGameType() public méthode

public GetBestGameType ( string map, string gameType ) : string
map string
gameType string
Résultat string

GetMapLoadingInterface() public méthode

public GetMapLoadingInterface ( string defaultInterface ) : string
defaultInterface string
Résultat string

GetTimeGroupTime() public méthode

public GetTimeGroupTime ( int timeGroup ) : int
timeGroup int
Résultat int

HandleGuiCommands() public méthode

public HandleGuiCommands ( string menuCommand ) : string
menuCommand string
Résultat string

HandleMainMenuCommands() public méthode

public HandleMainMenuCommands ( string menuCommand, idUserInterface gui ) : void
menuCommand string
gui idTech4.UI.idUserInterface
Résultat void

Init() public méthode

public Init ( ) : void
Résultat void

InitFromNewMap() public méthode

public InitFromNewMap ( string mapName, idRenderWorld renderWorld, idSoundWorld soundWorld, bool isServer, bool isClient, int randomSeed ) : void
mapName string
renderWorld idTech4.Renderer.idRenderWorld
soundWorld idTech4.Sound.idSoundWorld
isServer bool
isClient bool
randomSeed int
Résultat void

RegisterEntity() public méthode

public RegisterEntity ( idEntity entity ) : void
entity idEntity
Résultat void

RunFrame() public méthode

public RunFrame ( idUserCommand userCommands ) : GameReturn
userCommands idTech4.Input.idUserCommand
Résultat GameReturn

SelectInitialSpawnPoint() public méthode

spectators are spawned randomly anywhere. in-game clients are spawned based on distance to active players (randomized on the first half) upon map restart, initial spawns are used (randomized ordered list of spawns flagged "initial"). if there are more players than initial spots, overflow to regular spawning.
public SelectInitialSpawnPoint ( idPlayer player ) : idEntity
player idTech4.Game.Entities.idPlayer
Résultat idEntity

SelectTimeGroup() public méthode

public SelectTimeGroup ( int timeGroup ) : void
timeGroup int
Résultat void

ServerClientBegin() public méthode

public ServerClientBegin ( int clientIndex ) : void
clientIndex int
Résultat void

ServerClientConnect() public méthode

public ServerClientConnect ( int clientIndex, string guid ) : void
clientIndex int
guid string
Résultat void

ServerSendChatMessage() public méthode

public ServerSendChatMessage ( int to, string name, string text ) : void
to int
name string
text string
Résultat void

SetLocalClient() public méthode

public SetLocalClient ( int clientIndex ) : void
clientIndex int
Résultat void

SetPersistentPlayerInformation() public méthode

public SetPersistentPlayerInformation ( int clientIndex, idDict playerInfo ) : void
clientIndex int
playerInfo idDict
Résultat void

SetServerInfo() public méthode

public SetServerInfo ( idDict serverInfo ) : void
serverInfo idDict
Résultat void

SetUserInformation() public méthode

public SetUserInformation ( int clientIndex, idDict userInfo, bool isClient, bool canModify ) : idDict
clientIndex int
userInfo idDict
isClient bool
canModify bool
Résultat idDict

SpawnEntityDef() public méthode

public SpawnEntityDef ( idDict args, bool setDefaults = true ) : idEntity
args idDict
setDefaults bool
Résultat idEntity

SpawnPlayer() public méthode

public SpawnPlayer ( int clientIndex ) : void
clientIndex int
Résultat void

idGame() public méthode

public idGame ( ) : System
Résultat System