CheeseLord / warts

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

Server doesn't log a warning when you issue an order to a unit that once existed, but has been deleted #46

Closed kronmillerg closed 7 years ago

kronmillerg commented 7 years ago

To reproduce: order_del one of your pandas and then issue an order_move to it. The server should be logging:

WARNING  game...ager Invalid argument to message from client ___: order_del_message_tuple(unitId=(___, ___))
    No such unit 

but for some reason it doesn't.

kronmillerg commented 7 years ago

We do have a check for this, and the warning does seem to happen for a unit that never existed. So presumably the problem is that gameState.isUnitIdValid is wrongly returning True. Are we failing to properly removeUnit a unit when its order_del resolves?

kronmillerg commented 7 years ago

Cannot reproduce. Possibly I mixed up the bitmasks when I first thought I encountered it (for example, typed '1' for unit 1 but actually got unit log2(1) = 0)? Closing until someone finds a way to reproduce it consistently.