Angles can make you run faster than your normalspeed

Status
Not open for further replies.

Rumia1

Backseat Developer
Now granted this is a 1-3 Fracunit difference, but when coding in lua and you're trying to pull the player's speed for certain things this can be huge.

It seems that the closer your character is to pointing towards a 45-degree angle, the more they can pass their normalspeed as demonstrated with the attached Lua script (this script disables the Speedcap, yes the speed cap was never intended to be disabled but it should still count as a bug), the Lua script works with any character and is also reproducable with any character.

SgW5yqa.gif
 

Attachments

  • speedcapremover.lua
    393 bytes · Views: 255
I'd like to say that that GIF is a pretty bad example of the issue due to the speed-unlimiting (but still a somewhat valid example). As you said, though, in completely vanilla gameplay there does occur a 1-3 FracUnit speed difference. (I just want to make sure people understand this is also a (very, very minor) issue in vanilla SRB2.)
 
Wow, those could act like speed boosters and (perhaps if pulled off correctly) be used for MACH SPEED SECTIONS
man, i'm mesmerised by how sonic blasts off into the distance, I just can't help but go "WEEEEEEEEE"

A rare occasion where a bug may not only be useful, but absolutely FUN (but a bug nonetheless)

P.S: may we have a download for the speedcap removal? sounds like fun
 
The player itself doesn't move any faster diagonally; however, the calculation for player->speed uses P_AproxDistance, which is not completely precise. Whether or not it matters enough to fix is debatable (it's a one-line change, but also doesn't affect anything in the vanilla game) but if you need a way now to get the precise speed value, just use R_PointToDist2(0, 0, player.rmomx, player.rmomy)
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top