Little tweaks

This commit is contained in:
mittorn 2016-03-26 18:44:18 +00:00
parent 525a6580b1
commit 59e468ef91
5 changed files with 7 additions and 8 deletions

View File

@ -334,7 +334,7 @@ public:
{ {
if( (pev->maxs - pev->mins).Length() > 200 ) if( (pev->maxs - pev->mins).Length() > 200 )
return 0; return 0;
return 200; return 700;
} }
CBaseEntity* DropItem ( char *pszItemName, const Vector &vecPos, const Vector &vecAng );// drop an item. CBaseEntity* DropItem ( char *pszItemName, const Vector &vecPos, const Vector &vecAng );// drop an item.

View File

@ -170,7 +170,7 @@ float CItem::TouchGravGun( CBaseEntity *attacker, int stage)
return 0; return 0;
//if( pev->mins == pev->maxs ) //if( pev->mins == pev->maxs )
//return 0; //return 0;
SetThink( &Materialize ); SetThink( &CItem::Materialize );
pev->nextthink = g_pGameRules->FlItemRespawnTime( this ); pev->nextthink = g_pGameRules->FlItemRespawnTime( this );
return 200; return 200;
} }
@ -185,11 +185,9 @@ void CItem::Materialize( void )
if( m_SpawnPoint == Vector( 0, 0, 0 ) ) if( m_SpawnPoint == Vector( 0, 0, 0 ) )
m_SpawnPoint = pev->origin; m_SpawnPoint = pev->origin;
} }
else if( m_SpawnPoint != Vector( 0, 0, 0 ) ) if( m_SpawnPoint != Vector( 0, 0, 0 ) )
UTIL_SetOrigin( pev, m_SpawnPoint );// blip to whereever you should respawn. UTIL_SetOrigin( pev, m_SpawnPoint );// blip to whereever you should respawn.
DROP_TO_FLOOR(ENT(pev));
SetTouch( &ItemTouch ); SetTouch( &ItemTouch );
} }

View File

@ -157,8 +157,7 @@ public:
virtual float TouchGravGun( CBaseEntity *attacker, int stage ) virtual float TouchGravGun( CBaseEntity *attacker, int stage )
{ {
pev->framerate = 1; return 700;
return 200;
} }
int m_bloodColor; int m_bloodColor;

View File

@ -812,6 +812,8 @@ void CProp::BounceTouch(CBaseEntity *pOther)
if ( m_flNextAttack < gpGlobals->time && pev->velocity.Length() > 300) if ( m_flNextAttack < gpGlobals->time && pev->velocity.Length() > 300)
{ {
if( !m_attacker )
m_attacker = this;
entvars_t *pevOwner = m_attacker->pev; entvars_t *pevOwner = m_attacker->pev;
if (pevOwner) if (pevOwner)
{ {

View File

@ -285,7 +285,7 @@ public:
// int m_iIdPrimary; // Unique Id for primary ammo // int m_iIdPrimary; // Unique Id for primary ammo
// int m_iIdSecondary; // Unique Id for secondary ammo // int m_iIdSecondary; // Unique Id for secondary ammo
Vector m_SpawnPoint = Vector( 0, 0, 0 ); Vector m_SpawnPoint;
virtual float TouchGravGun( CBaseEntity *attacker, int stage) virtual float TouchGravGun( CBaseEntity *attacker, int stage)
{ {
if( stage == 2 ) if( stage == 2 )