Player Entity Speed Issue...
Displaying 1-8 of 8 total.
1
mcgrue
|
I've run some tests, and it seems that setting the player entity's speed to anything less than 100 causes things to not work as planned. I initially wanted players on the overworld to be speed 32 (tiny characters), but they were hardly moving a pixel per second. After a few tests, anything up to and including 99 seems to produce this same effect.
Integer division, perhaps?
Posted on 2005-06-04 03:46:11
|
Gayo
|
But it works when the player is the airship, right? And it worked for me on an unrelated thing. So it might only be spawned entities or something weird like that.
Posted on 2005-06-04 17:20:33
|
Jesse
|
This seems to work for me with sully in the version that I have (in the overworld). Do you have a testcase I could steal?
Posted on 2005-06-05 13:54:13
|
Gayo
|
http://www.verge-rpg.com/~gayo/speed_bug.rar will give you the error. It turns out it's related to a HookRender that constantly sets the player's speed to a given value. Grue's managed to work around the bug by only having the value set when a change is necessary, but it's still a bug so I decided to upload this anyhow.
Posted on 2005-06-06 10:41:04
|
Jesse
|
Perfect! Well caught, guys. I've fixed this.
The problem was that when you set the speed of an entity, it reset an internal fraction-of-a-pixel-movement accumulator. Since you were moving less than 1 pixel per tick (100 ticks/sec) the accumulator accounted for all the speed. It no longer resets that fractional counter when you set the speed.
Posted on 2005-06-06 11:45:16
|
Gayo
|
You are so fast. Holy crap.
Posted on 2005-06-06 12:22:37
|
mcgrue
|
Oooh, did I call what was happening or what? :D
Posted on 2005-06-06 12:35:38
|
Kildorf
|
Quote:Originally posted by Gayo
You are so fast. Holy crap. Jesse is a scary, scary man. Seriously.
Posted on 2005-06-06 14:06:19
|