-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make HalfLife 1 support clinet side ragdoll.
- Loading branch information
Showing
9 changed files
with
613 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#pragma once | ||
|
||
#include"APIProxy.h" | ||
#include<cl_entity.h> | ||
|
||
// magic num | ||
#define PhyCorpseFlag1 (753951) | ||
#define PhyCorpseFlag2 (152358) | ||
|
||
#define MAX_ENTITIES 512 | ||
|
||
class CorpseManager | ||
{ | ||
public: | ||
CorpseManager(void); | ||
|
||
// check if the entity is already dead | ||
bool IsEntityDead(cl_entity_t* ent); | ||
|
||
// tells the mgr that the entity died just now. | ||
void EntityDie(cl_entity_t* ent); | ||
|
||
// if entity plays any sequences other than death sequences, | ||
// we tells the mgr this entity is alive. | ||
void EntityRespawn(cl_entity_t* ent); | ||
|
||
// create ragdoll corpse for specified entity | ||
TEMPENTITY* CreateRagdollCorpse(cl_entity_t* ent); | ||
|
||
// check if the entity is a ragdoll corpse (temp entity) | ||
bool IsRagdollCorpse(cl_entity_t* ent); | ||
|
||
private: | ||
// max server side entity count elements | ||
bool _entityDead[MAX_ENTITIES]; | ||
int _corpseIndex = MAX_ENTITIES; | ||
}; | ||
|
||
extern CorpseManager* pgCorpseMgr; |
Oops, something went wrong.