@Veleran: My guess is since you are applying the explosion to the actor via ("BONE02"), but then delete the actor with Remove(true), you get a crash since it cannot find the actor anymore... Try changing "BONE02" to "" in your death command.
@QoD, or whoever is managing the code at the moment:
The bug is in CPawn.cpp in the destructor (line 119) - We use RemoveActor() instead of the more conservative RemoveActorCheck() (which should also work if there is no Explosion to unattach, from a quick look at the CExplosionInit::UnAttach(...) method) to remove the actor. This causes problems with Explosions attached to the actor.
However, since this problem could also spread to other actor-like entities - since we theoretically can attach explosions to every actor there is - i advocate adding CCD->Explosions()->UnAttach(theActor); to CActorManageR::RemoveActor()... or just call the RemoveActorCheck from inside.
Proposed fix:
At CActorManager.cpp, line 695:
Code: Select all
int CActorManager::RemoveActor(const geActor *theActor)
{
return RemoveActorCheck(theActor);
}
While we are at it, since both the RemoveActor() and the RemoveActorCheck() are very small functions, i advocate changing their signatures to inline, to make sure the compiler inlines them.
CActorManager.cpp, line 695:
Code: Select all
inline int CActorManager::RemoveActor(const geActor *theActor)
CActorManager.cpp, line 707:
Code: Select all
int CActorManager::RemoveActorCheck(const geActor *theActor)
Everyone can see the difficult, but only the wise can see the simple.
-----