// edit these to match whichever cvars are used for specific notification options
NOTIF_WRITE("\n// HARD CODED notification variables:\n", "");
+ NOTIF_WRITE("seta notification_version_mismatch_client_error 0 \"Cause a notif error on client if the version in notifications.cfg mismatches the code\"\n", "");
+ NOTIF_WRITE("seta notification_version_mismatch_server_error 1 \"Cause a notif error on server if the version in notifications.cfg mismatches the code\"\n", "");
NOTIF_WRITE("seta notification_errors_are_fatal 1 \"If a notification fails upon initialization, cause a Host_Error to stop the program\"\n", "");
NOTIF_WRITE("seta notification_ctf_pickup_team_verbose 1 \"Show extra information if a team mate picks up a flag\"\n", "");
NOTIF_WRITE("seta notification_ctf_pickup_enemy_verbose 1 \"Show extra information if an enemy picks up a flag\"\n", "");
// This is used to check matches between the config file and the code,
// and should be incremented any time you add a new/remove or edit an notification
// or any time you change default values or add/edit/remove a special cvar.
-#define NOTIF_VERSION 1
+#define NOTIF_VERSION 2
#define NO_MSG -12345
#define NOTIF_ADD_AUTOCVAR(name,default) var float autocvar_notification_##name = default;
NOTIF_ADD_AUTOCVAR(version, NOTIF_VERSION)
+NOTIF_ADD_AUTOCVAR(version_mismatch_client_error, FALSE)
+NOTIF_ADD_AUTOCVAR(version_mismatch_server_error, TRUE)
NOTIF_ADD_AUTOCVAR(errors_are_fatal, TRUE)
#ifdef SVQC
notif_global_error = FALSE;
if(autocvar_notification_version != NOTIF_VERSION)
{
- notif_global_error = TRUE;
- print(sprintf("^1NOTIFICATION VERSION MISMATCH: ^7cvar = %d, code = %d.\n", autocvar_notification_version, NOTIF_VERSION));
+ #ifdef CSQC
+ if(autocvar_notification_version_mismatch_client_error)
+ #else
+ if(autocvar_notification_version_mismatch_server_error)
+ #endif
+ notif_global_error = TRUE;
+
+ print(sprintf("^1NOTIFICATION VERSION MISMATCH: ^7program = %s, config = %d, code = %d.\n",
+ "foobar", autocvar_notification_version, NOTIF_VERSION));
}
}