mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-07 18:03:34 +08:00
Merge pull request #11 from karifeld/master
feat(Self): Better no ragdoll
This commit is contained in:
commit
2fa3ebd789
@ -3,19 +3,12 @@
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool bLastNoRagdoll = false;
|
||||
|
||||
void looped::self_no_ragdoll()
|
||||
{
|
||||
bool bNoRagdoll = g.self.no_ragdoll;
|
||||
Ped player = PLAYER::PLAYER_PED_ID();
|
||||
|
||||
if ((bNoRagdoll && PED::IS_PED_RUNNING_RAGDOLL_TASK(player)) || (!bNoRagdoll && bNoRagdoll != bLastNoRagdoll))
|
||||
{
|
||||
if (ENTITY::GET_ENTITY_HEIGHT_ABOVE_GROUND(player) < 1.0)
|
||||
TASK::CLEAR_PED_TASKS_IMMEDIATELY(player);
|
||||
|
||||
bLastNoRagdoll = bNoRagdoll;
|
||||
}
|
||||
PED::SET_PED_CAN_RAGDOLL(player, !g.self.no_ragdoll);
|
||||
PED::SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(player, !g.self.no_ragdoll);
|
||||
PED::SET_PED_RAGDOLL_ON_COLLISION(player, !g.self.no_ragdoll);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user