mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-09 10:49:28 +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
|
namespace big
|
||||||
{
|
{
|
||||||
static bool bLastNoRagdoll = false;
|
|
||||||
|
|
||||||
void looped::self_no_ragdoll()
|
void looped::self_no_ragdoll()
|
||||||
{
|
{
|
||||||
bool bNoRagdoll = g.self.no_ragdoll;
|
|
||||||
Ped player = PLAYER::PLAYER_PED_ID();
|
Ped player = PLAYER::PLAYER_PED_ID();
|
||||||
|
|
||||||
if ((bNoRagdoll && PED::IS_PED_RUNNING_RAGDOLL_TASK(player)) || (!bNoRagdoll && bNoRagdoll != bLastNoRagdoll))
|
PED::SET_PED_CAN_RAGDOLL(player, !g.self.no_ragdoll);
|
||||||
{
|
PED::SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(player, !g.self.no_ragdoll);
|
||||||
if (ENTITY::GET_ENTITY_HEIGHT_ABOVE_GROUND(player) < 1.0)
|
PED::SET_PED_RAGDOLL_ON_COLLISION(player, !g.self.no_ragdoll);
|
||||||
TASK::CLEAR_PED_TASKS_IMMEDIATELY(player);
|
|
||||||
|
|
||||||
bLastNoRagdoll = bNoRagdoll;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user