cell AMX_NATIVE_CALL Natives::GetDynamicVehicleRotationQuat(AMX *amx, cell *params)
{
	CHECK_PARAMS(5, "GetDynamicVehicleRotationQuat");
	boost::unordered_map<int, Item::SharedVehicle>::iterator v = core->getData()->vehicles.find(static_cast<int>(params[1]));
	if (v != core->getData()->vehicles.end())
	{
		float w, x, y, z;
		boost::unordered_map<int, int>::iterator i = core->getData()->internalVehicles.find(v->first);
		if (i != core->getData()->internalVehicles.end())
		{
			GetVehicleRotationQuat(i->second, &w, &x, &y, &z);
		}
		else
		{
			w = v->second->qw;
			x = v->second->qx;
			y = v->second->qy;
			z = v->second->qz;
		}
		Utility::storeFloatInNative(amx, params[2], w);
		Utility::storeFloatInNative(amx, params[3], x);
		Utility::storeFloatInNative(amx, params[4], y);
		Utility::storeFloatInNative(amx, params[5], z);
		return 1;
	}
	return 0;
}
Exemple #2
0
	bool GetRotationQuat(float &w, float &x, float &y, float &z) const
		{ return GetVehicleRotationQuat(id_, &w, &x, &y, &z); }
Exemple #3
0
	bool GetRotationQuat(float *w, float *x, float *y, float *z) const
		{ return GetVehicleRotationQuat(id_, w, x, y, z); }