game_ui Crashing Game

D

Digaag Wa Riz

Question.

I know how to use the game_ui entity extensively. There is, however, a large problem with it. When a player has activated it and leaves the server without deactivating it, the entire game crashes. Is it possible for Valve or some plugin to fix this? If not, Then I need some other way of redirecting player inputs to manipulate certain objects in my map.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,258
999
Is it possible to use a trigger_multiple, optionally with a filter_activator_name if there are other players in the same area, to deactivate the game_ui when the player stops touching it?
 

Freyja

aa
Jul 31, 2009
2,994
5,813
That's what I'd try, like what worMatty suggested.

If a player disconnects from within a trigger, the trigger will fire an OnEndTouch output. You could surround your map with a trigger, and have OnEndTouch > Deactivate. You may have to forward it through a User i/o to get the activator to correctly align with the player.

It should work to deactivate it as they disconnect.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
eh... I have a feeling that won't work. The trigger won't fire until they are gone, and when they are gone it is too late. I don't remember this exact crashing issue, but it might have been the one I had, when I used game_ui for the chairman derby map. I think this is something valve would have to fix.
 
D

Digaag Wa Riz

So I downloaded that plugin and I'm not sure if it works. I put it in the sourcemod/plugins folder of my server folder and the "meta list" command showed all the stuff I needed to know that sourcemod and metamod were correctly installed. Does the plugin need some kind of activation or something? Or maybe it doesn't do what I was hoping it would do.

I think what happens is that the game_ui is still looking for an input from the player when the player disconnects so it doesn't know what to do and has a brain fart that brings the rest of the game down with it. I'm not sure what the plugin is supposed to do to remedy that.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,258
999
All you need to do is what you described - put the SMX file in the plugins dir. I doubt it needs configuring. Are you still having trouble with the game_ui entity when running your map on your server? Are you using an online server or are you running SRCDS locally?
 
D

Digaag Wa Riz

The server appears in the internet tab so I assume it's not local. I run the server on the same computer I play on. I run the server and type console commands in the Windows command prompt. When a player disconnects while controlling the game_ui the command prompt crashes (and so does the server) but tf2 doesn't crash.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,258
999
When you run a local server, your client treats it as if it's on the internet, so the server will show up in your server browser as normal. If you run the server on your computer, it's considered a local server. The server crashing indicates that the plugin isn't doing its job. Maybe it's out of date?
 
D

Digaag Wa Riz

I think it was probably only meant to fix a glitch that would affect the spectator camera and prevent a player from using the game_ui after its current owner disconnects. But if the user disconnects then it should cause a server crash (which is pretty noticeable) but the uploader of the plugin doesn't mention that. Maybe it's only a problem in tf2.