From a0923e21eddd661abd108ba6ad54c6f6a1627f52 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Sun, 14 May 2006 15:20:25 +0000 Subject: [PATCH] improved using pm's magic (patent pending) --- plugins/include/engine_stocks.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/include/engine_stocks.inc b/plugins/include/engine_stocks.inc index 773a4a2b..58787351 100755 --- a/plugins/include/engine_stocks.inc +++ b/plugins/include/engine_stocks.inc @@ -149,12 +149,10 @@ stock ViewContents(id) stock get_speed(ent) { - new Float:Vel[3], rVel[3] + new Float:Vel[3] entity_get_vector(ent, EV_VEC_velocity, Vel) - for(new i = 0; i < 3; i++) - rVel[i] = floatround(Vel[i]) - return sqroot(rVel[0] * rVel[0] + rVel[1] * rVel[1] + rVel[2] * rVel[2]) + return floatround(vector_length(Vel)) } /* Creates a death message. */