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

Bug allows users to clip through events [EO3]


Justin Knight
 Share

Recommended Posts

Players are able to walk through events (even if they don't have walkthough checked) because it only checks for events on the client side of the game. I found the code that I need to have check for events on the server side but I'm not sure what If statement I need to make/ how to word it. 

Here's one of the 4 cases I'd need to change.
```
Case DIR_LEFT

           ' Check to make sure not outside of boundries
           If GetPlayerX(index) > 0 Then

               ' Check to make sure that the tile is walkable
               If Not isDirBlocked(Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index)).DirBlock, DIR_LEFT + 1) Then
                   If Map(GetPlayerMap(index)).Tile(GetPlayerX(index) - 1, GetPlayerY(index)).Type <> TILE_TYPE_BLOCKED Then
                       If Map(GetPlayerMap(index)).Tile(GetPlayerX(index) - 1, GetPlayerY(index)).Type <> TILE_TYPE_RESOURCE Then

                           ' Check to see if the tile is a key and if it is check if its opened
                           If Map(GetPlayerMap(index)).Tile(GetPlayerX(index) - 1, GetPlayerY(index)).Type <> TILE_TYPE_KEY Or (Map(GetPlayerMap(index)).Tile(GetPlayerX(index) - 1, GetPlayerY(index)).Type = TILE_TYPE_KEY And temptile(GetPlayerMap(index)).DoorOpen(GetPlayerX(index) - 1, GetPlayerY(index)) = YES) Then

                               'move player
                                   Call SetPlayerX(index, GetPlayerX(index) - 1)
                                   SendPlayerMove index, movement, sendToSelf
                                   Moved = YES

                           End If
                       End If
                   End If
               End If

           Else

               ' Check to see if we can move them to the another map
               If Map(GetPlayerMap(index)).Left > 0 Then
                   NewMapX = Map(Map(GetPlayerMap(index)).Left).MaxX
                   Call PlayerWarp(index, Map(GetPlayerMap(index)).Left, NewMapX, GetPlayerY(index))
                   Moved = YES
                   ' clear their target
                   TempPlayer(index).target = 0
                   TempPlayer(index).targetType = TARGET_TYPE_NONE
                   SendTarget index
               End If
           End If
```
In case you want to know how players can clip through events, They just have to walk in to the event while holding ctrl. Keep holding the arrow key and ctrl, and close the game. Still holding arrowkey+ctrl log back in and the player should be inside of the event or past it.
Link to comment
Share on other sites

No one ever took the time to really look into the event system's code since it was barbarically made, so i wouldn't be surprised if it wasn't fixed.

Regardless, all you need to do is check to see if there is an event in the direction you're facing, if so, check to see if it is solid, if so, then exit sub. simple as that. yall can figure out the rest
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...