Thread: [PI] Door Issue (can't open already opened doors)

Results 1 to 3 of 3
  1. #1 [PI] Door Issue (can't open already opened doors) 
    Registered Member Rune Online's Avatar
    Join Date
    Jan 2013
    Posts
    48
    Thanks given
    0
    Thanks received
    3
    Rep Power
    11
    I couldn't find anything about this, if there's already a fix please send me a link.

    From what I understand if a person loads an area with a door opened, the door will be closed to them and be opened to the server. This means they can't open it because it is closed while it is opened, it also can't be closed because it is opened.

    So the door is stuck in a closed state no matter what, unless someone who can see the opened door decides to shut it (not likely). This eventually leads to every door in the game being glitched until the server is restarted.

    Is there a way to fix this?

    Example:

    Person A opens door - leaves the are
    Person B tries to open door - for whatever reason the server thinks its closed and the door code says its opened - door cannot be opened
    Person C was in the same area as Person A when the door was opened - door shows as open to him so he can open/close it as normal

    I hope that explains it enough...
    I am a magic-wielding alien.
    Reply With Quote  
     

  2. #2  
    Official
    RaddTech LLC's Avatar
    Join Date
    Sep 2010
    Age
    27
    Posts
    418
    Thanks given
    39
    Thanks received
    48
    Rep Power
    36
    Quote Originally Posted by Rune Online View Post
    I couldn't find anything about this, if there's already a fix please send me a link.

    From what I understand if a person loads an area with a door opened, the door will be closed to them and be opened to the server. This means they can't open it because it is closed while it is opened, it also can't be closed because it is opened.

    So the door is stuck in a closed state no matter what, unless someone who can see the opened door decides to shut it (not likely). This eventually leads to every door in the game being glitched until the server is restarted.

    Is there a way to fix this?

    Example:

    Person A opens door - leaves the are
    Person B tries to open door - for whatever reason the server thinks its closed and the door code says its opened - door cannot be opened
    Person C was in the same area as Person A when the door was opened - door shows as open to him so he can open/close it as normal

    I hope that explains it enough...
    So change how doors work. Dont just change the object state to players who are in the area. Make sure that you're loading the state of the door when a new player enters an area. This is usually handled in a NewObjects() method or something of the sort that is automatically called when a region is loaded.
    Rise, a MMORPG where you can wager REAL MONEY $$$$

    Coming soon, January 1st, 2019
    http://www.rise-game.com/

    https://www.youtube.com/watch?v=mJ85L3kfUVg

    Spoiler for Dark Rage:
    Attached image
    Reply With Quote  
     

  3. #3  
    Registered Member
    TheChosenOne's Avatar
    Join Date
    Jan 2013
    Posts
    967
    Thanks given
    47
    Thanks received
    161
    Rep Power
    366
    Quote Originally Posted by TheChosenOne View Post
    My guess is that the server keeps track of the doors open/closed state (as should be).
    The code to open the door is only processed when the door is closed.
    At the same time will the code to close the door only be processed when it's open.
    When you open the door, the server sets it to open.
    But if you now log in with another account (or you leave the area and come back), the door will be in its default state (as is in the cache), which is in your case closed.
    The client thinks the door is closed but the server says it's open, therefore the server refuses to open the door.

    The solution is to send the open door to players who enter the area (either by logging in or by walking into the region).
    So, when updating the region check for all the doors in the neighborhood and open or close them (deleting and sending the object for THAT player) depending on their current state.
    Quote Originally Posted by TheChosenOne View Post
    So if the player is in a new region: mapRegion has changed or player has just logged in:
    -Parse all doors in your server (if you have a region(al) system, parse only the doors in the adjacent or same region as the player's region)
    -If you have a region(al) system, skip this step
    -For all the doors you're parsing, delete the object (only send the packet to that player) from the location it's not in and add the object to the location it is in (again, only for that player).
    2 posts from another thread.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 4
    Last Post: 05-17-2012, 02:20 AM
  2. Replies: 14
    Last Post: 11-22-2011, 11:54 AM
  3. Replies: 2
    Last Post: 05-18-2011, 09:49 PM
  4. opening and closing doors
    By Vox' in forum Help
    Replies: 10
    Last Post: 05-31-2009, 12:44 AM
  5. [508] Opening and Closing Doors
    By Neelix in forum Tutorials
    Replies: 12
    Last Post: 05-17-2009, 10:28 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •