Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Position Modification When Updating a Map
#1
Well, you might know that when you update a map and you walk, you sometimes get booted for position modification. This small addon will add a check: if the map is updating you cant move.

Client Side
Add this in the top of any module:
Code:
Public CanMoveNow As Byte

In handledata, find "mapdone". In the bottom of that before Exit Sub, add:
Code:
CanMoveNow = YES

Now anywere in Public Sub SendMap(), add:
Code:
CanMoveNow = NO

Now search for: ' Check if player is trying to move
Replace: Call CheckMovement
with:
Code:
If CanMoveNow = YES Then
            Call CheckMovement
        End If

Thats it!
Reply
#2
DFA Wrote:i was just looking thru these bugfixes...and i had a comment on this one

the provided bugfix slightly cripples performance of your client...
with 32 FPS, thats 32 checks per second of

Code:
If CanMoveNow = YES Then
    Call CheckMovement
End If

so...
why not just add

Code:
GettingMap = True

to Sub SendMap()

above

Call SendData(packet)

Because that wouldn't work.

If you know what you're doing, you could easily re-gain the lost FPS for this very much needed addition.

DFA Wrote:and also...

why add...

Quote:Client Side
Add this in the top of any module:

Public CanMoveNow As Byte

to the top of any module? thats just promoting disorganization...there should be a proper place for Public variables such as modGlobals.mod

Because it can be at the top of any module.
People at Mirage are not like the people you find at Elysium and Eclipse.

Everyone who uses Mirage knows how to organise their own source. Not everyone uses modGlobals, they may find that it is more useful for them to put all their dynamic variable declares at the top of modGameLogic, or they may have their own module for this kind of thing.

Please keep in mind that no-one here requires that kind of 'babying'.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#3
It's still a pointless addition though.



I mean, if you get an error while moving while mapping/map sending then...


Just, stop, moving.
Instead of stopping yourself with code, just.. refrain from pressing the arrow keys.
Reply
#4
Rezeyu Wrote:It's still a pointless addition though.



I mean, if you get an error while moving while mapping/map sending then...


Just, stop, moving.
Instead of stopping yourself with code, just.. refrain from pressing the arrow keys.

It happens to any normal players who are on the map, and it also happens when you warp a moving player to yourself.

It's a very much needed addition to stop an annoying bug.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#5
Ah, I've never seen it before, but I would never map with another player near me, and sure as hell never warp them.
Reply
#6
I noticed when warping people around my game to show off the engine to sell it to them, that if they were moving they would get kicked for position modification so I fixed it already, but forgot to make a tutorial xD
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#7
Well, you know what the Eclipse community was like.

Elysium is only marginally better.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#8
If you want to make this check less, post the last part AFTER
Code:
If IsTryingToMove Then
            If CanMove Then

That way, the check'll only occur if someone's trying to move + can move.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)