Added the "map" GIB event to qw-server.

This commit is contained in:
Brian Koropoff 2003-03-04 03:23:41 +00:00
parent c07891826a
commit 34f3970847
3 changed files with 8 additions and 0 deletions

View file

@ -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;

View file

@ -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");
}

View file

@ -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