CheeseLord / warts

WAcky Real Time Strategy
MIT License
1 stars 0 forks source link

Don't move existing unit when order_new received #18

Closed kronmillerg closed 7 years ago

kronmillerg commented 7 years ago

Currently, when the server receives an order_new, it just blindly issues the given position as an order to that player's only unit. If that player has no unit, then this does the right thing -- it creates a unit at the given location. But if the player has a unit already, then it issues that position as an order to that unit -- circumventing the pathfinding and obstacle/bounds checks. This allows you to move your unit onto walls and outside of the world.

This should be fixed as part of #16, but it was amusing enough I wanted to file a separate issue for it. (Also, this is a bug, while #16 is an enhancement.)