They should be checking if the damage level is less than or equal to 0 (GameBase::getDamageLevel(%targetPlayer) <= 0), or 0 is less than the damage level (0 < GameBase::getDamageLevel(%targetPlayer), because damage levels are actually floating point (positive or negative numbers with decimal values).Glitch wrote:function Repair(%targetPlayer, %sourcePlayer)function SuperRepairBolt::checkDone(%this, %player)Code: Select all
if(GameBase::getDamageLevel(%targetPlayer))
function RepairBolt::checkDone(%this, %player)Code: Select all
if(GameBase::getDamageLevel(%player) == 0)
function RepairKit::onCollision(%this,%object)Code: Select all
if(GameBase::getDamageLevel(%player) == 0)
Code: Select all
if(GameBase::getDamageLevel(%object) != 0)
I believe this will fix the repair glitch, but I've never been able to successfully demonstrate the glitch myself, so I'm not 100% sure this is the solution. Either way, I am 100% sure this will not make it worse, as it is the proper way to write the code that was intended in the first place.Fix wrote:function Repair(%targetPlayer, %sourcePlayer)function SuperRepairBolt::checkDone(%this, %player)Code: Select all
if(0 < GameBase::getDamageLevel(%targetPlayer))
function RepairBolt::checkDone(%this, %player)Code: Select all
if(GameBase::getDamageLevel(%player) <= 0)
function RepairKit::onCollision(%this,%object)Code: Select all
if(GameBase::getDamageLevel(%player) <= 0)
Code: Select all
if(0 < GameBase::getDamageLevel(%object))