From 431bfbb4d978801e437b2963342dae688c61c52d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Bergstr=C3=B6m?= Date: Mon, 22 Mar 2004 11:44:47 +0000 Subject: [PATCH] Updated set_entity_visibility --- plugins/include/engine_stocks.inc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/include/engine_stocks.inc b/plugins/include/engine_stocks.inc index 99cb8f11..f000a6c5 100755 --- a/plugins/include/engine_stocks.inc +++ b/plugins/include/engine_stocks.inc @@ -195,13 +195,7 @@ stock set_entity_flags(ent,flag,onoff) /* If visible = 1, entity will be set to be visible, else invisible. */ stock set_entity_visibility(entity, visible = 1) { - new effects = entity_get_int(entity, EV_INT_effects) - if (visible == 1) - effects &= ~EF_NODRAW - else - effects |= EF_NODRAW - - entity_set_int(entity, EV_INT_effects, effects) + entity_set_int(entity, EV_INT_effects, visible == 1 ? entity_get_int(entity, EV_INT_effects) & ~EF_NODRAW : entity_get_int(entity, EV_INT_effects) | EF_NODRAW) return 1 }