feat(Features): Added no ragdoll looped feature
This commit is contained in:
parent
cefbf16488
commit
2d7db48b53
@ -1,4 +1,3 @@
|
||||
#include "common.hpp"
|
||||
#include "features.hpp"
|
||||
#include "logger.hpp"
|
||||
#include "natives.hpp"
|
||||
@ -9,6 +8,7 @@ namespace big
|
||||
void features::run_tick()
|
||||
{
|
||||
god_mode();
|
||||
no_ragdoll();
|
||||
}
|
||||
|
||||
void features::script_func()
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "common.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "structs/player.hpp"
|
||||
#include "structs/temp.hpp"
|
||||
#include "features/notify.hpp"
|
||||
@ -23,5 +24,6 @@ namespace big
|
||||
void script_func();
|
||||
|
||||
void god_mode();
|
||||
void no_ragdoll();
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "features.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
|
24
BigBaseV2/src/features/no_ragdoll.cpp
Normal file
24
BigBaseV2/src/features/no_ragdoll.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include "features.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool bLastNoRagdoll = false;
|
||||
|
||||
void features::no_ragdoll()
|
||||
{
|
||||
bool bNoRagdoll = g_settings.options["ragdoll"].get<bool>();
|
||||
|
||||
if (bNoRagdoll || (!bNoRagdoll && bNoRagdoll != bLastNoRagdoll))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||
{
|
||||
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||
|
||||
PED::SET_PED_CAN_RAGDOLL(player, !bNoRagdoll);
|
||||
PED::SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(player, !bNoRagdoll);
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
|
||||
bLastNoRagdoll = bNoRagdoll;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user