Defines |
|
#define | GET_CLIENT_FLAGS(_O_) ((_O_)->flags[0] & 0x7f) |
|
#define | NO_FACE_SEND (-1) |
| #define | AddIfInt(Old, New, Type) |
| #define | AddIfInt64(Old, New, Type) |
| #define | AddIfShort(Old, New, Type) |
| #define | AddIfChar(Old, New, Type) |
| #define | AddIfFloat(Old, New, Type) |
| #define | AddIfString(Old, New, Type) |
| #define | map_clearcell(_cell_) |
Functions |
| static void | parse_srv_setup (char *param, char *cmdback, int type) |
| void | SetUp (char *buf, int len, socket_struct *ns) |
| void | AddMeCmd (char *buf, int len, socket_struct *ns) |
| void | PlayerCmd (char *buf, int len, player *pl) |
| void | ReplyCmd (char *buf, int len, player *pl) |
| static void | version_mismatch_msg (socket_struct *ns) |
| void | RequestFileCmd (char *buf, int len, socket_struct *ns) |
| void | VersionCmd (char *buf, int len, socket_struct *ns) |
| void | MoveCmd (char *buf, int len, player *pl) |
| void | send_query (socket_struct *ns, uint8 flags, char *text) |
| void | add_skill_to_skilllist (object *skill, StringBuffer *sb) |
| void | esrv_update_skills (player *pl) |
| void | esrv_update_stats (player *pl) |
| void | esrv_new_player (player *pl, uint32 weight) |
| static int | get_tiled_map_id (player *pl, struct mapdef *map) |
| static void | copy_lastmap (socket_struct *ns, int dx, int dy) |
| void | draw_client_map (object *pl) |
| static const char * | get_playername_color (object *pl, object *op) |
| void | draw_client_map2 (object *pl) |
| void | ShopCmd (char *buf, int len, player *pl) |
| void | QuestListCmd (char *data, int len, player *pl) |
| void | command_clear_cmds (char *buf, int len, socket_struct *ns) |
| void | SetSound (char *buf, int len, socket_struct *ns) |
| void | command_move_path (uint8 *buf, int len, player *pl) |
| void | cmd_ready (uint8 *buf, int len, player *pl) |
| void | command_fire (uint8 *buf, int len, player *pl) |
| void | cmd_keepalive (char *buf, int len, socket_struct *ns) |
| void | cmd_password_change (uint8 *buf, int len, player *pl) |
Variables |
| static int | darkness_table [] = {0, 10, 30, 60, 120, 260, 480, 960} |
This file implements all of the goo on the server side for handling clients. It's got a bunch of global variables for keeping track of each of the clients.
- Note:
- All functions that are used to process data from the client have the prototype of (char *data, int datalen, int client_num). This way, we can use one dispatch table.
Definition in file request.c.
| void esrv_update_stats |
( |
player * |
pl | ) |
|
Sends player statistics update.
We look at the old values, and only send what has changed.
Stat mapping values are in newclient.h
Since this gets sent a lot, this is actually one of the few binary commands for now.
Definition at line 694 of file request.c.
| static const char* get_playername_color |
( |
object * |
pl, |
|
|
object * |
op |
|
) |
| [static] |
Figure out player name color for the client to show, in HTML notation.
As you can see in this function, it is easy to add new player name colors, just check for the match and make it return the correct color.
- Parameters:
-
| pl | Player object that will get the map data sent to. |
| op | Player object on the map, to get the name from. |
- Returns:
- The color.
Definition at line 1192 of file request.c.