raduprv / Eternal-Lands

http://www.eternal-lands.com
Other
157 stars 57 forks source link

Ranging exp/arrow momentarily inaccurate #146

Closed gamil-zirak closed 3 years ago

gamil-zirak commented 3 years ago

When ranging, the exp/arrows calculation is sometimes too high. I believe this is caused by a delay between the SEND_PARTIAL_STAT message and the MISSILE_FIRE_ATO* messages so that the total number of arrows count is short against the ranging experience.

For both screenshots below, the accurate exp/arrows figure should be 34.

xp_per_arrow_nosync

xp_per_arrow_sync

A fix is in pull request #145.

gvissers commented 3 years ago

I'm sure you the proposed fix is correct, but I'm less certain I understand the root cause.

If the cause is indeed a delay between the handling of the SEND_PARTIAL_STAT message and the MISSILE_FIRE_ATO* message (which is not outside the realm of possibility: the second message places an action on the actor queue, which is only processed after previous actions have finished, while the stats are updated immediately), the wrong rate should only be shown for a moment until the animation is performed, right? [Of course, this is the moment that I realize that your issue title contains the word "momentarily" :facepalm: ]

If that's the case, then

gamil-zirak commented 3 years ago

Thanks for reviewing this. Yes, the exp/arrows is only innacurate for a short time and will change to the correct figure after the animation is performed. It's not a big issue but was certainly noticeable when I was ranging and it wasn't too difficult to get a screenshot of it.

I commited a change to make range_exp_at_shot static. Thanks for pointing that out.

gvissers commented 3 years ago

Merged, thanks!