From 9d3e8d70a1e35074d387efa571555197ac784973 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Fri, 15 Jun 2018 22:02:53 +0300 Subject: [PATCH] Waypoint icons: Updated core weapons. --- qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc | 7 ++++--- qcsrc/common/weapons/weapon.qh | 2 ++ qcsrc/common/weapons/weapon/blaster.qh | 1 + qcsrc/common/weapons/weapon/crylink.qh | 1 + qcsrc/common/weapons/weapon/devastator.qh | 1 + qcsrc/common/weapons/weapon/electro.qh | 1 + qcsrc/common/weapons/weapon/hagar.qh | 1 + qcsrc/common/weapons/weapon/machinegun.qh | 1 + qcsrc/common/weapons/weapon/minelayer.qh | 1 + qcsrc/common/weapons/weapon/mortar.qh | 1 + qcsrc/common/weapons/weapon/shotgun.qh | 1 + qcsrc/common/weapons/weapon/vortex.qh | 1 + 12 files changed, 16 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc index 30b41637c..f29e16796 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc @@ -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; diff --git a/qcsrc/common/weapons/weapon.qh b/qcsrc/common/weapons/weapon.qh index a3f2336a9..1a48a109a 100644 --- a/qcsrc/common/weapons/weapon.qh +++ b/qcsrc/common/weapons/weapon.qh @@ -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 */ diff --git a/qcsrc/common/weapons/weapon/blaster.qh b/qcsrc/common/weapons/weapon/blaster.qh index 7efbdf7a5..8ec58149e 100644 --- a/qcsrc/common/weapons/weapon/blaster.qh +++ b/qcsrc/common/weapons/weapon/blaster.qh @@ -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")); diff --git a/qcsrc/common/weapons/weapon/crylink.qh b/qcsrc/common/weapons/weapon/crylink.qh index 77e0b734e..47dd1f806 100644 --- a/qcsrc/common/weapons/weapon/crylink.qh +++ b/qcsrc/common/weapons/weapon/crylink.qh @@ -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")); diff --git a/qcsrc/common/weapons/weapon/devastator.qh b/qcsrc/common/weapons/weapon/devastator.qh index e858d54e4..f815cc071 100644 --- a/qcsrc/common/weapons/weapon/devastator.qh +++ b/qcsrc/common/weapons/weapon/devastator.qh @@ -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")); diff --git a/qcsrc/common/weapons/weapon/electro.qh b/qcsrc/common/weapons/weapon/electro.qh index 4018e5926..b1f97106b 100644 --- a/qcsrc/common/weapons/weapon/electro.qh +++ b/qcsrc/common/weapons/weapon/electro.qh @@ -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")); diff --git a/qcsrc/common/weapons/weapon/hagar.qh b/qcsrc/common/weapons/weapon/hagar.qh index 924326fb3..7c6014552 100644 --- a/qcsrc/common/weapons/weapon/hagar.qh +++ b/qcsrc/common/weapons/weapon/hagar.qh @@ -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")); diff --git a/qcsrc/common/weapons/weapon/machinegun.qh b/qcsrc/common/weapons/weapon/machinegun.qh index a7ede47a2..457c15e2e 100644 --- a/qcsrc/common/weapons/weapon/machinegun.qh +++ b/qcsrc/common/weapons/weapon/machinegun.qh @@ -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")); diff --git a/qcsrc/common/weapons/weapon/minelayer.qh b/qcsrc/common/weapons/weapon/minelayer.qh index f804aaf44..6c116ffe7 100644 --- a/qcsrc/common/weapons/weapon/minelayer.qh +++ b/qcsrc/common/weapons/weapon/minelayer.qh @@ -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")); diff --git a/qcsrc/common/weapons/weapon/mortar.qh b/qcsrc/common/weapons/weapon/mortar.qh index affec0dbc..69bebc752 100644 --- a/qcsrc/common/weapons/weapon/mortar.qh +++ b/qcsrc/common/weapons/weapon/mortar.qh @@ -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")); diff --git a/qcsrc/common/weapons/weapon/shotgun.qh b/qcsrc/common/weapons/weapon/shotgun.qh index e40b1d8a1..414646825 100644 --- a/qcsrc/common/weapons/weapon/shotgun.qh +++ b/qcsrc/common/weapons/weapon/shotgun.qh @@ -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")); diff --git a/qcsrc/common/weapons/weapon/vortex.qh b/qcsrc/common/weapons/weapon/vortex.qh index 8a11b2e13..fd3c74bbe 100644 --- a/qcsrc/common/weapons/weapon/vortex.qh +++ b/qcsrc/common/weapons/weapon/vortex.qh @@ -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")); -- 2.39.2