Interesting bug with Shapebase Repair
by Vince Gee · in Torque 3D Professional · 03/16/2012 (6:36 am) · 3 replies
It is possible for a player to get blown up by a mine, fall back into a health kit, die mid tick and then have a health kit heal them leaving them in Dead mode with a standing player.
It might not sound possible, but when you speed the engine up, it happens, so what I end up with is the players old body standing where they died, they get a new body, and if you shoot either body, they both take damage.
The solution was to go to line 1217 in ShapeBase.cpp
and change it to
this fix prevents the health kit from healing a disabled player.
Vince
It might not sound possible, but when you speed the engine up, it happens, so what I end up with is the players old body standing where they died, they get a new body, and if you shoot either body, they both take damage.
The solution was to go to line 1217 in ShapeBase.cpp
if (mDataBlock->isInvincible == false)
and change it to
if ((mDataBlock->isInvincible == false)&&((mDamageState==Enabled)))
this fix prevents the health kit from healing a disabled player.
Vince
About the author
www.winterleafentertainment.com
#2
03/16/2012 (9:19 am)
Looks like a decent fix. Although the real problem I would think is why is a dead shapebase object able to cause an onCollision callback with item objects?
#3
03/18/2012 (7:20 pm)
Well, when I trace it, it appears they are still alive when the impulse applies, they hit the health pack, then die, then the shapebase repair fires healing them back from the dead. Took me a while to find it.
Torque Owner Demolishun
DemolishunConsulting Rocks!