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
+1 -1
View File
@@ -30,7 +30,7 @@ END_RECV_TABLE()
void C_VoteController::RecvProxy_VoteType( const CRecvProxyData *pData, void *pStruct, void *pOut )
{
C_VoteController *pMe = (C_VoteController *)pStruct;
if( pMe->m_iActiveIssueIndex == pData->m_Value.m_Int )
if( memcmp( &pMe->m_iActiveIssueIndex, &pData->m_Value.m_Int, sizeof(pData->m_Value.m_Int)) == 0 )
return;
memcpy( &pMe->m_iActiveIssueIndex, &pData->m_Value.m_Int, sizeof(pData->m_Value.m_Int) );
+3 -1
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 )