From 59e468ef916c2bf5673ccc528fce36c331bba680 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sat, 26 Mar 2016 18:44:18 +0000 Subject: [PATCH] Little tweaks --- dlls/basemonster.h | 2 +- dlls/items.cpp | 6 ++---- dlls/monsters.h | 3 +-- dlls/prop.cpp | 2 ++ dlls/weapons.h | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dlls/basemonster.h b/dlls/basemonster.h index 8d8c7117..ace2222c 100644 --- a/dlls/basemonster.h +++ b/dlls/basemonster.h @@ -334,7 +334,7 @@ public: { if( (pev->maxs - pev->mins).Length() > 200 ) return 0; - return 200; + return 700; } CBaseEntity* DropItem ( char *pszItemName, const Vector &vecPos, const Vector &vecAng );// drop an item. diff --git a/dlls/items.cpp b/dlls/items.cpp index 66ca1def..0b394a58 100644 --- a/dlls/items.cpp +++ b/dlls/items.cpp @@ -170,7 +170,7 @@ float CItem::TouchGravGun( CBaseEntity *attacker, int stage) return 0; //if( pev->mins == pev->maxs ) //return 0; - SetThink( &Materialize ); + SetThink( &CItem::Materialize ); pev->nextthink = g_pGameRules->FlItemRespawnTime( this ); return 200; } @@ -185,11 +185,9 @@ void CItem::Materialize( void ) if( m_SpawnPoint == Vector( 0, 0, 0 ) ) 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. - DROP_TO_FLOOR(ENT(pev)); - SetTouch( &ItemTouch ); } diff --git a/dlls/monsters.h b/dlls/monsters.h index 1985e66f..28e462e9 100644 --- a/dlls/monsters.h +++ b/dlls/monsters.h @@ -157,8 +157,7 @@ public: virtual float TouchGravGun( CBaseEntity *attacker, int stage ) { - pev->framerate = 1; - return 200; + return 700; } int m_bloodColor; diff --git a/dlls/prop.cpp b/dlls/prop.cpp index 823e6695..78181e85 100644 --- a/dlls/prop.cpp +++ b/dlls/prop.cpp @@ -812,6 +812,8 @@ void CProp::BounceTouch(CBaseEntity *pOther) if ( m_flNextAttack < gpGlobals->time && pev->velocity.Length() > 300) { + if( !m_attacker ) + m_attacker = this; entvars_t *pevOwner = m_attacker->pev; if (pevOwner) { diff --git a/dlls/weapons.h b/dlls/weapons.h index 6d857bcf..afde3247 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -285,7 +285,7 @@ public: // int m_iIdPrimary; // Unique Id for primary 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) { if( stage == 2 )