Page 1 of 1

ClientPause [XC_Engine servers]

Posted: Sat Mar 10, 2018 8:57 am
by Higor
ClientPause.7z
10/03/2018 build
(6.8 KiB) Downloaded 60 times
Small client pause util for XC_Engine servers.
Made by Higor (UT99.org)
caco_fff@hotmail.com

- Pauses server upon player request.
- Pause is immediate if player is alone.
- Other players can cancel the pause/unpause request.
- Auto-pauses tournament games that lose players.
- Pause/unpause notification is less laggy
- Unpauses server when empty

=============
Installation:

Add following entry (in UnrealTournament.ini) to [XC_Engine.XC_GameEngine]

ServerActors=ClientPause.ClientPause

=========
Settings:

Config entry (in UnrealTournament.ini, autogenerated after running server):

[ClientPause.ClientPause]
PauseTimer=3
PlayerCommandRetry=11.000000
InitialBroadcastTime=4
This utility applies script patching the moment the game starts and players spawn, during that time
all players' Pause button functionality is replaced by a delayed pause system that allows anyone to pause
the server as well as cancel someone else's pause attempt.

There's an anti-spam system that prevents the same player from using the same pause command
repeatedly, the commands are: Pause, Pause Cancel, Unpause, Unpause Cancel.
Also, if a player joins a paused game, the server will unpause for a single frame to force visual update.

In tournament games the module can function as an auto-pauser, it will automatically pause the game
the moment the server's player count drops below the amount of players the game initially started with.

When the game finishes and the end cameras are set, the pause mechanics are reversed to default.

==
Code contains:
- Script Patcher usage.
- Dynamic Array handling.
- Game start/end detection.
- 1:1 second timer.
- PawnActors/DynamicActors iterators.

==
Note:
The pause uses state-based control which does not reflect real time changes of the level's pause status.
If something else pauses/unpauses the server (NexGen or other server controllers) ClientPause won't
detect it and operate based on it's internal state instead (re-pausing a manually paused game for example)

Re: ClientPause [XC_Engine servers]

Posted: Sat Jan 21, 2023 11:58 pm
by f7r
Suddenly :lol2: , I noticed that when it unpaused, the remaining time of the match begins to decreasing rapidly by amount of seconds of the preceding pause duration. And at the game ending, any sorts of glitches are possible or not: very fast announcements, a completion delay while a timer of 0, does not ending at all, several announcements about ending in a row. It is especially fascinating when duration of the pause exceeds remaining time to end match. At the all time, all physics in game works at a same usual speed. Only timer speeds up.
I stared inside the code for a long time, I understood roughly how game pausing and ClientPause works (and many things about GameInfo and its subclasses in terms of using game timing), but I did not find why the timer of remaining time could go astray.
469b, linux x86, dedicated server, wine client. Tested deathmatch only.
Higor wrote: Mon Oct 31, 2022 5:01 am On a separate note, I realized ClientPause needs a slight fix.
Maybe it is?