Skip to content

"restart_rules_after_game_time" little fix#2517

Open
TerminalHash wants to merge 1 commit intotranshumandesign:masterfrom
TerminalHash:rules-restart-after-game
Open

"restart_rules_after_game_time" little fix#2517
TerminalHash wants to merge 1 commit intotranshumandesign:masterfrom
TerminalHash:rules-restart-after-game

Conversation

@TerminalHash
Copy link
Contributor

@TerminalHash TerminalHash commented Feb 15, 2026

Description

Fixes #2516

This change allows you to use the RestartAfterShortPostGame.as script without any problems and without subsequently rewriting the value of the “restart_rules_after_game_time” variable.

Steps to Test or Reproduce

Add next code into hook onRender in CTF_Interface.as for example:

		GUI::SetFont("hud");
		GUI::DrawText("Game time: " + getGameTime(), Vec2f(320, 20), SColor(255, 255, 255, 255));
		GUI::DrawText("Game time (CMap): " + getMap().getTimeSinceStart(), Vec2f(320, 35), SColor(255, 255, 255, 255));
		GUI::DrawText("Rules restart after game: " + this.get_s32("restart_rules_after_game"), Vec2f(320, 50), SColor(255, 255, 255, 255));
		GUI::DrawText("Rules restart after game time: " + this.get_s32("restart_rules_after_game_time"), Vec2f(320, 65), SColor(255, 255, 255, 255));

Merge changes from that pull request and you can check, what value is assigned to the variable “restart_rules_after_game_time” when using the RestartAfterShortPostGame.as or PostGameMapVotes.as script.

  1. When you using RestartAfterShortPostGame.as, it's should be set to 300 ticks (by default);
  2. If you're using PostGameMapVotes.as, it's should be set to 900 ticks;
  3. If you run the tutorials, the restart time should be set to 150 ticks.

@Vam-Jam Vam-Jam added kind: Fix Fixes a bug gamemode: TTH gamemode: CTF Affects CTF, or both CTF and SmallCTF. labels Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gamemode: CTF Affects CTF, or both CTF and SmallCTF. gamemode: TTH kind: Fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strange things with "restart_rules_after_game_time" variable

2 participants