Permalink
Browse files

See description

Add changes from 8001043 to fakebody and knockout
  • Loading branch information...
Bara committed Oct 27, 2018
1 parent 60ba96b commit cde0ef4f86c3f8a3f6775a1240799572fb978fc2
@@ -146,13 +146,17 @@ bool SpawnFakeBody(int client)
DispatchKeyValue(iEntity, "targetname", sName);
SetEntProp(iEntity, Prop_Data, "m_nSolidType", SOLID_VPHYSICS);
SetEntProp(iEntity, Prop_Data, "m_CollisionGroup", COLLISION_GROUP_PLAYER);
SetEntityMoveType(iEntity, MOVETYPE_NONE);
AcceptEntityInput(iEntity, "DisableMotion");
if (DispatchSpawn(iEntity))
{
pos[2] -= 16.0;
TeleportEntity(iEntity, pos, NULL_VECTOR, NULL_VECTOR);
SetEntProp(iEntity, Prop_Data, "m_CollisionGroup", COLLISION_GROUP_DEBRIS_TRIGGER);
AcceptEntityInput(iEntity, "EnableMotion");
SetEntityMoveType(iEntity, MOVETYPE_VPHYSICS);
int iRagdollC[Ragdolls];
iRagdollC[Ent] = EntIndexToEntRef(iEntity);
@@ -239,6 +239,8 @@ void KnockoutPlayer(int client)
DispatchKeyValue(iEntity, "model", sModel);
SetEntProp(iEntity, Prop_Data, "m_nSolidType", SOLID_VPHYSICS);
SetEntProp(iEntity, Prop_Data, "m_CollisionGroup", COLLISION_GROUP_PLAYER);
SetEntityMoveType(iEntity, MOVETYPE_NONE);
AcceptEntityInput(iEntity, "DisableMotion");
char sName[24];
Format(sName, sizeof(sName), "knockout_ragdoll_%d", GetClientUserId(client));
@@ -249,6 +251,8 @@ void KnockoutPlayer(int client)
pos[2] -= 16.0;
TeleportEntity(iEntity, pos, NULL_VECTOR, NULL_VECTOR);
SetEntProp(iEntity, Prop_Data, "m_CollisionGroup", COLLISION_GROUP_DEBRIS_TRIGGER);
AcceptEntityInput(iEntity, "EnableMotion");
SetEntityMoveType(iEntity, MOVETYPE_VPHYSICS);
g_iRagdoll[client] = iEntity;
g_bKnockout[client] = true;

0 comments on commit cde0ef4

Please sign in to comment.