This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
gir489 100de3fee5
Rework Keep Vehicle Repaired to remove damage decals properly. (#2044)
* Keep Vehicle Repaired now uses CDecalManager to remove damage decals which allows it to ignore clan and livery decals.

* Added more conditions to call SET_VEHICLE_FIXED to fix things like the R88 breaking its shell off.
Fixed Seatbelt having inverted conditions.

* Fixed keep_vehicle_repaired repairing things it doesn't need to repair if godmode/always clean is on already.
Fixed spawn_vehicle_json not applying the radio station.

* Consolidated signature for CDecalMgr::ClearDecals and its static instance.
2023-08-28 11:35:17 +02:00

26 lines
562 B
C++

#include "backend/looped_command.hpp"
#include "natives.hpp"
namespace big
{
class seatbelt : looped_command
{
using looped_command::looped_command;
virtual void on_tick() override
{
PED::SET_PED_CONFIG_FLAG(self::ped, 32, false);
PED::SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(self::ped, false);
}
virtual void on_disable() override
{
PED::SET_PED_CONFIG_FLAG(self::ped, 32, true);
PED::SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(self::ped, true);
}
};
seatbelt g_seatbelt("seatbelt", "SEATBELT", "SEATBELT_DESC",
g.vehicle.seatbelt);
}