Fixed ragdolls being removed in spawn event when removal is disabled.
This commit is contained in:
parent
4e68b52301
commit
7cad0b6281
@ -174,6 +174,13 @@ bool:RespawnSpawnClient(client, bool:zombie = false, bool:zombieIfSuicide = fals
|
|||||||
// Restore respawn condition.
|
// Restore respawn condition.
|
||||||
RespawnRestoreCondition(condition, zombie, zombieIfSuicide);
|
RespawnRestoreCondition(condition, zombie, zombieIfSuicide);
|
||||||
|
|
||||||
|
new bool:ragdollremove = GetConVarBool(g_hCvarsList[CVAR_VEFFECTS_RAGDOLL_REMOVE]);
|
||||||
|
if (!ragdollremove)
|
||||||
|
{
|
||||||
|
// Detatch ragdoll so it's not removed on respawn.
|
||||||
|
RagdollResetClientRagdoll(client);
|
||||||
|
}
|
||||||
|
|
||||||
// Spawn player.
|
// Spawn player.
|
||||||
CS_RespawnPlayer(client);
|
CS_RespawnPlayer(client);
|
||||||
|
|
||||||
|
@ -179,3 +179,12 @@ RagdollGetClientRagdoll(client)
|
|||||||
{
|
{
|
||||||
return GetEntDataEnt2(client, g_iToolsRagdoll);
|
return GetEntDataEnt2(client, g_iToolsRagdoll);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the ragdoll entity of a client.
|
||||||
|
* @param client The client index.
|
||||||
|
*/
|
||||||
|
RagdollResetClientRagdoll(client)
|
||||||
|
{
|
||||||
|
SetEntDataEnt2(client, g_iToolsRagdoll, -1);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user