mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-12 13:31:33 +00:00
Fix some crashes
This commit is contained in:
parent
c7dd6ee04b
commit
4bafbcdd07
@ -317,6 +317,7 @@ public:
|
||||
CCSBot(); // constructor initializes all values to zero
|
||||
|
||||
public:
|
||||
virtual int ObjectCaps( void ) { return CBaseMonster :: ObjectCaps() | FCAP_DONT_SAVE; }
|
||||
virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType); // invoked when injured by something (EXTEND) - returns the amount of damage inflicted
|
||||
virtual void Killed(entvars_t *pevAttacker, int iGib); // invoked when killed (EXTEND)
|
||||
virtual void RoundRespawn();
|
||||
|
@ -1618,12 +1618,12 @@ bool BotChatterInterface::ShouldSpeak() const
|
||||
|
||||
float BotChatterInterface::GetRadioSilenceDuration()
|
||||
{
|
||||
return m_radioSilenceInterval[ m_me->m_iTeam - 1 ].GetElapsedTime();
|
||||
return 0;// m_radioSilenceInterval[ m_me->m_iTeam - 1 ].GetElapsedTime();
|
||||
}
|
||||
|
||||
void BotChatterInterface::ResetRadioSilenceDuration()
|
||||
{
|
||||
m_radioSilenceInterval[m_me->m_iTeam - 1].Reset();
|
||||
// m_radioSilenceInterval[0].Reset();
|
||||
}
|
||||
|
||||
inline void SayWhere(BotStatement *say, Place place)
|
||||
|
@ -156,9 +156,15 @@ void CCSBot::StartLearnProcess()
|
||||
|
||||
if (!GetGroundHeight(&pos, &pos.z, &normal))
|
||||
{
|
||||
g_pGameRules->GetPlayerSpawnSpot( this );
|
||||
//pev->origin.z += 30;
|
||||
pos = pev->origin;
|
||||
SnapToGrid(&pos.x);
|
||||
SnapToGrid(&pos.y);
|
||||
GetGroundHeight(&pos, &pos.z, &normal);
|
||||
CONSOLE_ECHO("ERROR: Start position invalid\n\n");
|
||||
m_processMode = PROCESS_NORMAL;
|
||||
return;
|
||||
//m_processMode = PROCESS_NORMAL;
|
||||
//return;
|
||||
}
|
||||
|
||||
m_currentNode = new CNavNode(&pos, &normal);
|
||||
|
@ -782,6 +782,8 @@ void CHalfLifeMultiplay::PlayerSpawn( CBasePlayer *pPlayer )
|
||||
{
|
||||
BOOL addDefault;
|
||||
CBaseEntity *pWeaponEntity = NULL;
|
||||
if( pPlayer->IsBot() )
|
||||
pPlayer->m_state = STATE_SPAWNED;
|
||||
|
||||
if( pPlayer->m_state == STATE_UNINITIALIZED )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user