]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/notifications/all.qc
Merge branch 'terencehill/hud_no_joypad_keys' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / notifications / all.qc
index ad2013dfa5b9d214128165e81281e345b868b668..3d3c786297c43cb283cd39f43449b4611c98de7b 100644 (file)
@@ -760,12 +760,11 @@ void Create_Notification_Entity_Choice(entity notif,
 #ifdef SVQC
 void Notification_GetCvars()
 {
-       int idx = 0;
        FOREACH(Notifications, it.nent_type == MSG_CHOICE, {
                GetCvars_handleFloat(
                        get_cvars_s,
                        get_cvars_f,
-                       msg_choice_choices[idx++],
+                       msg_choice_choices[it.nent_choice_idx],
                        sprintf("notification_%s", it.nent_name)
                );
        });
@@ -1479,9 +1478,8 @@ NET_HANDLE(ENT_CLIENT_NOTIFICATION, bool is_new)
 #endif
 
 #ifdef SVQC
-void Net_Notification_Remove()
+void Net_Notification_Remove(entity this)
 {
-       SELFPARAM();
        #ifdef NOTIFICATIONS_DEBUG
        Debug_Notification(sprintf(
                "Net_Notification_Remove() at %f: %s '%s - %s' notification\n",
@@ -1698,7 +1696,7 @@ void Send_Notification(
                        net_notif.nent_floats[i] = ...((net_notif.nent_stringcount + i), float);
                }
 
-               net_notif.think = Net_Notification_Remove;
+               setthink(net_notif, Net_Notification_Remove);
                net_notif.nextthink = (time > autocvar_notification_lifetime_mapload)
                        ? (time + autocvar_notification_lifetime_runtime)
                        : autocvar_notification_lifetime_mapload;