Skip to content

Feat: Add warning messages for classic spawns - #166

Closed
notkoen wants to merge 3 commits into
Source2ZE:mainfrom
notkoen:main
Closed

Feat: Add warning messages for classic spawns#166
notkoen wants to merge 3 commits into
Source2ZE:mainfrom
notkoen:main

Conversation

@notkoen

@notkoen notkoen commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

QoL change to give new players a heads-up warning if zombies will be spawning between humans, aka "classic spawns."

Feedback is appreciated and welcome as to how this should be properly implemented. Some ideas are taken from CSS.

QoL change for CS2 ZE to give new players a heads up warning if zombies will be spawning between humans, aka "classic spawns."
@notkoen
notkoen marked this pull request as ready for review January 24, 2024 18:58

@Vauff Vauff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behaviour should be an opt-in convar, because a warning like this is redundant on servers like Mapeadores that have classic spawn part of their primary settings.

Comment thread src/zombiereborn.cpp
Comment on lines -860 to +865
V_snprintf(message, sizeof(message), "First infection in \7%i %s\1!", g_iInfectionCountDown, g_iInfectionCountDown == 1 ? "second" : "seconds");
if (g_iInfectSpawnType != EZRSpawnType::RESPAWN)
V_snprintf(message, sizeof(message), "Classic spawns enabled! Zombies will be spawning between humans!\nFirst infection in \7%i %s\1!", g_iInfectionCountDown, g_iInfectionCountDown == 1 ? "second" : "seconds");
else
V_snprintf(message, sizeof(message), "First infection in \7%i %s\1!", g_iInfectionCountDown, g_iInfectionCountDown == 1 ? "second" : "seconds");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to split this up, because this same buffer is being used for both hud msgs and chat msgs. As a result it spams the chat a lot more than once too.

Was this even tested? Because the chat formatting is also garbled due to newline in chat messages being interpreted as gray colour.
image

@notkoen notkoen Jan 27, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't test it because I don't even have a test server. I'll fix it later.

@notkoen
notkoen marked this pull request as draft January 27, 2024 14:48
@notkoen

notkoen commented Feb 21, 2024

Copy link
Copy Markdown
Contributor Author

Too lazy lmao

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