|
|
@ -538,28 +538,23 @@ void CBasePlayerItem::Materialize( void ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
float CBasePlayerItem::TouchGravGun( CBaseEntity *attacker, int stage ) |
|
|
|
float CBasePlayerItem::TouchGravGun( CBaseEntity *attacker, int stage ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if( stage == 2 ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if( stage == 2 ) |
|
|
|
if( (attacker->pev->origin - pev->origin ).Length() < 90 ) |
|
|
|
{ |
|
|
|
Touch( attacker ); |
|
|
|
if( (attacker->pev->origin - pev->origin ).Length() < 90 ) |
|
|
|
} |
|
|
|
Touch( attacker ); |
|
|
|
if( pev->movetype == MOVETYPE_FOLLOW ) |
|
|
|
} |
|
|
|
return 0; |
|
|
|
if( pev->movetype == MOVETYPE_FOLLOW ) |
|
|
|
if( pev->movetype == MOVETYPE_NONE ) |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
if( pev->movetype == MOVETYPE_NONE ) |
|
|
|
if( pev->effects & EF_NODRAW ) |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
if( pev->effects & EF_NODRAW ) |
|
|
|
SetThink( &CBasePlayerItem::AttemptToMaterialize ); |
|
|
|
return 0; |
|
|
|
pev->nextthink = gpGlobals->time + 60;; |
|
|
|
SetThink( &CBasePlayerItem::AttemptToMaterialize ); |
|
|
|
//if( pev->mins == pev->maxs )
|
|
|
|
pev->nextthink = gpGlobals->time + 60;; |
|
|
|
//return 0;
|
|
|
|
//if( pev->mins == pev->maxs )
|
|
|
|
return 200; |
|
|
|
//return 0;
|
|
|
|
|
|
|
|
return 200; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UTIL_SetOrigin( pev, pev->origin );// link into world.
|
|
|
|
|
|
|
|
SetTouch( &CBasePlayerItem::DefaultTouch); |
|
|
|
|
|
|
|
SetThink( NULL ); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//=========================================================
|
|
|
|
//=========================================================
|
|
|
|