Add custom model support.

This commit is contained in:
Giegue
2023-02-24 14:49:55 -03:00
parent 513cde6231
commit d4ecb16bf7
29 changed files with 85 additions and 43 deletions

View File

@@ -247,7 +247,7 @@ void CMHeadCrab :: Spawn()
{
Precache( );
SET_MODEL(ENT(pev), "models/headcrab.mdl");
SET_MODEL(ENT(pev), (!FStringNull( pev->model ) ? STRING( pev->model ) : "models/headcrab.mdl"));
UTIL_SetSize(pev, Vector(-12, -12, 0), Vector(12, 12, 24));
pev->solid = SOLID_SLIDEBOX;
@@ -461,7 +461,7 @@ Schedule_t* CMHeadCrab :: GetScheduleOfType ( int Type )
void CMBabyCrab :: Spawn( void )
{
CMHeadCrab::Spawn();
SET_MODEL(ENT(pev), "models/baby_headcrab.mdl");
SET_MODEL(ENT(pev), (!FStringNull( pev->model ) ? STRING( pev->model ) : "models/baby_headcrab.mdl"));
pev->rendermode = kRenderTransTexture;
pev->renderamt = 192;
UTIL_SetSize(pev, Vector(-12, -12, 0), Vector(12, 12, 24));