From 6a28bc602a3ad4f35be2efd86ad4250f182e2c6f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 1 Sep 2006 01:34:43 +0000 Subject: [PATCH] Request am43716 - moved IVecFVec and FVecIVec around --- plugins/include/engine_stocks.inc | 22 ---------------------- plugins/include/vector.inc | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/plugins/include/engine_stocks.inc b/plugins/include/engine_stocks.inc index c8e13be9..f8cc25f7 100755 --- a/plugins/include/engine_stocks.inc +++ b/plugins/include/engine_stocks.inc @@ -48,28 +48,6 @@ stock find_ent(iStart, szClassname[]) return find_ent_by_class(iStart, szClassname) } -/* Changes an integer vec to a floating vec - * This is not a for loop because that's slower - */ -stock IVecFVec(IVec[3], Float:FVec[3]) -{ - FVec[0] = float(IVec[0]) - FVec[1] = float(IVec[1]) - FVec[2] = float(IVec[2]) - - return 1 -} - -/* Changes a float vec to an integer vec */ -stock FVecIVec(Float:FVec[3], IVec[3]) -{ - IVec[0] = floatround(FVec[0]) - IVec[1] = floatround(FVec[1]) - IVec[2] = floatround(FVec[2]) - - return 1 -} - /* Get the Button(s) user is pressing */ stock get_user_button(id) return entity_get_int(id, EV_INT_button) diff --git a/plugins/include/vector.inc b/plugins/include/vector.inc index a63243f9..1a05ef02 100644 --- a/plugins/include/vector.inc +++ b/plugins/include/vector.inc @@ -35,3 +35,25 @@ native Float:vector_length(Float:vVector[3]); /* Gets the distance between 2 vectors (float[3]). */ native Float:vector_distance(Float:vVector[3], Float:vVector2[3]); + +/* Changes an integer vec to a floating vec + * This is not a for loop because that's slower + */ +stock IVecFVec(IVec[3], Float:FVec[3]) +{ + FVec[0] = float(IVec[0]) + FVec[1] = float(IVec[1]) + FVec[2] = float(IVec[2]) + + return 1 +} + +/* Changes a float vec to an integer vec */ +stock FVecIVec(Float:FVec[3], IVec[3]) +{ + IVec[0] = floatround(FVec[0]) + IVec[1] = floatround(FVec[1]) + IVec[2] = floatround(FVec[2]) + + return 1 +}