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

[BUG] Hoonymode should disable powerups, but does not #284

Open
hemostx opened this issue Dec 18, 2022 · 5 comments
Open

[BUG] Hoonymode should disable powerups, but does not #284

hemostx opened this issue Dec 18, 2022 · 5 comments
Labels

Comments

@hemostx
Copy link

hemostx commented Dec 18, 2022

Describe the bug
When setting /hoonymode, powerups remain on the map or respawn if coming from no powerups.

This suggests that it should toggle k_pow:

const char _1on1hm_um_init[] =
	"coop 0\n"						// no coop
	"maxclients 2\n"				// duel = two players
	"k_maxclients 2\n"				// duel = two players
	"fraglimit 1\n"					// hoonymode - every 1 frag we toggle spawns
	"timelimit 0\n"					// hoonymode - timelimit 0
	"k_hoonymode 1\n"
	"k_hoonyrounds 12\n"			// first to seven
	"teamplay 0\n"					// hurt yourself, no teammates here
	"deathmatch 3\n"				// weapons stay
	"k_overtime 1\n"				// overtime type = time based
	"k_exttime 3\n"					// overtime 3mins
	"k_pow 0\n"						// powerups
	"k_membercount 0\n"				// no efect in duel
	"k_lockmin 0\n"					// no efect in duel
	"k_lockmax 0\n"					// no efect in duel
	"k_mode 1\n"
;

However, k_pow 0 changes to k_pow 1 after /hoonymode and the powerups are enabled.

All PUs remains enabled on any map.

To Reproduce
Caveat: Setting add_q_aerowalk 0 ensures the quad is removed when you do /aerowalk /hoonymode, so I would be careful with this special case when testing. In general, I'd go with other maps for repro first.

This works on any map with powerup(s):

  1. /dm3 (it has so many powerups)
  2. /1on1
  3. Run around - no powerups!
  4. /hoonymode
  5. all powerups are back. check with rcon - k_pow is 1

Expected behavior
Powerups should disappear in hoonymode - this appears to be the intended behaviour and it's a 1on1 mode, after all.

Environment(please complete the following information):

  • Operation System: repro on linux/win
  • Processor Architecture: most likely x86_64 and not relevant
  • MVDSV Version: 0.34 to 0.36-dev
  • KTX Version: reproduced across versions at least as old as 1.39 and as recent as 1.41-reki or 1.43-dev
@hemostx hemostx added the bug label Dec 18, 2022
@mikraj01
Copy link

mikraj01 commented May 5, 2023

I'm able to reproduce this issue with the nQuakesv package.

server log when calling /1on1. k_pow is 0 as expected

1 on 1 settings enabled by FU-rusti
execing configs/usermodes/default.cfg
execing configs/usermodes/1on1/default.cfg

matchtag not set
] k_pow
"k_pow" is "0"

and then /hoonymode. Note: 1on1/default.cfg is not executed. k_pow is 1

HoonyMode settings enabled by FU-rusti
execing configs/usermodes/default.cfg

matchtag not set
] k_pow
"k_pow" is "1"

When I look at default configs I can see following k_pow values.
usermodes/default.cfg

set k_pow 1

usermodes/1on1/default.cfg

set k_pow 0

@mushis
Copy link
Contributor

mushis commented Aug 8, 2023

when is this getting attention? its annoying and should be an easy fix.

@mushis
Copy link
Contributor

mushis commented Aug 9, 2023

I guess this means its not a server config issue, but rather a code issue.

@tcsabina
Copy link
Collaborator

Upon activating /hooneymode, first we apply the content of '_1on1hm_um_init', followed by executing ktx/configs/usermodes/default.cfg.

This default.cfg in the nquakesv installer contains 'k_pow 1' (see https://github.com/nQuake/distfiles/blob/master/sv-configs/ktx/configs/usermodes/default.cfg).

I think the easiest fix is to make the change in the nquakesv, and remove k_pow from the default.cfg, instead of diving into the execution order of these config files upon executing a usermode command like /hooneymode, or /1on1.
I guess every mode where powerups are required (2on2, 4on4, etc) have 'k_pow 1' defined in the dedicated 'default.cfg' file, so removing it from the top-level default.cfg will do no harm.

@tcsabina
Copy link
Collaborator

I've just made a PR to update the default.cfg in the nquakesv package. Let's see...

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

No branches or pull requests

4 participants