game: small fixes

This commit is contained in:
nillerusr
2022-06-04 23:08:40 +03:00
parent 432a6b2297
commit ac956a9b4f
5 changed files with 26 additions and 8 deletions

View File

@@ -2517,6 +2517,8 @@ LINK_ENTITY_TO_CLASS( trigger_autosave, CTriggerSave );
//-----------------------------------------------------------------------------
void CTriggerSave::Spawn( void )
{
m_minHitPoints = 1;
if ( g_pGameRules->IsDeathmatch() )
{
UTIL_Remove( this );
@@ -2534,7 +2536,7 @@ void CTriggerSave::Spawn( void )
void CTriggerSave::Touch( CBaseEntity *pOther )
{
// Only save on clients
if ( !pOther->IsPlayer() )
if ( !pOther->IsPlayer() || !pOther->IsAlive() )
return;
if ( m_fDangerousTimer != 0.0f )