Handle entvar keyvalues.

This commit is contained in:
Giegue
2023-03-06 20:02:04 -03:00
parent 73f240ddb1
commit bd9fe1f487
9 changed files with 274 additions and 6 deletions

View File

@@ -17,6 +17,8 @@
#include "cmbase.h"
#include "decals.h"
void EntvarsKeyvalue( entvars_t *pev, KeyValueData *pkvd );
extern Vector VecBModelOrigin( entvars_t* pevBModel );
extern DLL_GLOBAL Vector g_vecAttackDir;
@@ -103,6 +105,19 @@ edict_t *CMBaseEntity::CreateEntity(char *classname)
return pent;
}
// process entvar keyvalue
void CMBaseEntity :: KeyValue( KeyValueData* pkvd )
{
if ( !pev || !pkvd )
return;
if ( pkvd->fHandled )
{
// only handled data contain readable strings
EntvarsKeyvalue( pev, pkvd );
}
}
// give health
int CMBaseEntity :: TakeHealth( float flHealth, int bitsDamageType )
{