- Fix a few possible crashes.

- Fix xenmaker sprites never being removed if their framerate is 0.
- Fix xenmaker sprites never showing if their scale is 0.
- Add trigger_setcvar.
- New "health" keyvalue for monsters/monstermaker for custom health.
This commit is contained in:
Giegue
2024-01-10 16:05:40 -03:00
parent 75596ad87e
commit 9f77e10934
39 changed files with 225 additions and 65 deletions

View File

@@ -125,7 +125,7 @@ void CMTurret::Spawn()
{
Precache( );
SET_MODEL(ENT(pev), (!FStringNull( pev->model ) ? STRING( pev->model ) : "models/turret.mdl"));
pev->health = gSkillData.turretHealth;
if (!pev->health) { pev->health = gSkillData.turretHealth; }
m_HackedGunPos = Vector( 0, 0, 12.75 );
m_flMaxSpin = TURRET_MAXSPIN;
pev->view_ofs.z = 12.75;
@@ -165,7 +165,7 @@ void CMMiniTurret::Spawn()
{
Precache( );
SET_MODEL(ENT(pev), (!FStringNull( pev->model ) ? STRING( pev->model ) : "models/miniturret.mdl"));
pev->health = gSkillData.miniturretHealth;
if (!pev->health) { pev->health = gSkillData.miniturretHealth; }
m_HackedGunPos = Vector( 0, 0, 12.75 );
m_flMaxSpin = 0;
pev->view_ofs.z = 12.75;
@@ -1019,7 +1019,7 @@ void CMSentry::Spawn()
{
Precache( );
SET_MODEL(ENT(pev), (!FStringNull( pev->model ) ? STRING( pev->model ) : "models/sentry.mdl"));
pev->health = gSkillData.sentryHealth;
if (!pev->health) { pev->health = gSkillData.sentryHealth; }
m_HackedGunPos = Vector( 0, 0, 48 );
pev->view_ofs.z = 48;
m_flMaxWait = 1E6;