]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Waypoint icons: Updated core weapons.
authorLyberta <lyberta@lyberta.net>
Fri, 15 Jun 2018 19:02:53 +0000 (22:02 +0300)
committerLyberta <lyberta@lyberta.net>
Fri, 15 Jun 2018 19:02:53 +0000 (22:02 +0300)
12 files changed:
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/blaster.qh
qcsrc/common/weapons/weapon/crylink.qh
qcsrc/common/weapons/weapon/devastator.qh
qcsrc/common/weapons/weapon/electro.qh
qcsrc/common/weapons/weapon/hagar.qh
qcsrc/common/weapons/weapon/machinegun.qh
qcsrc/common/weapons/weapon/minelayer.qh
qcsrc/common/weapons/weapon/mortar.qh
qcsrc/common/weapons/weapon/shotgun.qh
qcsrc/common/weapons/weapon/vortex.qh

index 30b41637c5607a696cdab537c4002696dcb88ffd..f29e167960b519cc89b9a35677f3693158eb3219 100644 (file)
@@ -261,7 +261,8 @@ string spritelookuptext(entity this, string s)
 string spritelookupicon(entity this, string s)
 {
     // TODO: needs icons! //if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
-    if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).model2;
+    //if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).model2;
+       if (s == WP_Weapon.netname) return Weapons_from(this.wp_extra).m_waypoint_icon;
        if (s == WP_Item.netname) return Items_from(this.wp_extra).m_waypoint_icon;
     if (s == WP_Vehicle.netname) return Vehicles_from(this.wp_extra).m_icon;
     //if (s == WP_Monster.netname) return get_monsterinfo(this.wp_extra).m_icon;
@@ -434,8 +435,8 @@ vector drawsprite_TextOrIcon(bool is_text, vector o, float ang, float minwidth,
        {
                drawpic(o, str, sz, rgb, a, DRAWFLAG_NORMAL);
                // https://docs.gimp.org/en/gimp-tool-desaturate.html
-               float gray = rgb.x * 0.21 + rgb.y * 0.72 + rgb.z * 0.07;
-               drawpic(o, str, sz, '1 1 1', gray * a, DRAWFLAG_ADDITIVE);
+               //float gray = rgb.x * 0.21 + rgb.y * 0.72 + rgb.z * 0.07;
+               //drawpic(o, str, sz, '1 1 1', gray * a, DRAWFLAG_ADDITIVE);
        }
 
     o.x += 0.5 * sw;
index a3f2336a9487b275a8a130a031295c462072d77b..1a48a109a1dd4837c536f6cb20c904acea92e2af 100644 (file)
@@ -66,6 +66,8 @@ CLASS(Weapon, Object)
     ATTRIB(Weapon, w_reticle, string, string_null);
     /** M: wepimg    : "weaponfoobar" side view image file of weapon. WEAPONTODO: Move out of skin files, move to common files */
     ATTRIB(Weapon, model2, string, "");
+       /** M: waypoint icon name : "waypoint_weapon_foobar" Name of the weapon waypoint icon */
+       ATTRIB(Weapon, m_waypoint_icon, string, "");
     /** M: refname   : reference name name */
     ATTRIB(Weapon, netname, string, "");
     /** M: wepname   : human readable name */
index 7efbdf7a52cc661899ce42c973c72c11df5959df..8ec58149e35d346832fe982a306e706d849176e0 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Blaster, Weapon)
 /* crosshair */ ATTRIB(Blaster, w_crosshair, string, "gfx/crosshairlaser");
 /* crosshair */ ATTRIB(Blaster, w_crosshair_size, float, 0.5);
 /* wepimg    */ ATTRIB(Blaster, model2, string, "weaponlaser");
+/* wp_icon   */ ATTRIB(Blaster, m_waypoint_icon, string, "waypoint_weapon_blaster");
 /* refname   */ ATTRIB(Blaster, netname, string, "blaster");
 /* wepname   */ ATTRIB(Blaster, m_name, string, _("Blaster"));
 
index 77e0b734e2e7e2c1009ee42fb400691a9bca8ed1..47dd1f8065d6daf9c05cdb05c7efc787d30c85ec 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Crylink, Weapon)
 /* crosshair */ ATTRIB(Crylink, w_crosshair, string, "gfx/crosshaircrylink");
 /* crosshair */ ATTRIB(Crylink, w_crosshair_size, float, 0.5);
 /* wepimg    */ ATTRIB(Crylink, model2, string, "weaponcrylink");
+/* wp_icon   */ ATTRIB(Crylink, m_waypoint_icon, string, "waypoint_weapon_crylink");
 /* refname   */ ATTRIB(Crylink, netname, string, "crylink");
 /* wepname   */ ATTRIB(Crylink, m_name, string, _("Crylink"));
 
index e858d54e42d155f87653fb38c1bb85c304d8e152..f815cc071a49a304a2b1a1ee8304b3bf2fb7b8e0 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Devastator, Weapon)
 /* crosshair */ ATTRIB(Devastator, w_crosshair, string, "gfx/crosshairrocketlauncher");
 /* crosshair */ ATTRIB(Devastator, w_crosshair_size, float, 0.7);
 /* wepimg    */ ATTRIB(Devastator, model2, string, "weaponrocketlauncher");
+/* wp_icon   */ ATTRIB(Devastator, m_waypoint_icon, string, "waypoint_weapon_devastator");
 /* refname   */ ATTRIB(Devastator, netname, string, "devastator");
 /* wepname   */ ATTRIB(Devastator, m_name, string, _("Devastator"));
 
index 4018e5926c78ac03364173ce19883119b59d1503..b1f97106b8f4355a0e8b8d464ee454c5c3e366c2 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Electro, Weapon)
 /* crosshair */ ATTRIB(Electro, w_crosshair, string, "gfx/crosshairelectro");
 /* crosshair */ ATTRIB(Electro, w_crosshair_size, float, 0.6);
 /* wepimg    */ ATTRIB(Electro, model2, string, "weaponelectro");
+/* wp_icon   */ ATTRIB(Electro, m_waypoint_icon, string, "waypoint_weapon_electro");
 /* refname   */ ATTRIB(Electro, netname, string, "electro");
 /* wepname   */ ATTRIB(Electro, m_name, string, _("Electro"));
 
index 924326fb3a0a65e211ef2a0eba363444e5f1b771..7c60145522a08ed7ebe20809dd0e1a7896629950 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Hagar, Weapon)
 /* crosshair */ ATTRIB(Hagar, w_crosshair, string, "gfx/crosshairhagar");
 /* crosshair */ ATTRIB(Hagar, w_crosshair_size, float, 0.8);
 /* wepimg    */ ATTRIB(Hagar, model2, string, "weaponhagar");
+/* wp_icon   */ ATTRIB(Hagar, m_waypoint_icon, string, "waypoint_weapon_hagar");
 /* refname   */ ATTRIB(Hagar, netname, string, "hagar");
 /* wepname   */ ATTRIB(Hagar, m_name, string, _("Hagar"));
 
index a7ede47a2105125d60a9a07778130c633720ce8e..457c15e2ebaf3e735d5cccb1341df08897ca689c 100644 (file)
@@ -14,6 +14,7 @@ CLASS(MachineGun, Weapon)
 /* crosshair */ ATTRIB(MachineGun, w_crosshair, string, "gfx/crosshairuzi");
 /* crosshair */ ATTRIB(MachineGun, w_crosshair_size, float, 0.6);
 /* wepimg    */ ATTRIB(MachineGun, model2, string, "weaponuzi");
+/* wp_icon   */ ATTRIB(MachineGun, m_waypoint_icon, string, "waypoint_weapon_machinegun");
 /* refname   */ ATTRIB(MachineGun, netname, string, "machinegun");
 /* wepname   */ ATTRIB(MachineGun, m_name, string, _("MachineGun"));
 
index f804aaf44e9c637520a33a2673b47bed06aba853..6c116ffe751ddf52722a8afeeaefd75e3ad6ab85 100644 (file)
@@ -14,6 +14,7 @@ CLASS(MineLayer, Weapon)
 /* crosshair */ ATTRIB(MineLayer, w_crosshair, string, "gfx/crosshairminelayer");
 /* crosshair */ ATTRIB(MineLayer, w_crosshair_size, float, 0.9);
 /* wepimg    */ ATTRIB(MineLayer, model2, string, "weaponminelayer");
+/* wp_icon   */ ATTRIB(MineLayer, m_waypoint_icon, string, "waypoint_weapon_minelayer");
 /* refname   */ ATTRIB(MineLayer, netname, string, "minelayer");
 /* wepname   */ ATTRIB(MineLayer, m_name, string, _("Mine Layer"));
 
index affec0dbcae952696866a9c6e08c84d15b7ba454..69bebc752efb641864272f1ddc831ca6c240c145 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Mortar, Weapon)
 /* crosshair */ ATTRIB(Mortar, w_crosshair, string, "gfx/crosshairgrenadelauncher");
 /* crosshair */ ATTRIB(Mortar, w_crosshair_size, float, 0.7);
 /* wepimg    */ ATTRIB(Mortar, model2, string, "weapongrenadelauncher");
+/* wp_icon   */ ATTRIB(Mortar, m_waypoint_icon, string, "waypoint_weapon_mortar");
 /* refname   */ ATTRIB(Mortar, netname, string, "mortar");
 /* wepname   */ ATTRIB(Mortar, m_name, string, _("Mortar"));
 
index e40b1d8a1f7f8aa07914fd2a4afabc325cff901d..414646825181beec385744f8f9913804ec3c5d27 100644 (file)
@@ -14,6 +14,7 @@ CLASS(Shotgun, Weapon)
 /* crosshair */ ATTRIB(Shotgun, w_crosshair, string, "gfx/crosshairshotgun");
 /* crosshair */ ATTRIB(Shotgun, w_crosshair_size, float, 0.65);
 /* wepimg    */ ATTRIB(Shotgun, model2, string, "weaponshotgun");
+/* wp_icon   */ ATTRIB(Shotgun, m_waypoint_icon, string, "waypoint_weapon_shotgun");
 /* refname   */ ATTRIB(Shotgun, netname, string, "shotgun");
 /* wepname   */ ATTRIB(Shotgun, m_name, string, _("Shotgun"));
 
index 8a11b2e13e4c3a00a751400047f4ded606a94789..fd3c74bbef08b2c028dcf2b28118b23639a0f275 100644 (file)
@@ -15,6 +15,7 @@ CLASS(Vortex, Weapon)
 /* crosshair */ ATTRIB(Vortex, w_crosshair_size, float, 0.65);
 /* reticle   */ ATTRIB(Vortex, w_reticle, string, "gfx/reticle_nex");
 /* wepimg    */ ATTRIB(Vortex, model2, string, "weaponnex");
+/* wp_icon   */ ATTRIB(Vortex, m_waypoint_icon, string, "waypoint_weapon_vortex");
 /* refname   */ ATTRIB(Vortex, netname, string, "vortex");
 /* wepname   */ ATTRIB(Vortex, m_name, string, _("Vortex"));