Update player_building.java

This commit is contained in:
AconiteX
2021-09-02 21:25:15 -04:00
parent 654a54e902
commit 1671ffca4e
@@ -950,15 +950,18 @@ public class player_building extends script.base_script
}
}
}
if (!utils.hasScriptVar(target, "vertical.min_height") || !utils.hasScriptVar(target, "vertical.max_height"))
if(!isGod(self)) // fix for allowing moving static items indoors UP/DOWN in god mode
{
sendSystemMessage(self, new string_id(STF, "error_move_item"));
return SCRIPT_CONTINUE;
}
if (new_y < utils.getFloatScriptVar(target, "vertical.min_height") || new_y > utils.getFloatScriptVar(target, "vertical.max_height"))
{
sendSystemMessage(self, new string_id(STF, "not_valid_location"));
return SCRIPT_CONTINUE;
if (!utils.hasScriptVar(target, "vertical.min_height") || !utils.hasScriptVar(target, "vertical.max_height"))
{
sendSystemMessage(self, new string_id(STF, "error_move_item"));
return SCRIPT_CONTINUE;
}
if (new_y < utils.getFloatScriptVar(target, "vertical.min_height") || new_y > utils.getFloatScriptVar(target, "vertical.max_height"))
{
sendSystemMessage(self, new string_id(STF, "not_valid_location"));
return SCRIPT_CONTINUE;
}
}
}
else if (target != intendedTarget)