WurmServerModLauncher icon indicating copy to clipboard operation
WurmServerModLauncher copied to clipboard

fix horses getting stuck in zones, and throwing errors in the log

Open Tyoda opened this issue 2 years ago • 0 comments

On my server and test server the hitching post mod kept breaking horses and throwing errors as such:

[05:14:05 DU] WARNING com.wurmonline.server.creatures.Creature: old horse set to 2351,2741 but at 2352,2741
java.lang.Exception
	at com.wurmonline.server.creatures.Creature.setNewTile(Creature.java:843)
	at com.wurmonline.server.zones.VolaTile.addCreature(VolaTile.java:1847)
	at com.wurmonline.server.zones.VolaTile.creatureMoved(VolaTile.java:2889)
	at com.wurmonline.server.zones.VolaTile.creatureMoved(VolaTile.java:2725)
	at com.wurmonline.server.creatures.Creature.moved(Creature.java:12575)
	at com.wurmonline.server.creatures.Creature.followLeader(Creature.java:12182)
	at com.wurmonline.server.creatures.Creature.creatureMoved(Creature.java:5190)
	at com.wurmonline.server.zones.VirtualZone.creatureMoved(VirtualZone.java:1728)
	at com.wurmonline.server.zones.VolaTile.creatureMoved(VolaTile.java:2939)
	at com.wurmonline.server.zones.VolaTile.creatureMoved(VolaTile.java:2725)
	at com.wurmonline.server.creatures.Creature.moved(Creature.java:12551)
	at com.wurmonline.server.creatures.Communicator.movePlayer(Communicator.java:864)
	at com.wurmonline.server.creatures.Communicator.pollNextMove(Communicator.java:1063)
	at com.wurmonline.server.Server.pollComms(Server.java:2664)
	at com.wurmonline.server.Server.run(Server.java:2542)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)

If you find you can reproduce the issue, my commit fixes it.

I looked at what the original unhitching action does and it called the function hitched.positionDragger(), which tinkers with the position and can indicate that something's wrong.

I've yet to actually get the error message in the new if(). The fix works without hindering players' ability to unhitch the creature.

Tyoda avatar Sep 05 '22 11:09 Tyoda