summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_combat.c3
-rw-r--r--src/game/g_local.h1
-rw-r--r--src/game/g_utils.c18
3 files changed, 22 insertions, 0 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index e7024bfb..46a579d1 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -209,6 +209,9 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
killer, self->s.number, meansOfDeath, killerName,
self->client->pers.netname, obit );
+ //TA: close any menus the client has open
+ G_CloseMenus( self->client->ps.clientNum );
+
// broadcast the death event to everyone
ent = G_TempEntity( self->r.currentOrigin, EV_OBITUARY );
ent->s.eventParm = meansOfDeath;
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 7020b8ec..7075ea16 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -605,6 +605,7 @@ void AddRemap(const char *oldShader, const char *newShader, float timeOff
const char *BuildShaderStateConfig();
void G_TriggerMenu( int clientNum, dynMenu_t menu );
+void G_CloseMenus( int clientNum );
//
// g_combat.c
diff --git a/src/game/g_utils.c b/src/game/g_utils.c
index 7d9b362e..50812aac 100644
--- a/src/game/g_utils.c
+++ b/src/game/g_utils.c
@@ -743,6 +743,7 @@ qboolean G_Visible( gentity_t *ent1, gentity_t *ent2 )
return qtrue;
}
+
/*
===============
G_TriggerMenu
@@ -758,6 +759,23 @@ void G_TriggerMenu( int clientNum, dynMenu_t menu )
trap_SendServerCommand( clientNum, buffer );
}
+
+/*
+===============
+G_CloseMenus
+
+Close all open menus on some client
+===============
+*/
+void G_CloseMenus( int clientNum )
+{
+ char buffer[ 32 ];
+
+ Com_sprintf( buffer, 32, "serverclosemenus" );
+ trap_SendServerCommand( clientNum, buffer );
+}
+
+
/*
================
DebugLine