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

Server always restarting as TDM crossfire #30

Closed
gundogfan opened this issue Jan 30, 2023 · 2 comments
Closed

Server always restarting as TDM crossfire #30

gundogfan opened this issue Jan 30, 2023 · 2 comments
Labels
priority: normal These issues should be adressed by the next release. type: bug Something isn't working
Milestone

Comments

@gundogfan
Copy link

gundogfan commented Jan 30, 2023

As the title says, the server will always restart as tdm crossfire making impossible to have a specific gamemode sv running 24/7.

Steps to reproduce it:

1- Set sv_ag_gamemode and sv_ag_allowed_gamemodes (in startup_server.cfg) as arena or any other gamemode.
2- Run or restart the server.

The server will run as TDM no matter what unless you change it manually through vote/rcon.

But, if instead of startup_server.cfg we use amxx.cfg, it will remain as TDM as well but at least it will change to the desired gamemode right after we change the map.

I also noticed it restarts in crossfire, regardless of how what's written in mapcycle.txt

Issue does not occur in original AG.

@rtxa rtxa added this to the Next release milestone Dec 20, 2023
@rtxa rtxa added type: bug Something isn't working priority: normal These issues should be adressed by the next release. labels Dec 20, 2023
@rtxa rtxa added this to AG Mod X Sep 1, 2024
@github-project-automation github-project-automation bot moved this to Backlog/Ideas 🤔 in AG Mod X Sep 1, 2024
@rtxa
Copy link
Owner

rtxa commented Sep 3, 2024

After investigating the issue, unfortunately this enters in the category of "Known limitation", startup_server.cfg gets executed before AG Mod X CVars are registered, so it's ignored. Changing the map after server start is a good workaround.

I can't hook GameDLLInit from AMXX to register AG Mod X CVars and fix the issue without using ReHLDS exclusively (Not so sure) or Orpheu (which is incompatible with ReHLDS). I would add into the FAQ about this issue and his workaround with amxx.cfg.

This probably can be fixed by hardcoding in BugfixedHL but that solution wouldn't be so elegant, a better solution would be to expose an API like ReGameDLL does and export it as a module for AMXX, and manage everything from there. I'm afraid that would take time, but HL community would benefit from it (and several mods).

About mapcycle.txt, this is something that happens too in vanilla HL? Maybe something to do with hlds.exe startup parameters like using +map crossfire?

rtxa added a commit that referenced this issue Sep 3, 2024
Fixed server always restarting in TDM mode, regardless of what was set in startup_server.cfg. This happens because the startup_server.cfg is being executed before AG CVars are even registered. Now we reload the .cfg to solve this.
@rtxa
Copy link
Owner

rtxa commented Sep 3, 2024

Luckily, after doing some tests, I got it fixed in the latest commit 15da00f. Please, let me know if this working as expected by downloading it from here. @gundogfan @Safety1st

@rtxa rtxa closed this as completed Sep 5, 2024
@github-project-automation github-project-automation bot moved this from Backlog/Ideas 🤔 to Done ✅ in AG Mod X Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: normal These issues should be adressed by the next release. type: bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants