Nuclide
Software Development Kit for id Tech
|
Functions | |
void | StartFrame (void) |
Called once every single tic on the server. More... | |
void | ClientConnect (void) |
Called when the client-slot is being prepared for a player. More... | |
void | ClientDisconnect (void) |
Called when a player leaves the server. More... | |
void | ClientKill (void) |
Called by the kill console command. More... | |
void | SpectatorThink (void) |
This is run every frame on every spectator. More... | |
void | SpectatorConnect (void) |
Called when a NSClientSpectator joins the server. More... | |
void | SpectatorDisconnect (void) |
Called when a NSClientSpectator leaves the server. More... | |
void | PutClientInServer (void) |
Called when a player enters the game, having fully connected and loaded into the session. More... | |
void | PlayerPreThink (void) |
Run before game physics have taken place. More... | |
void | PlayerPostThink (void) |
Run after game physics have taken place. More... | |
void | SetNewParms (void) |
Called when we spawn in a new map (both single and multiplayer) with no level change ever having taken place. More... | |
void | SetChangeParms (void) |
Called whenever a single-player level change is about to happen, carrying over data from one level to the next. More... | |
void | SV_RunClientCommand (void) |
Run whenever an input packet by a client has been received. More... | |
void | SV_ParseClientCommand (string cmd) |
Any 'cmd' from the client get sent here and handled. More... | |
void | init (float prevprogs) |
Called when the QC module gets loaded. More... | |
void | init_respawn (void) |
Called inside initents() to make sure the entities have their Respawn() method called at the beginning of them having spawned. More... | |
void | initents (void) |
Called by the engine when we're ready to spawn entities. More... | |
float | ConsoleCmd (string cmd) |
Any command executed on the server (either tty, rcon or sv ) gets sent here first. More... | |
float | SV_ShouldPause (float newstatus) |
Returns TRUE if the server can pause the server when the 'pause' command is being executed. More... | |
void | SV_PerformLoad (float fh, float entcount, float playerslots) |
Called by the engine when we're loading a savegame file. More... | |
void | SV_PerformSave (float fh, float entcount, float playerslots) |
Called when we are saving our game. More... | |
void | CheckSpawn (void() spawnfunc) |
Called by the engine to check with us if a spawn function exists. More... | |
Variables | |
bool | gotData |
entity | g_respawntimer |
Called by the engine to check with us if a spawn function exists.
The self
global refers to an already allocated entity, which we have to remove in case we won't initialize it.
Called when the client-slot is being prepared for a player.
The client may not fully spawn into the world (yet), as they're still loading or receiving packets.
The self
global is the connecting client in question.
Called when a player leaves the server.
At the end of the function the client slot referred to by the self
global will be cleared. This means the fields will still be accessible inside of this function.
Called by the kill
console command.
The self
global is the client issuing the command.
Any command executed on the server (either tty, rcon or sv
) gets sent here first.
When returning FALSE the server will interpret the command. Returning TRUE will mark the command as 'resolved' and the engine will not attempt handling it.
The client-side equivalent is CSQC_ConsoleCommand
(src/client/entry.qc)
Called when the QC module gets loaded.
No entities exist yet and we are unable to allocate any in here. So avoid calling spawn() related functions here.
Called inside initents() to make sure the entities have their Respawn() method called at the beginning of them having spawned.
Called by the engine when we're ready to spawn entities.
Before this, we are not able to spawn, touch or allocate any entity slots.
Run after game physics have taken place.
The self
global refers to a single client, as this function is called times the amount of players in a given game.
Run before game physics have taken place.
The self
global refers to a single client, as this function is called times the amount of players in a given game.
Called when a player enters the game, having fully connected and loaded into the session.
The self
global is the player in question. The 'parmX' globals are also populated with any data carried over from past levels for the player in question.
Called whenever a single-player level change is about to happen, carrying over data from one level to the next.
This is not called with the 'map' command.
The self
global refers to a client that's partaking in the level-change. Make sure we're saving important fields/attributes in the 'parmX' globals allocated for every client.
Called when we spawn in a new map (both single and multiplayer) with no level change ever having taken place.
The self
global does not refer to anything.
Called when a NSClientSpectator joins the server.
The self
global is the connecting NSClientSpectator in question.
Called when a NSClientSpectator leaves the server.
The self
global is the leaving NSClientSpectator in question. Attributes cleared when this function is done executing.
This is run every frame on every spectator.
The self
global refers to one of any given amount of spectator.
Any 'cmd' from the client get sent here and handled.
Unlike ConsoleCommmand() if you want to let the server engine take over, you need to pass the string 'cmd' over via clientcommand().
Notable examples of client cmd's involve the chat system.
Called by the engine when we're loading a savegame file.
This deals with the de and re-allocation of all map entities from the passed file handle.
Called when we are saving our game.
We only get passed a file handle to work with and dump entity data as well as some global info directly into it.
Run whenever an input packet by a client has been received.
The self
global is the entity having sent the input packet, with the input_X globals being set to the appropriate data.
Returns TRUE if the server can pause the server when the 'pause' command is being executed.
entity g_respawntimer |
bool gotData |