Skip to content

Conversation

@bauxiteDYS
Copy link
Contributor

Dystopia has a built-in command called nextmap which breaks due to the Sourcemod nextmap command. This modification is intended to restore Dystopia compatibility.

Dystopia has a built-in command called nextmap which breaks due to the Sourcemod nextmap command. This modification is intended to restore Dystopia compatibility.
@sapphonie
Copy link
Contributor

sapphonie commented Nov 4, 2023

Calling

char folder[64];   	 
GetGameFolderName(folder, sizeof(folder));

every say command is a huge waste. it's not going to change, and you already call it once during plugin start - you could just store the bool value of strcmp(folder, "dystopia") != 0) in OnPluginStart as a global variable called something like doNextmap or something and check it that way instead of doing so much extra logic.

Alternatively, Dystopia itself could use its own command, since SM has using nextmap for ages and ages, but that's a tall order

@bauxiteDYS
Copy link
Contributor Author

bauxiteDYS commented Nov 4, 2023

Calling

char folder[64];   	 
GetGameFolderName(folder, sizeof(folder));

every say command is a huge waste. it's not going to change, and you already call it once during plugin start - you could just store the bool value of strcmp(folder, "dystopia") != 0) in OnPluginStart as a global variable called something like doNextmap or something and check it that way instead of doing so much extra logic.

Alternatively, Dystopia itself could use its own command, since SM has using nextmap for ages and ages, but that's a tall order

Thanks, makes sense. I believe I did it right this time hopefully.

Unfortunately Dystopia has no devs as of recently so that probably won't be changed.

@psychonic psychonic merged commit f2ca671 into alliedmodders:master Nov 6, 2023
@psychonic
Copy link
Member

Thanks!

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.

3 participants