From af5b38cbbd2406d03b06a444726a1eb5c727d138 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sun, 12 Jun 2016 09:34:55 +0000 Subject: [PATCH] Fix build --- dlls/teamplay_gamerules.cpp | 2 +- dlls/weapons.cpp | 37 ++++++++++++++++--------------------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/dlls/teamplay_gamerules.cpp b/dlls/teamplay_gamerules.cpp index 422fc636..c49f607d 100644 --- a/dlls/teamplay_gamerules.cpp +++ b/dlls/teamplay_gamerules.cpp @@ -149,7 +149,7 @@ void CHalfLifeTeamplay :: Think ( void ) //========================================================= BOOL CHalfLifeTeamplay :: ClientCommand( CBasePlayer *pPlayer, const char *pcmd ) { -#ifdef NO_VOICEGAMEMGR +#ifndef NO_VOICEGAMEMGR if(g_VoiceGameMgr.ClientCommand(pPlayer, pcmd)) return TRUE; #endif diff --git a/dlls/weapons.cpp b/dlls/weapons.cpp index 42eff9e0..b7a4df03 100644 --- a/dlls/weapons.cpp +++ b/dlls/weapons.cpp @@ -538,28 +538,23 @@ void CBasePlayerItem::Materialize( void ) } float CBasePlayerItem::TouchGravGun( CBaseEntity *attacker, int stage ) +{ + if( stage == 2 ) { - if( stage == 2 ) - { - if( (attacker->pev->origin - pev->origin ).Length() < 90 ) - Touch( attacker ); - } - if( pev->movetype == MOVETYPE_FOLLOW ) - return 0; - if( pev->movetype == MOVETYPE_NONE ) - return 0; - if( pev->effects & EF_NODRAW ) - return 0; - SetThink( &CBasePlayerItem::AttemptToMaterialize ); - pev->nextthink = gpGlobals->time + 60;; - //if( pev->mins == pev->maxs ) - //return 0; - return 200; - } - - UTIL_SetOrigin( pev, pev->origin );// link into world. - SetTouch( &CBasePlayerItem::DefaultTouch); - SetThink( NULL ); + if( (attacker->pev->origin - pev->origin ).Length() < 90 ) + Touch( attacker ); + } + if( pev->movetype == MOVETYPE_FOLLOW ) + return 0; + if( pev->movetype == MOVETYPE_NONE ) + return 0; + if( pev->effects & EF_NODRAW ) + return 0; + SetThink( &CBasePlayerItem::AttemptToMaterialize ); + pev->nextthink = gpGlobals->time + 60;; + //if( pev->mins == pev->maxs ) + //return 0; + return 200; } //=========================================================