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 +}