Multiple types of command in one EntityEventListener

Lets say I have 2 commands for one entity - movement and skills. When I queue and process only one type of command everything works as expected, and there is no jitter. However when I queue and process two commands suddenly the movement is very jittery with bursts of high and low speed. I believe that this happens because when one command runs with resetState the second one doesn't. Then ExecuteCommands is fed with both types of commands, but second one didnt reset it state and adds up. How can I process multiple types of commands in one entity? Maybe I should make second EntityEventListener? I want to avoid merging everything into one command unless it doesnt have impact on the performance.


  • Some people on the Discord do this, I don't have an example on hand. Personally, I would just put everything in one command, there is no real performance benefit from splitting up commands afaik.
Sign In or Register to comment.