FortressCraft Evolved

FortressCraft Evolved

steveman0's Jump Boots
Wariat117 25 Mar, 2019 @ 1:57am
Bug Report
I have found small bug with your mod.

If player uses other mod which changes similar stats (jump height, fall dmg) and player unequips your boots + equips item from the other mod, then your mod will keep resetting the stats to default -> effectively blocking other mod from changing those 2 stats

(also worth to note that name of other mod starts with A-S, because of this the other mod is executed first and your mod is second)




I have managed to fix problem by changing your code into:
private void HandleSuitUpgrades(ModVerifySuitUpgradeParameters parameters) { bool flag = parameters.Player.mInventory.GetSuitOnlyItemCount(JumpBootsMod.JumpBootsID) > 0; if (flag) { WorldScript.instance.mWorldData.mrJumpSpeed = 5.2f; WorldScript.instance.localPlayerInstance.mrFallDamageScaling = 0.85f; Check=true; } else if(Check) { WorldScript.instance.mWorldData.mrJumpSpeed = 3f; WorldScript.instance.localPlayerInstance.mrFallDamageScaling = 1f; Check=false; } }

the "Check" is private variable outside of the function, it's in the "JumpBootsMod", just like your "JumpBootsID"
private bool Check=false;


Feel free to use this one or find other fix.
This one isn't perfect, but this way the bug fixes itself instantly once player picks up any block or moves anything in inventory after he removed your boots.
Last edited by Wariat117; 25 Mar, 2019 @ 1:59am