#pragma once #include #include #ifdef SVQC // For FL_POWERUP #include #include #endif #ifdef GAMEQC MODEL(Strength_ITEM, Item_Model("g_strength.md3")); SOUND(Strength, Item_Sound("powerup")); #endif #ifdef SVQC bool autocvar_g_powerups_strength; float autocvar_g_balance_powerup_strength_damage; float autocvar_g_balance_powerup_strength_force; float autocvar_g_balance_powerup_strength_selfdamage; float autocvar_g_balance_powerup_strength_selfforce; float autocvar_g_balance_powerup_strength_time; void powerup_strength_init(Pickup def, entity item) { if(!autocvar_g_powerups || !autocvar_g_powerups_strength) def.spawnflags |= ITEM_FLAG_MUTATORBLOCKED; if(!item.strength_finished) item.strength_finished = (item.count) ? item.count : autocvar_g_balance_powerup_strength_time; } #endif REGISTER_ITEM(Strength, Powerup) { this.m_canonical_spawnfunc = "item_strength"; #ifdef SVQC this.m_iteminit = powerup_strength_init; #endif #ifdef GAMEQC this.spawnflags = ITEM_FLAG_NORMAL; this.m_itemid = IT_STRENGTH; this.m_model = MDL_Strength_ITEM; this.m_sound = SND_Strength; this.m_glow = true; this.m_respawnsound = SND_STRENGTH_RESPAWN; #endif this.netname = "strength"; this.m_name = _("Strength"); this.m_icon = "strength"; this.m_color = '0 0 1'; this.m_waypoint = _("Strength"); this.m_waypointblink = 2; } SPAWNFUNC_ITEM(item_strength, ITEM_Strength) CLASS(Strength, Powerups) ATTRIB(Strength, netname, string, "strength"); ATTRIB(Strength, m_name, string, _("Strength")); ATTRIB(Strength, m_icon, string, "strength"); ENDCLASS(Strength) REGISTER_STATUSEFFECT(Strength, NEW(Strength));