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

mapname cvar is never set when joining a server, is it a bug or not? #2381

Open
illwieckz opened this issue Jan 24, 2023 · 2 comments
Open
Labels
T-Question for questions on how things works on on how to proceed on an issue

Comments

@illwieckz
Copy link
Member

I'm not sure this is a bug, but mapname cvar is never ser when joining a server.

This cvar is only set when running a map as a server (or with a client as a server). This cvar is probably only used to make possible for the game to tell the engine what map to load while the game is entirely killed between map loads. That would mean the expected reader would be the server engine, and not clients. The client is probably not expected to use that cvar at all.

By default the value is nomap so that's the value seen by clients connecting to servers.

@illwieckz illwieckz added the T-Question for questions on how things works on on how to proceed on an issue label Jan 24, 2023
@DolceTriade
Copy link
Member

I think if things rely on the mapname being set in the cgame, it is a bug. I think it's probably a good thing to set the cvar tho so we can rely on it.

@slipher
Copy link
Contributor

slipher commented Jan 25, 2023

I think if things rely on the mapname being set in the cgame, it is a bug.

Agreed. Well, I do use it in the cgame for cg_navgenOnLoad, but that code only runs if you are hosting the game so the sgame is guaranteed to be running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Question for questions on how things works on on how to proceed on an issue
Projects
None yet
Development

No branches or pull requests

3 participants