Request am43716 - moved IVecFVec and FVecIVec around
This commit is contained in:
parent
72f59422d5
commit
6a28bc602a
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user