From 9b68c0678a01dd9c9b698309de72d823cc80166a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 11 May 2006 08:45:06 +0000 Subject: [PATCH] merged register_message into core request at29428 --- plugins/include/engine_stocks.inc | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/plugins/include/engine_stocks.inc b/plugins/include/engine_stocks.inc index 3fe61499..773a4a2b 100755 --- a/plugins/include/engine_stocks.inc +++ b/plugins/include/engine_stocks.inc @@ -280,4 +280,32 @@ stock PointContents(Float:fCheckAt[3]) { stock set_size(index, Float:mins[3], Float:maxs[3]) { return entity_set_size(index,mins,maxs) -} \ No newline at end of file +} + +//by Twilight Suzuka, request addition at29428 +//"Lifted from HLSDK" +stock IsInWorld( ent ) +{ + new Float:origin[3] + entity_get_vector(ent,EV_VEC_origin,origin) + + if (origin[0] >= 4096.0) return 0; + if (origin[1] >= 4096.0) return 0; + if (origin[2] >= 4096.0) return 0; + if (origin[0] <= -4096.0) return 0; + if (origin[1] <= -4096.0) return 0; + if (origin[2] <= -4096.0) return 0; + + new Float:velocity[3] + entity_get_vector(ent,EV_VEC_velocity,velocity) + + if (velocity[0] >= 2000) return 0; + if (velocity[1] >= 2000) return 0; + if (velocity[2] >= 2000) return 0; + if (velocity[0] <= -2000) return 0; + if (velocity[1] <= -2000) return 0; + if (velocity[2] <= -2000) return 0; + + return 1; +} +