mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 12:40:42 +00:00
Added the "map" GIB event to qw-server.
This commit is contained in:
parent
c07891826a
commit
34f3970847
3 changed files with 8 additions and 0 deletions
|
@ -29,7 +29,10 @@
|
||||||
$Id$
|
$Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "QF/gib_thread.h"
|
||||||
|
|
||||||
extern gib_event_t *sv_chat_e;
|
extern gib_event_t *sv_chat_e;
|
||||||
extern gib_event_t *sv_client_connect_e;
|
extern gib_event_t *sv_client_connect_e;
|
||||||
extern gib_event_t *sv_client_disconnect_e;
|
extern gib_event_t *sv_client_disconnect_e;
|
||||||
extern gib_event_t *sv_client_spawn_e;
|
extern gib_event_t *sv_client_spawn_e;
|
||||||
|
extern gib_event_t *sv_map_e;
|
||||||
|
|
|
@ -51,6 +51,7 @@ gib_event_t *sv_chat_e;
|
||||||
gib_event_t *sv_client_connect_e;
|
gib_event_t *sv_client_connect_e;
|
||||||
gib_event_t *sv_client_disconnect_e;
|
gib_event_t *sv_client_disconnect_e;
|
||||||
gib_event_t *sv_client_spawn_e;
|
gib_event_t *sv_client_spawn_e;
|
||||||
|
gib_event_t *sv_map_e;
|
||||||
|
|
||||||
static client_t *
|
static client_t *
|
||||||
SV_GIB_GetClient (int uid)
|
SV_GIB_GetClient (int uid)
|
||||||
|
@ -152,4 +153,5 @@ SV_GIB_Init (void)
|
||||||
sv_client_connect_e = GIB_Event_New ("client.connect");
|
sv_client_connect_e = GIB_Event_New ("client.connect");
|
||||||
sv_client_disconnect_e = GIB_Event_New ("client.disconnect");
|
sv_client_disconnect_e = GIB_Event_New ("client.disconnect");
|
||||||
sv_client_spawn_e = GIB_Event_New ("client.spawn");
|
sv_client_spawn_e = GIB_Event_New ("client.spawn");
|
||||||
|
sv_map_e = GIB_Event_New ("map");
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@ static __attribute__ ((unused)) const char rcsid[] =
|
||||||
#include "pmove.h"
|
#include "pmove.h"
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
#include "sv_progs.h"
|
#include "sv_progs.h"
|
||||||
|
#include "sv_gib.h"
|
||||||
#include "world.h"
|
#include "world.h"
|
||||||
|
|
||||||
info_t *localinfo; // local game info
|
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);
|
Info_SetValueForKey (svs.info, "map", sv.name, !sv_highchars->int_val);
|
||||||
Con_DPrintf ("Server spawned.\n");
|
Con_DPrintf ("Server spawned.\n");
|
||||||
|
if (sv_map_e->func)
|
||||||
|
GIB_Event_Callback (sv_map_e, 1, server);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue