myxal Posted May 23, 2018 Share Posted May 23, 2018 When hosting a single-shard game from the client, the world migrator entities (stairs, sinkholes) are present (can be teleported to using c_gonext), but invisible (no anim, no physics, no placement blocking). Is there a way to enable this behaviour on a dedicated server? When I run a single-shard server, the migrators are visible, and are in their "disconnected" state (stairs are blocked, sinkhole is covered with roots). Link to comment Share on other sites More sharing options...
Daniel86268 Posted May 24, 2018 Share Posted May 24, 2018 c_find("cave_entrance"):Remove() post this a few times till c_countprefabs("cave_entrance") returns 0. (This deletes them though, so only do this if you are absolutely certain that you never gonna use a cave on that map.) Small explanation: Thing with solo worlds is that the game knows that the sinkholes will never be usable, and therefore don't actually need to be there, so might as well keep the space free. A dedicated server on the other hand can connect to a cave shard whenever needed, so the sinkholes and stairs stay in ready mode at all times. Link to comment Share on other sites More sharing options...
myxal Posted May 24, 2018 Author Share Posted May 24, 2018 14 minutes ago, Daniel86268 said: Thing with solo worlds is that the game knows that the sinkholes will never be usable Aye, I was hoping this was replicable in dedicated servers with the shards_enabled option. Looking at the code now, you're right - only client-hosted server can make them disappear. if TheNet:GetServerIsClientHosted() and not (TheShard:IsMaster() or TheShard:IsSlave()) then RemovePhysicsColliders(inst) ... Link to comment Share on other sites More sharing options...
Daniel86268 Posted May 24, 2018 Share Posted May 24, 2018 6 hours ago, myxal said: if TheNet:GetServerIsClientHosted() and not (TheShard:IsMaster() or TheShard:IsSlave()) then RemovePhysicsColliders(inst) ... Looking at the code you found there, it might be possible to disable the Hitbox using a command like (Make sure you do a backup before you do anything like this, because it could mess up your map.) c_find("cave_entrance"):RemovePhysicsColliders() or c_find("cave_entrance").RemovePhysicsColliders() or (Although I find this one unlikely to work) RemovePhysicsColliders(c_find("cave_entrance")) multiple times till all of the portals are without hitbox. Or as a single command: for k,v in pairs(Ents) do if v.prefab == "cave_portal" then v:RemovePhysicsColliders() end end Keep in mind that these effects probably are temporary and reset after each reboot of the server, so you have to issue it after each boot up of the server. Otherwise you'll have to make a mod to do this. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.