All pastes #248204 Raw Edit

Mine

public text v1 · immutable
#248204 ·published 2006-11-14 11:10 UTC
rendered paste body
acrux> diff -u src/client/cl_actor.c src/client/cl_actor.c.local                                                
--- src/client/cl_actor.c       Wed Sep 20 10:02:51 2006
+++ src/client/cl_actor.c.local Mon Nov 13 17:58:37 2006
@@ -259,11 +259,14 @@
        static int secondary_right = -1;
        static int primary_left = -1;
        static int secondary_left = -1;
+       static int reload_right = -1;
+       static int reload_left = -1;
        invList_t *weapon;

        if (cl.cmode != M_MOVE && cl.cmode != M_PEND_MOVE) {
                /* If we're not in move mode, leave the rendering of the fire buttons alone */
                primary_right = secondary_right = primary_left = secondary_left = -2;
+               reload_right = reload_left = -2;
                return;
        } else if (primary_right == -2) {
                /* skip one cycle to let things settle down */
@@ -297,6 +300,19 @@
                secondary_right = 1;
        }

+       /* reload button  */
+       if ( !weapon || weapon->item.m == NONE
+                || (csi.ods[weapon->item.t].reload && weapon->item.a == 0)
+                || time < csi.ods[weapon->item.t].reload ) {
+               if (reload_right != 0) {
+                       Cbuf_AddText("disrr\n");
+                       reload_right = 0;
+               }
+       } else if (reload_right != 1) {
+        Cbuf_AddText("deselrr\n");
+               reload_right = 1;
+       }
+
        /* check for two-handed weapon - if not, switch to left hand */
        if (!weapon || !csi.ods[weapon->item.t].twohanded)
                weapon = LEFT(selActor);
@@ -324,6 +340,19 @@
                Cbuf_AddText("deselsl\n");
                secondary_left = 1;
        }
+
+       /* reload button */
+       if ( !weapon || weapon->item.m == NONE
+                || (csi.ods[weapon->item.t].reload && weapon->item.a == 0)
+                || time < csi.ods[weapon->item.t].reload ) {
+       if (reload_left != 0) {
+                       Cbuf_AddText("disrl\n");
+                       reload_left = 0;
+               }
+       } else if (reload_left != 1) {
+        Cbuf_AddText("deselrl\n");
+               reload_left = 1;
+       }
 }

 /**

acrux> diff -u menu_hud.ufo menu_hud.ufo.local                                                                  
--- menu_hud.ufo        Mon Nov 13 18:07:46 2006
+++ menu_hud.ufo.local  Mon Nov 13 19:09:24 2006
@@ -407,11 +407,15 @@
        confunc deselpr { *bt_pfire_right  image hud/buttons1 }
        confunc deselsl { *bt_sfire_left   image hud/buttons1 }
        confunc deselsr { *bt_sfire_right  image hud/buttons1 }
+       confunc deselrl { *bt_reload_left  image hud/buttons2 }
+       confunc deselrr { *bt_reload_right image hud/buttons2 }

        confunc displ { *bt_pfire_left   image hud/buttons1g }
        confunc dispr { *bt_pfire_right  image hud/buttons1g }
        confunc dissl { *bt_sfire_left   image hud/buttons1g }
        confunc dissr { *bt_sfire_right  image hud/buttons1g }
+       confunc disrl { *bt_reload_left  image hud/buttons2g }
+       confunc disrr { *bt_reload_right image hud/buttons2g }

        pic bt_pfire_right
        {