I've run into this more than once, especially in my current game where I design a ship in a shipyard, enter a test sector, then I materialize in a asteroid. For whatever reason, hitting "UP" (the 'E' key) doesn't free my avatar. The fact a player gets stuck at all is a problem to begin with. A player could spawn later in the game and find out that a wall has been build on/in them, or they get stuck when roaming around a ship that's being built in a shipyard.
So, here's what I propose: The server (and/or client) could check to see if any part of the player is stuck in an object, and, if it is, move them into an open area of at least 2x2x2 in size. In a perfect world, a check would be done to see if there is an open path to exit the entity, either through a door that the character has permission to control, or just an open hole/hall. But that requires a bit more processing time. This code could also be used to ensure NPCs don't get stuck inside a structure as well.
If the player is still stuck, then the menu that pops up in the client when the player hits the "ESC" key should have an additional option "Unstick Player" or something to that effect. What this option would do is teleport the player 6 blocks outside of the upper boundary of the entity they are in (and at least 6 squares away from any other entity). Although, special handling of planets would have to be done to prevent spawning inside the core (just spawn 6 blocks above the highest peak). Following with how other MMO's handle this, it would need a cool down period (30 seconds), and also take about 20 to activate after being triggers, just in case you're trying to use it as a cheap way to escape combat. This will prevent payers from being stuck inside of stations in areas where they are unable to use a door, and so they don't have to resort to using a torch to escape.
So, here's what I propose: The server (and/or client) could check to see if any part of the player is stuck in an object, and, if it is, move them into an open area of at least 2x2x2 in size. In a perfect world, a check would be done to see if there is an open path to exit the entity, either through a door that the character has permission to control, or just an open hole/hall. But that requires a bit more processing time. This code could also be used to ensure NPCs don't get stuck inside a structure as well.
If the player is still stuck, then the menu that pops up in the client when the player hits the "ESC" key should have an additional option "Unstick Player" or something to that effect. What this option would do is teleport the player 6 blocks outside of the upper boundary of the entity they are in (and at least 6 squares away from any other entity). Although, special handling of planets would have to be done to prevent spawning inside the core (just spawn 6 blocks above the highest peak). Following with how other MMO's handle this, it would need a cool down period (30 seconds), and also take about 20 to activate after being triggers, just in case you're trying to use it as a cheap way to escape combat. This will prevent payers from being stuck inside of stations in areas where they are unable to use a door, and so they don't have to resort to using a torch to escape.