X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Finstagib%2Fitems.qh;h=abc57a4a03a9b85472370221d452094dad77689d;hb=b4101f6e6d27c9820bceba20b3f71cfbbe83c557;hp=597fddc11e2fee1a4eb99a97aaf679dccb6fd975;hpb=d5176859998b4f2a20b13a629fd7b5e5df5eb58b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/instagib/items.qh b/qcsrc/common/mutators/mutator/instagib/items.qh index 597fddc11..abc57a4a0 100644 --- a/qcsrc/common/mutators/mutator/instagib/items.qh +++ b/qcsrc/common/mutators/mutator/instagib/items.qh @@ -16,21 +16,21 @@ SOUND(VaporizerCells, Item_Sound("itempickup")); #ifdef SVQC int autocvar_g_instagib_ammo_drop; -void ammo_vaporizercells_init(entity item) +void ammo_vaporizercells_init(Pickup this, entity item) { - if(!item.ammo_cells) - item.ammo_cells = autocvar_g_instagib_ammo_drop; + if(!GetResource(item, RES_CELLS)) + SetResourceExplicit(item, RES_CELLS, autocvar_g_instagib_ammo_drop); } #endif REGISTER_ITEM(VaporizerCells, Ammo) { this.m_canonical_spawnfunc = "item_vaporizer_cells"; - this.spawnflags = ITEM_FLAG_MUTATORBLOCKED; #ifdef GAMEQC + this.spawnflags = ITEM_FLAG_MUTATORBLOCKED; this.m_model = MDL_VaporizerCells_ITEM; this.m_sound = SND_VaporizerCells; #endif this.netname = "vaporizer_cells"; - this.m_name = "Vaporizer Ammo"; + this.m_name = _("Vaporizer ammo"); this.m_icon = "ammo_supercells"; #ifdef SVQC this.m_botvalue = 2000; @@ -52,11 +52,11 @@ SOUND(ExtraLife, Item_Sound("megahealth")); REGISTER_ITEM(ExtraLife, Powerup) { this.m_canonical_spawnfunc = "item_extralife"; #ifdef GAMEQC - this.m_model = MDL_ExtraLife_ITEM; + this.m_model = MDL_ExtraLife_ITEM; this.m_sound = SND_ExtraLife; #endif this.netname = "extralife"; - this.m_name = "Extra life"; + this.m_name = _("Extra life"); this.m_icon = "item_mega_health"; this.m_color = '1 0 0'; this.m_waypoint = _("Extra life"); @@ -75,19 +75,20 @@ SOUND(Invisibility, Item_Sound("powerup")); /// \brief Initializes the invisibility powerup. /// \param[in,out] item Item to initialize. /// \return No return. -void powerup_invisibility_init(entity item); +void powerup_invisibility_init(Pickup this, entity item); #endif REGISTER_ITEM(Invisibility, Powerup) { this.m_canonical_spawnfunc = "item_invisibility"; #ifdef GAMEQC + this.spawnflags = ITEM_FLAG_MUTATORBLOCKED; this.m_model = MDL_Invisibility_ITEM; this.m_sound = SND_Invisibility; this.m_glow = true; this.m_respawnsound = SND_STRENGTH_RESPAWN; #endif this.netname = "invisibility"; - this.m_name = "Invisibility"; + this.m_name = _("Invisibility"); this.m_icon = "strength"; this.m_color = '0 0 1'; this.m_waypoint = _("Invisibility"); @@ -109,19 +110,20 @@ SOUND(Speed, Item_Sound("powerup_shield")); /// \brief Initializes the speed powerup. /// \param[in,out] item Item to initialize. /// \return No return. -void powerup_speed_init(entity item); +void powerup_speed_init(Pickup this, entity item); #endif REGISTER_ITEM(Speed, Powerup) { this.m_canonical_spawnfunc = "item_speed"; #ifdef GAMEQC + this.spawnflags = ITEM_FLAG_MUTATORBLOCKED; this.m_model = MDL_Speed_ITEM; this.m_sound = SND_Speed; this.m_glow = true; this.m_respawnsound = SND_SHIELD_RESPAWN; #endif this.netname = "speed"; - this.m_name = "Speed"; + this.m_name = _("Speed"); this.m_icon = "shield"; this.m_color = '1 0 1'; this.m_waypoint = _("Speed");