feat(HornBoost): Don't boost unless driver
This commit is contained in:
parent
80f5d727ff
commit
53ceb16a0d
@ -1,7 +1,7 @@
|
|||||||
#include "backend/looped/looped.hpp"
|
#include "backend/looped/looped.hpp"
|
||||||
#include "gta/enums.hpp"
|
#include "gta/enums.hpp"
|
||||||
#include "natives.hpp"
|
#include "natives.hpp"
|
||||||
#include "util/math.hpp"
|
#include "util/entity.hpp"
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
@ -11,12 +11,13 @@ namespace big
|
|||||||
|
|
||||||
if (PAD::IS_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_VEH_HORN))
|
if (PAD::IS_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_VEH_HORN))
|
||||||
{
|
{
|
||||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
|
Ped ped = PLAYER::PLAYER_PED_ID();
|
||||||
|
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(ped, false);
|
||||||
|
|
||||||
if (veh == 0) return;
|
if (veh == 0) return;
|
||||||
|
if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(veh, -1, 0) != ped) return;
|
||||||
|
|
||||||
Vector3 velocity = ENTITY::GET_ENTITY_VELOCITY(veh) * 1.05f;
|
Vector3 velocity = ENTITY::GET_ENTITY_VELOCITY(veh) * 1.05f;
|
||||||
|
|
||||||
ENTITY::SET_ENTITY_VELOCITY(veh, velocity.x, velocity.y, velocity.z - 0.5f);
|
ENTITY::SET_ENTITY_VELOCITY(veh, velocity.x, velocity.y, velocity.z - 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user