From 0fceb1cf1ab9887040f08f0abf646ef318a65ae3 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Tue, 5 Aug 2008 21:37:33 +0000 Subject: added documentation --- docs/output/files2/e_if_mods-h.html | 71 +++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 docs/output/files2/e_if_mods-h.html (limited to 'docs/output/files2/e_if_mods-h.html') diff --git a/docs/output/files2/e_if_mods-h.html b/docs/output/files2/e_if_mods-h.html new file mode 100644 index 00000000..3929a2d8 --- /dev/null +++ b/docs/output/files2/e_if_mods-h.html @@ -0,0 +1,71 @@ + + +Server Hooks + + + + + + + + + +

Server Hooks

Summary
Server Hooks
Functions
mods_console_initTODO
mods_initCalled when the server is started.
mods_shutdownCalled when the server quits.
mods_client_enterCalled when a client has joined the game.
mods_client_dropCalled when a client drops from the server.
mods_client_direct_inputCalled when the server recives new input from a client.
mods_client_predicted_inputCalled when the server applys the predicted input on the client.
mods_tickCalled with a regular interval to progress the gameplay.
mods_presnapCalled before the server starts to construct snapshots for the clients.
mods_snapCalled to create the snapshot for a client.
mods_postsnapCalled after the server is done sending the snapshots.
mods_connectedTODO
mods_net_versionTODO
mods_versionTODO
mods_messageTODO
+ +

Functions

+ +

mods_console_init

void mods_console_init()

TODO

+ +

mods_init

void mods_init()

Called when the server is started.

Remarks

It’s called after the map is loaded so all map items are available.

+ +

mods_shutdown

void mods_shutdown()

Called when the server quits.

Remarks

Should be used to clean up all resources used.

+ +

mods_client_enter

void mods_client_enter(int cid)

Called when a client has joined the game.

Arguments

cidClient ID.  Is 0 - MAX_CLIENTS.

Remarks

It’s called when the client is finished loading and should enter gameplay.

+ +

mods_client_drop

void mods_client_drop(int cid)

Called when a client drops from the server.

Arguments

cidClient ID.  Is 0 - MAX_CLIENTS
+ +

mods_client_direct_input

void mods_client_direct_input(int cid,
void *input)

Called when the server recives new input from a client.

Arguments

cidClient ID.  Is 0 - MAX_CLIENTS.
inputPointer to the input data.
sizeSize of the data.  (NOT IMPLEMENTED YET)
+ +

mods_client_predicted_input

void mods_client_predicted_input(int cid,
void *input)

Called when the server applys the predicted input on the client.

Arguments

cidClient ID.  Is 0 - MAX_CLIENTS.
inputPointer to the input data.
sizeSize of the data.  (NOT IMPLEMENTED YET)
+ +

mods_tick

void mods_tick()

Called with a regular interval to progress the gameplay.

Remarks

The SERVER_TICK_SPEED tells the number of ticks per second.

+ +

mods_presnap

void mods_presnap()

Called before the server starts to construct snapshots for the clients.

+ +

mods_snap

void mods_snap(int cid)

Called to create the snapshot for a client.

Arguments

cidClient ID.  Is 0 - MAX_CLIENTS.

Remarks

The game should make a series of calls to snap_new_item to construct the snapshot for the client.

+ +

mods_postsnap

void mods_postsnap()

Called after the server is done sending the snapshots.

+ +

mods_connected

void mods_connected(int client_id)

TODO

Arguments

arg1desc

Returns

See Also

<other_func>

+ +

mods_net_version

const char *mods_net_version()

TODO

Arguments

arg1desc

Returns

See Also

<other_func>

+ +

mods_version

const char *mods_version()

TODO

Arguments

arg1desc

Returns

See Also

<other_func>

+ +

mods_message

void mods_message(int msg,
int client_id)

TODO

Arguments

arg1desc

Returns

See Also

<other_func>

+ +
+ + + + + + + + + + +
void mods_console_init()
TODO
void mods_init()
Called when the server is started.
void mods_shutdown()
Called when the server quits.
void mods_client_enter(int cid)
Called when a client has joined the game.
void mods_client_drop(int cid)
Called when a client drops from the server.
void mods_client_direct_input(int cid,
void *input)
Called when the server recives new input from a client.
void mods_client_predicted_input(int cid,
void *input)
Called when the server applys the predicted input on the client.
void mods_tick()
Called with a regular interval to progress the gameplay.
void mods_presnap()
Called before the server starts to construct snapshots for the clients.
void mods_snap(int cid)
Called to create the snapshot for a client.
void mods_postsnap()
Called after the server is done sending the snapshots.
void mods_connected(int client_id)
TODO
const char *mods_net_version()
TODO
const char *mods_version()
TODO
void mods_message(int msg,
int client_id)
TODO
void *snap_new_item(int type,
int id,
int size)
Creates a new item that should be sent.
+ + + + +
Close
+ + + \ No newline at end of file -- cgit 1.4.1