Well, if ent_owner has been removed than it's pointer should be set to NULL.

So simply changing the first if(ent_owner) to if(ent_owner != NULL) , Should fix a crash.
If the local pointer is still set to a value, than ent_remove/ptr_remove has failed as the engine should set it to NULL.

A pointer should not be used as a Boolean anyway.

Unless I'm wrong in something.

Edit - Using the safe_remove macro to remove the owner should fix an error if one still exist because a pointer is still valid.

But can agree that if a beginner doesn't understand pointers they should use handles. Also yes, I would wrap the health bar code right into the owner's action. But Spawn is following the AUM.

I'm am not a beginner lol, I actually forget most the stuff I've learned.

Last edited by DriftWood; 11/16/17 20:34.