Skip to content

Commit

Permalink
Fixed an issue that ragdolls turned into static model in cstrike and …
Browse files Browse the repository at this point in the history
…czero. #515
  • Loading branch information
hzqst committed Dec 8, 2024
1 parent a2bf5d4 commit 7e5f4a9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion Plugins/BulletPhysics/ClientEntityManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class CClientEntityManager : public IClientEntityManager

if (IsEntityIndexTempEntity(entindex))
{
return &gTempEnts[entindex].entity;
return &gTempEnts[entindex - ENTINDEX_TEMPENTITY].entity;
}

return nullptr;
Expand Down
2 changes: 0 additions & 2 deletions Plugins/BulletPhysics/privatehook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1440,8 +1440,6 @@ TEMPENTITY *efxapi_R_TempModel(float *pos, float *dir, float *angles, float life

if (r && g_bIsCreatingClCorpse && g_iCreatingClCorpsePlayerIndex > 0 && g_iCreatingClCorpsePlayerIndex <= gEngfuncs.GetMaxClients())
{
int entindex = r - gTempEnts + ENTINDEX_TEMPENTITY;

r->entity.curstate.iuser4 = PhyCorpseFlag;
r->entity.curstate.owner = g_iCreatingClCorpsePlayerIndex;
}
Expand Down

0 comments on commit 7e5f4a9

Please sign in to comment.