View Single Post
  #3  
Old 11-26-2018, 03:13 PM
irongut_av's Avatar
irongut_av
Fire Beetle
 
Join Date: Sep 2018
Posts: 20
Default

I tried both solutions, and the crashes continued.

Finally found out what is causing the crash: the very small time that bots and bot pets remain in the zone after a client is killed.

Adding a these checks to attack.cpp stoped all crashes with bots and large pulls / train deaths:

Code:
#ifdef BOTS
// if other is a bot, add the bots client to the hate list
if(
other->IsBot() 
&& other->CastToBot()->GetBotOwner()  // valid pointer
&& other->CastToBot()->GetBotOwner()->InZone() // is in zone
&& !other->CastToBot()->GetBotOwner()->CastToClient()->IsDead() // isn't dead from the train
)
{

// do stuff to add aggro to bot owning client
}
Reply With Quote