From 223a672628feba84c2a37a32ff60f70c86653fc9 Mon Sep 17 00:00:00 2001 From: John Ellis Date: Mon, 2 Aug 2010 03:02:42 +0000 Subject: * Fix target_print entities with private spawn flag 4 from messaging everyone when triggered by a non-player. --- src/game/g_target.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/game') diff --git a/src/game/g_target.c b/src/game/g_target.c index 5346d5b6..53df65cb 100644 --- a/src/game/g_target.c +++ b/src/game/g_target.c @@ -86,9 +86,10 @@ If "private", only the activator gets the message. If no checks, all clients ge */ void Use_Target_Print( gentity_t *ent, gentity_t *other, gentity_t *activator ) { - if( activator && activator->client && ( ent->spawnflags & 4 ) ) + if( ent->spawnflags & 4 ) { - trap_SendServerCommand( activator-g_entities, va( "cp \"%s\"", ent->message ) ); + if( activator && activator->client ) + trap_SendServerCommand( activator-g_entities, va( "cp \"%s\"", ent->message ) ); return; } -- cgit