Page 1 of 1

Pet movement or possibly owner crash

Posted: Mon Apr 10, 2017 4:45 am
by Gangrenous
Starting to get this while testing. It seems to happen when camping only, at least from testing. The crash dump shows this line being the culprit.

Code: Select all

// If owner is a player and player has stay set then return out
	if (GetBody()->GetOwner()->IsPlayer() && ((Player*)GetBody()->GetOwner())->GetInfoStruct()->pet_movement == 1)
		return;
Could this have to do with the pet being around but the owner camping out?

Re: Pet movement or possibly owner crash

Posted: Mon Apr 10, 2017 3:10 pm
by Jabantiz
If the player is gone but the pet is still in the world then the GetOwner() will not be valid and crash. This was a bug a while back but I thought it was fixed as I forcefully nuked pets when a player was zoning/camping. You can put a check above that to see if owner is valid but I have a feeling the check will pass in most cases and still crash.

Re: Pet movement or possibly owner crash

Posted: Mon Apr 10, 2017 3:16 pm
by Gangrenous
I did that earlier today and I pretty much think it fixed it. Waiting on someone to check it since I am out of town.