Skip to content

fix(mods): metamod gamemode fix - #4500

Open
pcace wants to merge 1 commit into
GameServerManagers:developfrom
pcace:feature/cs2_metamod_gamemode_fix
Open

pcace wants to merge 1 commit into
GameServerManagers:developfrom
pcace:feature/cs2_metamod_gamemode_fix

Conversation

@pcace

@pcace pcace commented Feb 18, 2024 •

Copy link
Copy Markdown

Description

Only applies if metamod addon is installed on a cs2 server:
currently the gamemode.gi gets overwritten when updating the cs2 installation, but metamod needs to be referenced in the gamemod.gi by:
Game csgo/addons/metamod

this fix adds the needed integration of metamod to the gamemod.gi file if it is not there and if metamod is installed.

Fixes #4492

Type of change

  • Bug fix (a change which fixes an issue).
  • New feature (a change which adds functionality).
  • New Server (new server added).
  • Refactor (restructures existing code).
  • Comment update (typo, spelling, explanation, examples, etc).

Checklist

PR will not be merged until all steps are complete.

  • This pull request links to an issue.
  • This pull request uses the develop branch as its base.
  • This pull request subject follows the Conventional Commits standard.
  • This code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have checked that this code is commented where required.
  • I have provided a detailed enough description of this PR.
  • I have checked if documentation needs updating.

Documentation

If documentation does need updating either update it by creating a PR (preferred) or request a documentation update.

Thank you for your Pull Request!

currently the gamemode.gi gets overwritten when updating the cs2 installation, but metamod needs to be referenced in the gamemod.gi. this fix adds the fix to the file if it is not there and if metamod is installed.
@pcace pcace changed the title Feature/cs2 metamod gamemode fix fix(mods): metamod gamemode fix Feb 18, 2024
@dgibbs64

dgibbs64 commented Mar 8, 2024

Copy link
Copy Markdown
Member

I feel like this is an issue that should be dealt with by metamod rather LinuxGSM creating this type of fix. Are there any metamod discussions about this issue and any long term fixes?

@Prefix

Prefix commented Feb 4, 2025 •

Copy link
Copy Markdown

I feel like this is an issue that should be dealt with by metamod rather LinuxGSM creating this type of fix. Are there any metamod discussions about this issue and any long term fixes?

It has nothing to do with metamod itself. CS2 updates overwrites file and there is nothing metamod can do to prevent it.

@borzaka

borzaka commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

LinuxGSM already manages similar mod integration through the liblist.gam install/remove helpers for classic Metamod, so there is precedent for handling this here.

Automatically restoring the entry at startup can also re-enable an outdated Metamod build after a CS2 update. If that build is incompatible, the server may crash or segfault. In that situation, allowing the server to start without mods is preferable to forcing it to load a broken mod.

My PR (#4961) adds CS2 mod installation, updates, and removal, with whitespace-tolerant, idempotent gameinfo.gi handling. It restores the entry during mods-update, after updating Metamod, rather than unconditionally at startup.

@github-actions github-actions Bot added engine: source engine: source2 Issues related to source2 engine game: Counter-Strike: Global Offensive Issues related to Counter-Strike: Global Offensive game: Counter-Strike 2 Issues related to Counter-Strike 2 labels Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine: source engine: source2 Issues related to source2 engine game: Counter-Strike: Global Offensive Issues related to Counter-Strike: Global Offensive game: Counter-Strike 2 Issues related to Counter-Strike 2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants