Bug allows users to clip through events [EO3]

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.


           ' 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


               ' 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.

Well, is this fixed in newer versions of the engine? Would be interesting to know, nice find though.

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

I figured it out. I’ll post the bug fix soon

Log in to reply