Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

CheckDirection Bug Fix! [IMPORTANT!]


GalacticGlum
 Share

Recommended Posts

Hey guys! 

I was using Skywyre Primitive Edition and noticed that sometimes you get a RTE9 when going into another map (usually a map that is smaller than your current one).
Here's the fix for this bug. 

Thanks @BeNjO for helping me figure out this issue!

Client Side ONLY!

Go to your **CheckDirection** function and under
```
' If debug mode, handle error then exit out

   If Options.Debug = 1 Then On Error GoTo errorhandler

   CheckDirection = False
```
Add this
```
' check directional blocking

   If GetPlayerX(MyIndex) > Map.MaxX Then Exit Function
   If GetPlayerY(MyIndex) > Map.MaxY Then Exit Function
```
That's it! It's fixed.
Your welcome :)
Link to comment
Share on other sites

What I want to know, is what's causing players to go out of bounds from maps anyway. Is movement _really_ that poorly handled?

For good measure, you should probably do a check if Player X/Y is less than 0 and exit out of that case, too.

EDIT: With that said, well, I don't recall this particular bug ever occurring with EO 2/3 (the nature of it would make it happen when walking right/bottom bounds of a map, which is something that definitely would have been picked up within 5 years). Could this possibly just be a chance with Skywyre + co?
Link to comment
Share on other sites

honestly you shouldn't have a bigger and then a smaller map to begin with unless it was to teleport you onto a smaller lets say house map. There shouldn't be a fix for movement but rather a restriction forcing maps that link to be the same size. If you wanted to do seamless mapping dynamic maps wouldn't work correctly with this. It was always a stupid and wasteful concept.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...