Skip to content

Commit 6c743a9

Browse files
committed
fix: NetMessages after game update
Thanks Nanoman for reporting this
1 parent c14c604 commit 6c743a9

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

docs/cvars.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
|sar_cheat_hud|1|Display a warning in the HUD when cheats are active. 0 = disable, 1 = display if sv_cheats off, 2 = display always|
127127
|sar_cheat_hud_x|-4|X position of the cheat warning HUD.|
128128
|sar_cheat_hud_y|4|Y position of the cheat warning HUD.|
129-
|sar_check_update|cmd|sar_check_update [release\|pre] - check whether the latest version of SAR is being used|
129+
|sar_check_update|cmd|sar_check_update [release\|pre\|canary] - check whether the latest version of SAR is being used|
130130
|sar_clear_lines|cmd|sar_clear_lines - clears all active drawline overlays|
131131
|sar_cm_rightwarp|0|Fix CM wrongwarp.|
132132
|sar_command_debug|0|Output debugging information to the console related to commands. **Breaks svar_capture**|
@@ -358,6 +358,12 @@
358358
|sar_on_pb|cmd|sar_on_pb \<command> [args]... - registers a command to be run when auto-submitter detects PB|
359359
|sar_on_pb_clear|cmd|sar_on_pb_clear - clears commands registered on event "pb"|
360360
|sar_on_pb_list|cmd|sar_on_pb_list - lists commands registered on event "pb"|
361+
|sar_on_renderer_finish|cmd|sar_on_renderer_finish \<command> [args]... - registers a command to be run when renderer finishes|
362+
|sar_on_renderer_finish_clear|cmd|sar_on_renderer_finish_clear - clears commands registered on event "renderer_finish"|
363+
|sar_on_renderer_finish_list|cmd|sar_on_renderer_finish_list - lists commands registered on event "renderer_finish"|
364+
|sar_on_renderer_start|cmd|sar_on_renderer_start \<command> [args]... - registers a command to be run when renderer starts|
365+
|sar_on_renderer_start_clear|cmd|sar_on_renderer_start_clear - clears commands registered on event "renderer_start"|
366+
|sar_on_renderer_start_list|cmd|sar_on_renderer_start_list - lists commands registered on event "renderer_start"|
361367
|sar_on_session_end|cmd|sar_on_session_end \<command> [args]... - registers a command to be run on session end|
362368
|sar_on_session_end_clear|cmd|sar_on_session_end_clear - clears commands registered on event "session_end"|
363369
|sar_on_session_end_list|cmd|sar_on_session_end_list - lists commands registered on event "session_end"|
@@ -595,7 +601,8 @@
595601
|sar_trace_teleport_eye|cmd|sar_trace_teleport_eye \<tick> [player slot] [trace name] - teleports the player to the eye position at the given trace tick on the given trace (defaults to hovered one or the first one ever made) in the given slot (defaults to 0).|
596602
|sar_trace_use_shot_eyeoffset|1|Uses eye offset and angles accurate for portal shooting.|
597603
|sar_transition_timer|0|Output how slow your dialogue fade was.|
598-
|sar_update|cmd|sar_update [release\|pre] [exit] [force] - update SAR to the latest version. If exit is given, exit the game upon successful update; if force is given, always re-install, even if it may be a downgrade|
604+
|sar_unlocked_chapters|-1|Max unlocked chapter.|
605+
|sar_update|cmd|sar_update [release\|pre\|canary] [exit] [force] - update SAR to the latest version. If exit is given, exit the game upon successful update; if force is given, always re-install, even if it may be a downgrade|
599606
|sar_velocitygraph|0|Shows velocity graph.|
600607
|sar_velocitygraph_background|0|Background of velocity graph.|
601608
|sar_velocitygraph_font_index|21|Font index of velocity graph.|

src/Features/Cvars.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ void Cvars::Lock() {
240240
gameui_preventescape.Lock();
241241
setpause.Lock();
242242
snd_ducktovolume.Lock();
243+
say.Lock();
243244

244245
this->locked = true;
245246
}
@@ -286,13 +287,15 @@ void Cvars::Unlock() {
286287
gameui_preventescape.Unlock(false);
287288
setpause.Unlock(false);
288289
snd_ducktovolume.Unlock(false);
290+
say.Unlock(false);
289291
soundfade.AddFlag(FCVAR_CLIENTCMD_CAN_EXECUTE);
290292
leaderboard_open.AddFlag(FCVAR_CLIENTCMD_CAN_EXECUTE | FCVAR_SERVER_CAN_EXECUTE);
291293
gameui_activate.AddFlag(FCVAR_CLIENTCMD_CAN_EXECUTE | FCVAR_SERVER_CAN_EXECUTE);
292294
gameui_allowescape.AddFlag(FCVAR_CLIENTCMD_CAN_EXECUTE | FCVAR_SERVER_CAN_EXECUTE);
293295
gameui_preventescape.AddFlag(FCVAR_CLIENTCMD_CAN_EXECUTE | FCVAR_SERVER_CAN_EXECUTE);
294296
setpause.AddFlag(FCVAR_SERVER_CAN_EXECUTE);
295297
snd_ducktovolume.AddFlag(FCVAR_SERVER_CAN_EXECUTE);
298+
say.AddFlag(FCVAR_CLIENTCMD_CAN_EXECUTE | FCVAR_SERVER_CAN_EXECUTE);
296299

297300
this->locked = false;
298301
}

src/Modules/Client.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,15 @@ Variable r_PortalTestEnts;
4848
Variable r_portalsopenall;
4949
Variable r_drawviewmodel;
5050

51+
// some of these are actually commands but that's fine, dw about it :)
5152
Variable soundfade;
5253
Variable leaderboard_open;
5354
Variable gameui_activate;
5455
Variable gameui_allowescape;
5556
Variable gameui_preventescape;
5657
Variable setpause;
5758
Variable snd_ducktovolume;
59+
Variable say;
5860

5961
Variable sar_disable_coop_score_hud("sar_disable_coop_score_hud", "0", "Disables the coop score HUD which appears in demo playback.\n");
6062
Variable sar_disable_save_status_hud("sar_disable_save_status_hud", "0", "Disables the saving/saved HUD which appears when you make a save.\n");
@@ -1091,6 +1093,7 @@ bool Client::Init() {
10911093
gameui_preventescape = Variable("gameui_preventescape");
10921094
setpause = Variable("setpause");
10931095
snd_ducktovolume = Variable("snd_ducktovolume");
1096+
say = Variable("say");
10941097

10951098
CVAR_HOOK_AND_CALLBACK(cl_fov);
10961099

src/Modules/Client.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,6 @@ extern Variable gameui_allowescape;
195195
extern Variable gameui_preventescape;
196196
extern Variable setpause;
197197
extern Variable snd_ducktovolume;
198+
extern Variable say;
198199

199200
extern Command sar_workshop_skip;

0 commit comments

Comments
 (0)