From: TimePath Date: Fri, 21 Aug 2015 08:57:07 +0000 (+1000) Subject: Merge branch 'master' into TimePath/guide X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b9359ac5b94cded57c14dd79bebe26ef13322a96;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into TimePath/guide # Conflicts: # qcsrc/Makefile # qcsrc/common/items/item/ammo.qc # qcsrc/common/items/item/jetpack.qc # qcsrc/common/items/item/powerup.qc --- b9359ac5b94cded57c14dd79bebe26ef13322a96 diff --cc qcsrc/common/items/item/jetpack.qc index fa286c93ec,25dd9b131c..856704dd84 --- a/qcsrc/common/items/item/jetpack.qc +++ b/qcsrc/common/items/item/jetpack.qc @@@ -3,30 -3,26 +3,27 @@@ #include "../../../server/constants.qh" #endif - REGISTER_ITEM(Jetpack, Pickup) { + #include "ammo.qh" + #include "powerup.qh" + + REGISTER_ITEM(Jetpack, Powerup) { this.m_model = "models/items/g_jetpack.md3"; this.m_name = "Jet pack"; + this.m_icon = "jetpack"; #ifdef SVQC this.m_botvalue = BOT_PICKUP_RATING_LOW; - this.m_itemflags = FL_POWERUP; this.m_itemid = IT_JETPACK; this.m_pickupevalfunc = commodity_pickupevalfunc; - this.m_respawntime = GET(g_pickup_respawntime_powerup); - this.m_respawntimejitter = GET(g_pickup_respawntimejitter_powerup); #endif } - REGISTER_ITEM(JetpackFuel, Pickup) { - this.m_model = "models/items/g_fuel.md3"; - this.m_name = "Fuel"; - this.m_icon = "ammo_fuel"; + REGISTER_ITEM(JetpackFuel, Ammo) { + this.m_model = "models/items/g_fuel.md3"; + this.m_name = "Fuel"; - this.m_ammoPic = "ammo_fuel"; ++ this.m_icon = "ammo_fuel"; #ifdef SVQC - this.m_botvalue = BOT_PICKUP_RATING_LOW; - this.m_itemid = IT_FUEL; - this.m_pickupevalfunc = commodity_pickupevalfunc; - this.m_respawntime = GET(g_pickup_respawntime_ammo); - this.m_respawntimejitter = GET(g_pickup_respawntimejitter_ammo); + this.m_botvalue = BOT_PICKUP_RATING_LOW; + this.m_itemid = IT_FUEL; #endif } diff --cc qcsrc/common/items/item/powerup.qc index d1e017c6b8,c4bfb39361..fe32582118 --- a/qcsrc/common/items/item/powerup.qc +++ b/qcsrc/common/items/item/powerup.qc @@@ -5,17 -8,11 +8,13 @@@ REGISTER_ITEM(Strength, Powerup) this.m_model = "models/items/g_strength.md3"; this.m_sound = "misc/powerup.wav"; this.m_name = "Strength Powerup"; + this.m_icon = "strength"; - #ifdef SVQC this.m_itemid = IT_STRENGTH; - #endif } REGISTER_ITEM(Shield, Powerup) { this.m_model = "models/items/g_invincible.md3"; this.m_sound = "misc/powerup_shield.wav"; this.m_name = "Shield"; + this.m_icon = "shield"; - #ifdef SVQC this.m_itemid = IT_INVINCIBLE; - #endif } diff --cc qcsrc/common/weapons/all.qc index 72c92471a9,9f78f64548..3f0d6a0978 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@@ -353,14 -289,14 +289,14 @@@ void W_RandomWeapons(entity e, float n string GetAmmoPicture(.int ammotype) { - switch(ammotype) + switch (ammotype) { - case ammo_shells: return "ammo_shells"; - case ammo_nails: return "ammo_bullets"; - case ammo_rockets: return "ammo_rockets"; - case ammo_cells: return "ammo_cells"; - case ammo_plasma: return "ammo_cells"; - case ammo_fuel: return "ammo_fuel"; - case ammo_shells: return ITEM_Shells.m_ammoPic; - case ammo_nails: return ITEM_Bullets.m_ammoPic; - case ammo_rockets: return ITEM_Rockets.m_ammoPic; - case ammo_cells: return ITEM_Cells.m_ammoPic; - case ammo_plasma: return ITEM_Plasma.m_ammoPic; - case ammo_fuel: return ITEM_JetpackFuel.m_ammoPic; ++ case ammo_shells: return ITEM_Shells.m_icon; ++ case ammo_nails: return ITEM_Bullets.m_icon; ++ case ammo_rockets: return ITEM_Rockets.m_icon; ++ case ammo_cells: return ITEM_Cells.m_icon; ++ case ammo_plasma: return ITEM_Plasma.m_icon; ++ case ammo_fuel: return ITEM_JetpackFuel.m_icon; default: return ""; // wtf, no ammo type? } }