mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-06 01:23:35 +08:00
fix(GravityGun): Cast to float to prevent compile warns
This commit is contained in:
parent
c2dd750560
commit
20d21e6800
@ -5,7 +5,7 @@ namespace big
|
|||||||
static Entity entity = 0;
|
static Entity entity = 0;
|
||||||
static Vector3 location;
|
static Vector3 location;
|
||||||
static Vector3 other;
|
static Vector3 other;
|
||||||
static double dist;
|
static float dist;
|
||||||
|
|
||||||
static const int scroll = 2;
|
static const int scroll = 2;
|
||||||
static const int controls[] = { 14, 15, 24 };
|
static const int controls[] = { 14, 15, 24 };
|
||||||
@ -45,7 +45,7 @@ namespace big
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
other = ENTITY::GET_ENTITY_COORDS(entity, true);
|
other = ENTITY::GET_ENTITY_COORDS(entity, true);
|
||||||
dist = functions::distance_between_vectors(location, other);
|
dist = (float)functions::distance_between_vectors(location, other);
|
||||||
|
|
||||||
if (dist > 50)
|
if (dist > 50)
|
||||||
{
|
{
|
||||||
@ -93,7 +93,7 @@ namespace big
|
|||||||
velocity.y = location.y + (dist * sin(yaw) * cos(pitch)) - other.y;
|
velocity.y = location.y + (dist * sin(yaw) * cos(pitch)) - other.y;
|
||||||
velocity.z = location.z + (dist * sin(pitch)) - other.z;
|
velocity.z = location.z + (dist * sin(pitch)) - other.z;
|
||||||
|
|
||||||
ENTITY::SET_ENTITY_VELOCITY(entity, velocity.x * multiplier, velocity.y * multiplier, velocity.z * multiplier);
|
ENTITY::SET_ENTITY_VELOCITY(entity, velocity.x * (float)multiplier, velocity.y * (float)multiplier, velocity.z * (float)multiplier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (entity != 0)
|
else if (entity != 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user