Originally Posted by larrybrains
I've been testing a new version of the plugin for a few weeks on my server that basically does what you mentioned. It seems to work about 90% of the time, and the other 10% are situations such as on Parish Map 1 where the 0,0,0 origin is inside the map but above the ground, so the player drops instantly and the plugin may not have time to catch it.
New plugin is attached.
You can exclude maps where you don't want the plugin to run such as c7m3_port by adding a cvar to your server.cfg:
// Maps where the unteleport jockey plugin is disabled because the (0,0,0) origin is inside the map
jockey_unteleport_disabled c6m3_port //Passing finale
jockey_unteleport_disabled c7m3_port //Sacrifice finale
Do you know how hard it is to position yourself exactly at 0, 0, 0?
Also you can check how far away the closest navarea of the player is to determine if the player is out of bounds or not.
* @brief Given a vector position, returns the relative NavArea.
* @remarks This is more reliable than L4D2Direct_GetTerrorNavArea.
* @param vecPos The vector array to use to retrieve the NavArea
* @return The NavArea value, or 0 on failure probably
native any L4D_GetNearestNavArea(const float vecPos);
If the distance between this navmesh and you is > 300.0, I guarantee you that you're out of bounds.
Edit: Forgot falling to death existed. Make sure to account for velocity, pretty sure being stuck is 0, 0, 0 velocity.
Please make it a seperate thread plugin to ensure people find it.