dragonfly
dragonfly copied to clipboard
Player move method doesn't keep position locked, causing potential race conditions
This turns out to be a bit harder than initially expected, because the player handler has to be called in the middle of the Move method. This means that any call during that handler that accesses the player position would result in a deadlock if we kept that position locked for the duration of the method.
What if we only pass deltas to HandleMove, so we don't have to lock before HandleMove is called