diff --git a/qw/include/sv_gib.h b/qw/include/sv_gib.h index 227871c6b..221602588 100644 --- a/qw/include/sv_gib.h +++ b/qw/include/sv_gib.h @@ -29,7 +29,10 @@ $Id$ */ +#include "QF/gib_thread.h" + extern gib_event_t *sv_chat_e; extern gib_event_t *sv_client_connect_e; extern gib_event_t *sv_client_disconnect_e; extern gib_event_t *sv_client_spawn_e; +extern gib_event_t *sv_map_e; diff --git a/qw/source/sv_gib.c b/qw/source/sv_gib.c index 636b11233..9b32627ca 100644 --- a/qw/source/sv_gib.c +++ b/qw/source/sv_gib.c @@ -51,6 +51,7 @@ gib_event_t *sv_chat_e; gib_event_t *sv_client_connect_e; gib_event_t *sv_client_disconnect_e; gib_event_t *sv_client_spawn_e; +gib_event_t *sv_map_e; static client_t * SV_GIB_GetClient (int uid) @@ -152,4 +153,5 @@ SV_GIB_Init (void) sv_client_connect_e = GIB_Event_New ("client.connect"); sv_client_disconnect_e = GIB_Event_New ("client.disconnect"); sv_client_spawn_e = GIB_Event_New ("client.spawn"); + sv_map_e = GIB_Event_New ("map"); } diff --git a/qw/source/sv_init.c b/qw/source/sv_init.c index d6d33f27a..33f8e93b1 100644 --- a/qw/source/sv_init.c +++ b/qw/source/sv_init.c @@ -51,6 +51,7 @@ static __attribute__ ((unused)) const char rcsid[] = #include "pmove.h" #include "server.h" #include "sv_progs.h" +#include "sv_gib.h" #include "world.h" info_t *localinfo; // local game info @@ -427,6 +428,8 @@ SV_SpawnServer (const char *server) Info_SetValueForKey (svs.info, "map", sv.name, !sv_highchars->int_val); Con_DPrintf ("Server spawned.\n"); + if (sv_map_e->func) + GIB_Event_Callback (sv_map_e, 1, server); } void