This is an effect of how paralyze is done on the server.
When paralyzed, the server sets the player speed_left to a negative number to represent how long to be paralyzed from.
In the socket code, if the player speed_left is negative (thus, they don't have an action), the server doesn't read any commands from the client.
This could be fixed, but would require a complete redo of the server side command processing.
Basically, what would need to do is:
1) Set up a link listed of pending player commands.
2) Whenever there is input from the player, read all commands and put them at the end of that link list.
3) On every tick, traverse that list (maybe store last position we've traversed so far) and look for 'free' commands, like chat, shout, etc. A nice plus is that other meta commands could be added, like 'discard all commands before this one' such that if player is paralyzed or lagged, may not want previous commands executed now (it could also be useful to cancel commands when player dies, etc). Remove the freebie commands from list as processed.
4) If player does have speed_left, then process commands at start of list until no speed left.
the only disadvantage is you could get some out of ordering issues. Eg, player does command to identifies someone items, and does a chat to say it is done, but gets paralyzed before the identification happens. However, since the chat is a free command, the message still shows up that the stuff has been identified.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=98826
Originator: NO
This is an effect of how paralyze is done on the server.
When paralyzed, the server sets the player speed_left to a negative number to represent how long to be paralyzed from.
In the socket code, if the player speed_left is negative (thus, they don't have an action), the server doesn't read any commands from the client.
This could be fixed, but would require a complete redo of the server side command processing.
Basically, what would need to do is:
1) Set up a link listed of pending player commands.
2) Whenever there is input from the player, read all commands and put them at the end of that link list.
3) On every tick, traverse that list (maybe store last position we've traversed so far) and look for 'free' commands, like chat, shout, etc. A nice plus is that other meta commands could be added, like 'discard all commands before this one' such that if player is paralyzed or lagged, may not want previous commands executed now (it could also be useful to cancel commands when player dies, etc). Remove the freebie commands from list as processed.
4) If player does have speed_left, then process commands at start of list until no speed left.
the only disadvantage is you could get some out of ordering issues. Eg, player does command to identifies someone items, and does a chat to say it is done, but gets paralyzed before the identification happens. However, since the chat is a free command, the message still shows up that the stuff has been identified.