Menu

#91 Allow certain actions while paralyzed

analyzed
nobody
server (84)
8
2019-01-05
2006-09-09
No

Currently one can't even talk in a channel while
paralyzed, it would be nice to allow limited actions
such as that.

Discussion

  • Mark Wedel

    Mark Wedel - 2007-02-07

    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.

     
  • Kevin Zheng

    Kevin Zheng - 2014-04-12
    • status: open --> analyzed
    • Group: -->
    • Priority: 5 --> 8
     

Log in to post a comment.

MongoDB Logo MongoDB