summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Millwood <thebenmachine@gmail.com>2009-10-18 01:04:12 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:54 +0000
commit65bca8d34a1d36f0f94d5eb2a8b3368389ecbb58 (patch)
tree1727470894aa5a9fa5d950cabcaab02fa31ba880
parent5c6361f832f9bac5d5fb1f028b5ad4afe163caa2 (diff)
* say_area can only be used while alive
-rw-r--r--src/game/g_cmds.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index cdb81765..8fc9a424 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -763,7 +763,14 @@ static void Cmd_SayArea_f( gentity_t *ent )
if( ent->client->pers.teamSelection == TEAM_NONE )
{
- G_TriggerMenu( ent->client->ps.clientNum, MN_CMD_TEAM );
+ G_TriggerMenu( ent - g_entities, MN_CMD_TEAM );
+ return;
+ }
+
+ if( ent->client->ps.stats[ STAT_HEALTH ] <= 0 ||
+ ent->client->sess.spectatorState != SPECTATOR_NOT )
+ {
+ G_TriggerMenu( ent - g_entities, MN_CMD_LIVING );
return;
}
@@ -2882,7 +2889,7 @@ commands_t cmds[ ] = {
// communication commands
{ "callvote", CMD_MESSAGE, Cmd_CallVote_f },
{ "callteamvote", CMD_MESSAGE|CMD_TEAM, Cmd_CallVote_f },
- { "say_area", CMD_MESSAGE|CMD_TEAM, Cmd_SayArea_f },
+ { "say_area", CMD_MESSAGE|CMD_TEAM|CMD_LIVING, Cmd_SayArea_f },
// can be used even during intermission
{ "say", CMD_MESSAGE|CMD_INTERMISSION, Cmd_Say_f },
{ "say_team", CMD_MESSAGE|CMD_INTERMISSION, Cmd_Say_f },