.int cvar_value;
void ReplicateVars(bool would_destroy)
{
- FOREACH(Notifications, it.nent_type == MSG_CHOICE, {
- string cvarname = sprintf("notification_%s", Get_Notif_CvarName(it));
- REPLICATE_SIMPLE(it.cvar_value, cvarname);
- });
+ if (!would_destroy)
+ FOREACH(Notifications, it.nent_type == MSG_CHOICE, {
+ string cvarname = sprintf("notification_%s", Get_Notif_CvarName(it));
+ // NOTE: REPLICATE_SIMPLE can return;
+ REPLICATE_SIMPLE(it.cvar_value, cvarname);
+ });
}
float bgmtime;