path |
client/South() // when i press SOUTH... |
Problem description:
M.reverse is set by a verb, which makes it the opposite of the users current direction.
When they are on the track above (path/) if reverse is set it makes them drive forwards while facing backwards.
The reverse appears to work ok *except* when it meets my lane change (see the client/South() example).
When the mob is on special turf and auto accelerating, and i press SOUTH, it will nudge me down 1 tile. Giving the effect of changing lanes. What happens while im 'reversing' is it still works, but my speed increases. It increases again on top of that the more i do it. I end up flying off to the end of the map if i do it too much.
Obviously i dont want it to do this. I want it to keep M.speed which is either set in walk, or with sleep(). I'm not sure why its acting like this. I have tried tinkering to fix it but nothing worked so far.
Would appreciate some help if anyone glances and can see something up. Ta.
I can't figure out why pressing North/South which calls..
usr.Move(get_step(usr, NORTH), usr.dir) // I pushed UP on my keyboard, while in the path/ turf.and then Entered() in the turf does...
Makes me move at double the speed! walk(M,0) should stop all movement right? So its not like its 'doubling' the Move(). Confused.
I tried adding walk(usr,0) to first code sample. Just incase. No affect.
EDIT:
I was worried it might be doing Entered() twice. So i set a variable so that Entered() would return if it was set. I set it to 1 on Entered() and then 0 on Exited(). Anyway it still doubled my speed... :/ I tried replacing "usr.Move(get_step(usr, NORTH), usr.dir)" with step() and still resulted in the double speed thing.
This ONLY happens when it calls M.Move(). If it uses the walk() part of the code above then the lane switching works as expected.
Really scratching my head on this.