ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.66k stars 615 forks source link

[Request] [Dedicated Server] Implement UpToDateCheck for GoldSrc titles? #1588

Open Mecha-Weasel opened 9 years ago

Mecha-Weasel commented 9 years ago

I am loving the functionality of using the SteamAPI's "UpToDateCheck" functionality to keep several Source-based games updated on an automated basis, such as:

However, I noticed that none of that functionality seems to exist/work for games using the older GoldSrc engine - even though they have also been ported over to SteamCMD/SteamPipe content management.

It would be very hand to have that same functionality for GoldSrc titles as for Source titles - at least for stuff from Valve itself, such as:

JoelTroch commented 9 years ago

Nice idea indeed, have you tried to look for Metamod or AMX plugins if someone already done that ?

SamVanheer commented 5 years ago

The engine already calls ISteamGameServer::WasRestartRequested and logs to the console and to the log file to inform the server operator if a restart is required, but it doesn't auto-restart.

I looked into how Source does it and all i found was this script: https://forums.alliedmods.net/showthread.php?p=1583376

It relies on a SourceMod plugin called SteamTools: https://forums.alliedmods.net/showthread.php?t=170630

SteamTools fires a script function called Steam_RestartRequested, which the script uses to start a timer which eventually executes the _restart server command.

SteamTools doesn't strictly speaking call the SteamWorks API directly, it hooks the call meaning when the engine calls it, it first calls SteamTools, which then calls the SteamWorks function and responds if the return value is true.

I'm sure somebody can port this to GoldSource, but it'll take some doing to get it all to work since it relies on hooking calls to SteamWorks which i don't think anybody's done in GoldSource yet.

@Arkshine you said you've done some work with SteamWorks in GoldSource, do you know if there are any plugins/scripts that do this?