esmBot icon indicating copy to clipboard operation
esmBot copied to clipboard

&speed doesnt get affected by decimals

Open studded1 opened this issue 2 years ago • 3 comments

Describe the bug

for example: &speed 1 and &speed 1.9 will do the same thing. but doing &speed 2 will speed it up. i did this on the dev version so i dont know if it happens in the main bot.

Steps to reproduce

step 1. literally just follow the instructions at the top

Expected behavior

the speed will not change

Screenshots

https://user-images.githubusercontent.com/101254176/157420134-83279c8a-ecb7-436b-a2d7-c524ca79463b.mp4

Self-hosted instance?

No

Additional context

No response

studded1 avatar Mar 09 '22 10:03 studded1

This can probably be fixed from using a float in the speed.cc.

bjcscat avatar Mar 09 '22 14:03 bjcscat

I've looked into it and I don't think that this would be possible. I might be wrong though, someone with more knowledge about this please look into it.

bjcscat avatar Mar 09 '22 14:03 bjcscat

The speed parameter is stored as an int on the native side, so any decimal values are rounded to the largest integer less than that value.

TheEssem avatar Mar 09 '22 15:03 TheEssem

fixed in pr #305

bjcscat avatar Jul 27 '22 05:07 bjcscat