 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
30 #define tolower(C) (((C) >= 'A' && (C) <= 'Z') ? (C)-'A'+'a' : (C))
45 if (dir < 0 || dir >= 9) {
47 "Can't run into a non adjacent square.");
81 if (dir < 0 || dir >= 9) {
83 "Can't fire to a non adjacent square.");
114 if ( !isdigit(*params) ) {
115 if ( strcmp(params,
"stay") == 0 || strcmp(params,
"down") == 0 ) dir=0;
116 else if ( strcmp(params,
"north") == 0 || strcmp(params,
"n") == 0 ) dir=1;
117 else if ( strcmp(params,
"northeast") == 0 || strcmp(params,
"ne") == 0 ) dir=2;
118 else if ( strcmp(params,
"east") == 0 || strcmp(params,
"e") == 0 ) dir=3;
119 else if ( strcmp(params,
"southeast") == 0 || strcmp(params,
"se") == 0 ) dir=4;
120 else if ( strcmp(params,
"south") == 0 || strcmp(params,
"s") == 0 ) dir=5;
121 else if ( strcmp(params,
"southwest") == 0 || strcmp(params,
"sw") == 0 ) dir=6;
122 else if ( strcmp(params,
"west") == 0 || strcmp(params,
"w") == 0 ) dir=7;
123 else if ( strcmp(params,
"northwest") == 0 || strcmp(params,
"nw") == 0 ) dir=8;
126 "Unknown direction to face: %s",params);
130 else dir = atoi(params);
131 if (dir < 0 || dir >= 9) {
133 "Can't face to a non adjacent square.");
void command_face(object *op, const char *params)
Player wants to face a given direction.
void command_run_stop(object *op, const char *params)
Player wants to stop running.
void command_fire(object *op, const char *params)
Player wants to start firing.
void command_run(object *op, const char *params)
Player wants to start running.
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
int move_player(object *op, int dir)
Move player in the given direction.
#define MSG_TYPE_COMMAND_ERROR
Bad syntax/can't use command.
#define MSG_TYPE_COMMAND
Responses to commands, eg, who.
struct player * contr
Pointer to the player which control this object.
uint32_t run_on
Player should keep moving in dir until run is off.
int face_player(object *op, int dir)
Face player in the given direction.
uint32_t fire_on
Player should fire object, not move.
#define NDI_UNIQUE
Print immediately, don't buffer.
void command_fire_stop(object *op, const char *params)
Player wants to stop firing.