Skip to content

Improve GetServerMod() Code #2

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

stickz
Copy link
Contributor

@stickz stickz commented Dec 16, 2015

We don't need to keep evaluating more iterations, if the game description or game folder matches.

Also, the mod detection is missing Nuclear Dawn support for some reason.

We don't need to keep evaluating more iterations, if the game description or game folder matches a mod name.

Also, the mod detection is missing Nuclear Dawn support for some reason.
@gamemedev
Copy link
Owner

Thank you fore submitting your code. The "if" conditions are as intended and we do not want to change this. Unfortunately, the "game" detection relys on the game description and directory. Both can be "misused", for example you can install csgo gameserver to a tf2 directory. Also, the game description is often changed or have any additions like "Left 4 Dead Counter-Strike Style". In this example the correct game would be "Left 4 Dead" and would match with the current "system" as "Counter-Strike" will be superseeded. This is also the reason we need to check the strings with the function "StrContains" and not "StrEqual". Within the last couple of years we do have seen really everything. While we do admit this is not the smartest way to code, at the moment, we do want to keep the code the current way as it will mostly working fine.

@stickz
Copy link
Contributor Author

stickz commented Jan 7, 2016

Nuclear Dawn requires separate mod detection because it uses different events. I think around the time things got changed various things broke. Even sourcemod has a separate binary for it now.

Win Ratios for instance disappeared around that time.
http://rank.xenogamers.com/mapinfo/560

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants