I don't see why you float origin.
Either you use get_user_origin, either you use engine or fakemeta so you retrieve a float vector.
Anyway, xs stock is :
PHP Code:
// Are vectors equal?
// untested, but should work
XS_LIBFUNC_ATTRIB bool:xs_vec_equal(const Float:vec1[], const Float:vec2[])
{
return (vec1[0] == vec2[0]) && (vec1[1] == vec2[1]) && (vec1[2] == vec2[2]);
}
So if you want the same with integer you can use :
PHP Code:
bool:int_vec_equal(const vec1[3], const vec2[3])
{
return (vec1[0] == vec2[0]) && (vec1[1] == vec2[1]) && (vec1[2] == vec2[2]);
}
You could use this for both integer OR floats (not both at the same time) but i don't know how to check if tags match so better not to use :
PHP Code:
bool:vec_equal(const {_,Float}:vec1[3], const {_,Float}:vec2[3])
{
return (vec1[0] == vec2[0]) && (vec1[1] == vec2[1]) && (vec1[2] == vec2[2]);
}
__________________