diff options
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/main.h | 6 | ||||
| -rw-r--r-- | src/base/server.c | 16 | ||||
| -rw-r--r-- | src/base/shot.c | 7 |
3 files changed, 9 insertions, 20 deletions
diff --git a/src/base/main.h b/src/base/main.h index 4ae7540..cf380cd 100644 --- a/src/base/main.h +++ b/src/base/main.h @@ -23,11 +23,9 @@ #ifndef __WIN32__ #define PATH_SEPARATOR "/" -#else +#else /* __WIN32__ */ #define PATH_SEPARATOR "\\" -#endif - -#define UNUSED(var) if (0 && var) {} +#endif /* __WIN32__ */ extern char *getParam(char *s); extern char *getParamElse(char *s1, char *s2); diff --git a/src/base/server.c b/src/base/server.c index 5c75d1f..6f26859 100644 --- a/src/base/server.c +++ b/src/base/server.c @@ -152,14 +152,12 @@ static void eventDelClientFromListClient(client_t *client) list_del_item(listClient, offset, server_udp_destroy_client); } -static void delZombieCLient(void *p_nothink) +static void delZombieCLient(void *p_nothing) { client_t *thisClient; my_time_t currentTime; int i; - UNUSED(p_nothink); - currentTime = timer_get_current_time(); for (i = 0; i < listClient->count; i++) { @@ -182,17 +180,15 @@ static void delZombieCLient(void *p_nothink) } } -static void eventPeriodicSyncClient(void *p_nothink) +static void eventPeriodicSyncClient(void *p_nothing) { client_t *thisClientSend; tux_t *thisTux; int i; - UNUSED(p_nothink); - #ifndef PUBLIC_SERVER proto_send_newtux_server(PROTO_SEND_ALL_SEES_TUX, NULL, world_get_control_tux(TUX_CONTROL_KEYBOARD_RIGHT)); -#endif +#endif /* PUBLIC_SERVER */ for (i = 0; i < listClient->count; i++) { thisClientSend = (client_t *) listClient->list[i]; @@ -207,10 +203,8 @@ static void eventPeriodicSyncClient(void *p_nothink) } } -static void eventSendPingClients(void *p_nothink) +static void eventSendPingClients(void *p_nothing) { - UNUSED(p_nothink); - proto_send_ping_server(PROTO_SEND_ALL, NULL); } @@ -277,7 +271,7 @@ void server_send_client(client_t *p, char *msg) assert(msg != NULL); if (p->status != NET_STATUS_ZOMBIE) { - int ret = -1; /* no warnings */ + int ret = -1; #ifndef PUBLIC_SERVER if (isParamFlag("--send")) { diff --git a/src/base/shot.c b/src/base/shot.c index 168e889..0d30750 100644 --- a/src/base/shot.c +++ b/src/base/shot.c @@ -175,7 +175,7 @@ void shot_draw_list(list_t *listShot) static int getRandomCourse(int x, int y) { - int ret = -1; /* no warnings */ + int ret = -1; do { switch (random() % 3) { @@ -233,6 +233,7 @@ void shot_transform_lasser(shot_t *shot) shot->img = g_shot_lasserX; #endif /* PUBLIC_SERVER */ break; + case TUX_UP: case TUX_DOWN: shot->w = GUN_SHOT_VERTICAL; @@ -253,8 +254,6 @@ static void action_moveShot(space_t *space, shot_t *shot, void *p) int new_x, new_y; arena_t *arena; - UNUSED(p); - arena = arena_get_current(); new_x = shot->x + shot->px; @@ -288,8 +287,6 @@ static int isValueInList(list_t *list, int x) static void action_check(space_t *space, shot_t *shot, client_t *client) { - UNUSED(space); - if (isValueInList(client->listSeesShot, shot->id) == 0) { list_add(client->listSeesShot, newInt(shot->id)); proto_send_shot_server(PROTO_SEND_ONE, client, shot); |