Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pause/unpause and min_active_clients doesn't work all the time. #2864

Closed
DorpsGek opened this issue Apr 26, 2009 · 6 comments
Closed

pause/unpause and min_active_clients doesn't work all the time. #2864

DorpsGek opened this issue Apr 26, 2009 · 6 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Ammler opened the ticket and wrote:

Since we use min_active_clients instead of Autopilot pause_level, we got sometimes confused.

min_active_clients=2

[20:50] ok, server is paused now.
[20:50] *** AmmIer has joined company # 1
[20:50] *** Game unpaused (enough players)
[20:50] unpaused
[20:50] !rcon pause
[20:50] Ammler: Game paused.
[20:50] *** AmmIer has joined spectators
[20:51] *** Game paused (not enough players)
[20:51] !rcon unpause
[20:51] Ammler: Game unpaused.
[20:51] still unpaused -> OK
[20:51] *** AmmIer has joined company # 1
[20:51] *** Game unpaused (enough players)
[20:51] unpaused
[20:51] *** AmmIer has joined spectators
[20:51] *** Game paused (not enough players)
[20:51] !rcon unpause
[20:51] Ammler: Game unpaused.
[20:51] unpaused -> OK
[20:51] *** AmmIer has joined company # 1
[20:52] !rcon pause
[20:52] *** Game unpaused (enough players)
[20:52] Ammler: Game paused.
[20:52] paused -> OK
[20:52] *** AmmIer has joined spectators
[20:52] *** Game paused (not enough players)
[20:52] still
[20:52] Xaroth: what should happen, if I switch to the company now?
[20:53] *** AmmIer has joined company # 1
[20:53] *** Game unpaused (enough players)
[20:53] it is still paused -> BUG
[20:53] btw. the msg of the server would be fine

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2864
@DorpsGek
Copy link
Member Author

Ammler wrote:

a local test with trunk
hd52fbbbc 16177 0 hd52fbbbc

set min_active_clients
Current value for 'min_active_clients' is: '0' (min: 0, max: 255)
set min_active_clients 1
*** Game paused (not enough players)
*** AmmIer # 1 has joined the game
*** Game paused (connecting client)
*** Game unpaused (client connected)
*** AmmIer # 1 has started a new company (# 1)
*** Game unpaused (enough players)
pause
Game is already paused.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2864#comment5976

@DorpsGek
Copy link
Member Author

DorpsGek commented May 1, 2009

Rubidium wrote:

Assume "next join" is whenever autopause would unpause and "next quit" is whenever autopause would pause.

Manual pause and automatic pause will always interfere in some way. It looks like the messages are just misleading, but I also think that automatic pausing and manual pausing was never intended to be used together.

For example: if I manually pause the game, should a leaving and rejoining player cause the game to be unpaused? Should a joining player cause the game to be unpaused?
It would make perfect sense (for me) that you just want to pause the game because you joined and are going to eat something and don't want to disconnect but want to make it possible for others to join and continue. On the other hand it would make as much sense to say that because you manually paused the game, the automatic pausing/unpausing shouldn't occur.

What currently happens (I think) is that each pause increments a counter and each unpause decrements it. It might make sense any manual unpause 'resets' that counter to 0. But then doing a manual pause will mean something different when 'autopaused' or not. If autopaused already the next join will decrement it and unpause the game. If not autopaused the next quit will increment the number thus never unpausing it. This is inconsitent behaviour, which means it isn't the solution. This leaves the option that the game is paused when either autopause is in effect or a manual pause is done, which means you cannot 'undo' an autopause (i.e. unpause when autopaused). I reckon that this again is unwanted behaviour, which basically makes autopausing a feature that CANNOT be implemented without nasty side effects.

So the choice is: consistent pausing/unpausing behaviour when mixing manual pausing and auto pausing OR the ability to unpause when auto paused as you simply cannot have both!


This comment was imported from FlySpray: https://bugs.openttd.org/task/2864#comment6009

@DorpsGek
Copy link
Member Author

DorpsGek commented May 5, 2009

Ammler wrote:

IMO, the automatic unpause/pause should function always, as you can disable it with min_active_clients=0. So if you use manual pause/unpause, it should be retriggered with client join/part (and move to/from spectactors).

As a workaround, I could imagine to make a custom command for autopilot, which does change min_active_clients instead of pause/unpause.

Greets
Ammler


This comment was imported from FlySpray: https://bugs.openttd.org/task/2864#comment6024

@DorpsGek
Copy link
Member Author

DorpsGek commented May 5, 2009

Rubidium wrote:

Why a custom command for autopilot? Isn't the 'normal' settings changing command enough?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2864#comment6025

@DorpsGek
Copy link
Member Author

DorpsGek commented May 6, 2009

Ammler wrote:

As I said, a workaround. Isn't that easy either. Best would be, min_active_clients doesn't care about state of manual pause/unpause, imo.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2864#comment6036

@DorpsGek
Copy link
Member Author

DorpsGek commented May 6, 2009

Rubidium closed the ticket.

Reason for closing: Fixed

In r16242


This comment was imported from FlySpray: https://bugs.openttd.org/task/2864

@DorpsGek DorpsGek closed this as completed May 6, 2009
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant