Browse Source

Fix crash

gravgun
mittorn 8 years ago
parent
commit
22d9421b0b
  1. 1
      dlls/crossbow.cpp
  2. 6
      dlls/gateofbabylon.cpp

1
dlls/crossbow.cpp

@ -53,6 +53,7 @@ class CCrossbowBolt : public CBaseEntity
SetTouch( &CCrossbowBolt::BoltTouch ); SetTouch( &CCrossbowBolt::BoltTouch );
UTIL_MakeVectors( attacker->pev->v_angle + attacker->pev->punchangle); UTIL_MakeVectors( attacker->pev->v_angle + attacker->pev->punchangle);
pev->angles = UTIL_VecToAngles(gpGlobals->v_forward); pev->angles = UTIL_VecToAngles(gpGlobals->v_forward);
SetThink( &CCrossbowBolt::BubbleThink );
} }
return 2000; return 2000;
} }

6
dlls/gateofbabylon.cpp

@ -104,7 +104,7 @@ private:
void EXPORT FollowPlayerThink( void ); void EXPORT FollowPlayerThink( void );
bool FireBolts( void ); bool FireBolts( void );
CGateOfBabylon *m_pGates; EHBasePlayerItem m_pGates;
Vector m_vecOffset; Vector m_vecOffset;
float m_flNextNPThrow; float m_flNextNPThrow;
float m_flLastTimeAnim; float m_flLastTimeAnim;
@ -347,6 +347,8 @@ float CGateOfBabylonBolt::TouchGravGun(CBaseEntity *attacker, int stage)
SetTouch( &CGateOfBabylonBolt::BoltTouch ); SetTouch( &CGateOfBabylonBolt::BoltTouch );
UTIL_MakeVectors( attacker->pev->v_angle + attacker->pev->punchangle); UTIL_MakeVectors( attacker->pev->v_angle + attacker->pev->punchangle);
pev->angles = UTIL_VecToAngles(-gpGlobals->v_forward); pev->angles = UTIL_VecToAngles(-gpGlobals->v_forward);
UTIL_SetOrigin( pev, pev->origin );
SetThink( &CGateOfBabylonBolt::BubbleThink );
} }
return 2000; return 2000;
} }
@ -413,7 +415,7 @@ void CGateOfBabylonSpawner::FollowPlayerThink( void )
if( !m_pGates ) if( !m_pGates )
return; // wait for gates return; // wait for gates
if( m_pGates->m_pPlayer->pev->deadflag > DEAD_NO ) if( !m_pGates->m_pPlayer || m_pGates->m_pPlayer->pev->deadflag > DEAD_NO )
{ {
SetThink( &CBaseEntity::SUB_Remove ); SetThink( &CBaseEntity::SUB_Remove );
return; return;

Loading…
Cancel
Save