#include "invisibility.qh"
#ifdef SVQC
-METHOD(Invisibility, m_remove, void(StatusEffects this, entity actor, int removal_type))
+METHOD(InvisibilityStatusEffect, m_remove, void(StatusEffects this, entity actor, int removal_type))
{
bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
if(removal_type == STATUSEFFECT_REMOVE_TIMEOUT && wasactive && IS_PLAYER(actor))
if(actor.exteriorweaponentity)
actor.exteriorweaponentity.alpha = default_weapon_alpha;
}
- SUPER(Invisibility).m_remove(this, actor, removal_type);
+ SUPER(InvisibilityStatusEffect).m_remove(this, actor, removal_type);
}
-METHOD(Invisibility, m_apply, void(StatusEffects this, entity actor, float eff_time, float eff_flags))
+METHOD(InvisibilityStatusEffect, m_apply, void(StatusEffects this, entity actor, float eff_time, float eff_flags))
{
bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
if(!wasactive && IS_PLAYER(actor))
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_INVISIBILITY, actor.netname);
Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERUP_INVISIBILITY);
}
- SUPER(Invisibility).m_apply(this, actor, eff_time, eff_flags);
+ SUPER(InvisibilityStatusEffect).m_apply(this, actor, eff_time, eff_flags);
}
-METHOD(Invisibility, m_tick, void(StatusEffects this, entity actor))
+METHOD(InvisibilityStatusEffect, m_tick, void(StatusEffects this, entity actor))
{
play_countdown(actor, StatusEffects_gettime(this, actor), SND_POWEROFF);
if(!actor.vehicle)
if(actor.exteriorweaponentity)
actor.exteriorweaponentity.alpha = autocvar_g_balance_powerup_invisibility_alpha;
}
- SUPER(Invisibility).m_tick(this, actor);
+ SUPER(InvisibilityStatusEffect).m_tick(this, actor);
}
#endif
#ifdef MENUQC
-METHOD(Invisibility, describe, string(Invisibility this))
+METHOD(InvisibilityItem, describe, string(InvisibilityItem this))
{
- TC(Invisibility, this);
+ TC(InvisibilityItem, this);
return sprintf(_("The %s powerup increases your translucency while the powerup is active, making it more difficult for enemies to see you. "
"This powerup is often present in InstaGib\n\n"
"Since it is a powerup, it will drop if you die while holding it"),
- COLORED_NAME(STATUSEFFECT_Invisibility));
+ COLORED_NAME(this));
}
#endif
item.invisibility_finished = (item.count) ? item.count : autocvar_g_balance_powerup_invisibility_time;
}
#endif
-REGISTER_ITEM(Invisibility, NEW(Powerup)) {
- this.m_canonical_spawnfunc = "item_invisibility";
+
+CLASS(InvisibilityItem, Powerup)
+ ATTRIB(InvisibilityItem, m_canonical_spawnfun, string, "item_invisibility");
#ifdef SVQC
- this.m_iteminit = powerup_invisibility_init;
+ ATTRIB(InvisibilityItem, m_iteminit, void(Pickup def, entity item), powerup_invisibility_init);
#endif
#ifdef GAMEQC
- this.spawnflags = ITEM_FLAG_NORMAL;
- this.m_itemid = IT_INVISIBILITY;
- this.m_model = MDL_BUFF; // TODO: MDL_Invisibility_ITEM when new model available
- this.m_skin = 12;
- this.m_sound = SND_Invisibility;
- this.m_glow = true;
- this.m_respawnsound = SND_STRENGTH_RESPAWN;
+ ATTRIB(InvisibilityItem, spawnflags, int, ITEM_FLAG_NORMAL);
+ ATTRIB(InvisibilityItem, m_itemid, int, IT_INVISIBILITY);
+ ATTRIB(InvisibilityItem, m_model, Model, MDL_BUFF); // TODO: MDL_Invisibility_ITEM when new model available
+ ATTRIB(InvisibilityItem, m_skin, int, 12);
+ ATTRIB(InvisibilityItem, m_sound, Sound, SND_Invisibility);
+ ATTRIB(InvisibilityItem, m_glow, bool, true);
+ ATTRIB(InvisibilityItem, m_respawnsound, Sound, SND_STRENGTH_RESPAWN);
#endif
- this.netname = "invisibility";
- this.m_name = _("Invisibility");
- this.m_icon = "buff_invisible";
- this.m_color = COLOR_POWERUP_INVISIBILITY;
- this.m_waypoint = _("Invisibility");
- this.m_waypointblink = 2;
-}
+ ATTRIB(InvisibilityItem, netname, string, "invisibility");
+ ATTRIB(InvisibilityItem, m_name, string, _("Invisibility"));
+ ATTRIB(InvisibilityItem, m_icon, string, "buff_invisible");
+ ATTRIB(InvisibilityItem, m_color, vector, COLOR_POWERUP_INVISIBILITY);
+ ATTRIB(InvisibilityItem, m_waypoint, string, _("Invisibility"));
+ ATTRIB(InvisibilityItem, m_waypointblink, int, 2);
+ENDCLASS(InvisibilityItem)
+REGISTER_ITEM(Invisibility, NEW(InvisibilityItem));
SPAWNFUNC_ITEM(item_invisibility, ITEM_Invisibility)
SPAWNFUNC_ITEM(item_buff_invisibility, ITEM_Invisibility)
-CLASS(Invisibility, Powerups)
- ATTRIB(Invisibility, netname, string, "invisibility");
- ATTRIB(Invisibility, m_name, string, _("Invisibility"));
- ATTRIB(Invisibility, m_color, vector, COLOR_POWERUP_INVISIBILITY);
- ATTRIB(Invisibility, m_icon, string, "buff_invisible");
-ENDCLASS(Invisibility)
-REGISTER_STATUSEFFECT(Invisibility, NEW(Invisibility));
+CLASS(InvisibilityStatusEffect, Powerups)
+ ATTRIB(InvisibilityStatusEffect, netname, string, "invisibility");
+ ATTRIB(InvisibilityStatusEffect, m_name, string, _("Invisibility"));
+ ATTRIB(InvisibilityStatusEffect, m_color, vector, COLOR_POWERUP_INVISIBILITY);
+ ATTRIB(InvisibilityStatusEffect, m_icon, string, "buff_invisible");
+ENDCLASS(InvisibilityStatusEffect)
+REGISTER_STATUSEFFECT(Invisibility, NEW(InvisibilityStatusEffect));
#include "shield.qh"
#ifdef SVQC
-METHOD(Shield, m_remove, void(StatusEffects this, entity actor, int removal_type))
+METHOD(ShieldStatusEffect, m_remove, void(StatusEffects this, entity actor, int removal_type))
{
bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
if(removal_type == STATUSEFFECT_REMOVE_TIMEOUT && wasactive && IS_PLAYER(actor))
if(wasactive)
stopsound(actor, CH_TRIGGER_SINGLE); // get rid of the pickup sound
actor.effects &= ~(EF_RED | EF_ADDITIVE | EF_FULLBRIGHT);
- SUPER(Shield).m_remove(this, actor, removal_type);
+ SUPER(ShieldStatusEffect).m_remove(this, actor, removal_type);
}
-METHOD(Shield, m_apply, void(StatusEffects this, entity actor, float eff_time, float eff_flags))
+METHOD(ShieldStatusEffect, m_apply, void(StatusEffects this, entity actor, float eff_time, float eff_flags))
{
bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
if(!wasactive && IS_PLAYER(actor))
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_SHIELD, actor.netname);
Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERUP_SHIELD);
}
- SUPER(Shield).m_apply(this, actor, eff_time, eff_flags);
+ SUPER(ShieldStatusEffect).m_apply(this, actor, eff_time, eff_flags);
}
-METHOD(Shield, m_tick, void(StatusEffects this, entity actor))
+METHOD(ShieldStatusEffect, m_tick, void(StatusEffects this, entity actor))
{
play_countdown(actor, StatusEffects_gettime(this, actor), SND_POWEROFF);
actor.effects |= (EF_RED | EF_ADDITIVE | EF_FULLBRIGHT);
- SUPER(Shield).m_tick(this, actor);
+ SUPER(ShieldStatusEffect).m_tick(this, actor);
}
#endif
#ifdef CSQC
-METHOD(Shield, m_active, bool(StatusEffects this, entity actor))
+METHOD(ShieldStatusEffect, m_active, bool(StatusEffects this, entity actor))
{
if(autocvar__hud_configure)
return true;
- return SUPER(Shield).m_active(this, actor);
+ return SUPER(ShieldStatusEffect).m_active(this, actor);
}
-METHOD(Shield, m_tick, void(StatusEffects this, entity actor))
+METHOD(ShieldStatusEffect, m_tick, void(StatusEffects this, entity actor))
{
if(this.m_hidden)
return;
}
#endif
#ifdef MENUQC
-METHOD(Shield, describe, string(Shield this))
+METHOD(ShieldItem, describe, string(ShieldItem this))
{
- TC(Shield, this);
+ TC(ShieldItem, this);
return sprintf(_("The %s powerup greatly decreases the damage you take until the powerup expires, having a compounding effect with armor. "
"It also makes you more resistant to knockback\n\n"
"Since it is a powerup, it will drop if you die while holding it"),
- COLORED_NAME(STATUSEFFECT_Shield));
+ COLORED_NAME(this));
}
#endif
item.invincible_finished = (item.count) ? item.count : autocvar_g_balance_powerup_invincible_time;
}
#endif
-REGISTER_ITEM(Shield, NEW(Powerup)) {
- this.m_canonical_spawnfunc = "item_shield";
+
+CLASS(ShieldItem, Powerup)
+ ATTRIB(ShieldItem, m_canonical_spawnfunc, string, "item_shield");
#ifdef SVQC
- this.m_iteminit = powerup_shield_init;
+ ATTRIB(ShieldItem, m_iteminit, void(Pickup def, entity item), powerup_shield_init);
#endif
#ifdef GAMEQC
- this.spawnflags = ITEM_FLAG_NORMAL;
- this.m_itemid = IT_INVINCIBLE;
- this.m_model = MDL_Shield_ITEM;
- this.m_sound = SND_Shield;
- this.m_glow = true;
- this.m_respawnsound = SND_SHIELD_RESPAWN;
+ ATTRIB(ShieldItem, spawnflags, int, ITEM_FLAG_NORMAL);
+ ATTRIB(ShieldItem, m_itemid, int, IT_INVINCIBLE);
+ ATTRIB(ShieldItem, m_model, Model, MDL_Shield_ITEM);
+ ATTRIB(ShieldItem, m_sound, Sound, SND_Shield);
+ ATTRIB(ShieldItem, m_glow, bool, true);
+ ATTRIB(ShieldItem, m_respawnsound, Sound, SND_SHIELD_RESPAWN);
#endif
- this.netname = "invincible";
- this.m_name = _("Shield");
- this.m_icon = "shield";
- this.m_color = COLOR_POWERUP_SHIELD;
- this.m_waypoint = _("Shield");
- this.m_waypointblink = 2;
-}
+ ATTRIB(ShieldItem, netname, string, "invincible");
+ ATTRIB(ShieldItem, m_name, string, _("Shield"));
+ ATTRIB(ShieldItem, m_icon, string, "shield");
+ ATTRIB(ShieldItem, m_color, vector, COLOR_POWERUP_SHIELD);
+ ATTRIB(ShieldItem, m_waypoint, string, _("Shield"));
+ ATTRIB(ShieldItem, m_waypointblink, int, 2);
+ENDCLASS(ShieldItem)
+REGISTER_ITEM(Shield, NEW(ShieldItem));
SPAWNFUNC_ITEM(item_shield, ITEM_Shield)
SPAWNFUNC_ITEM(item_invincible, ITEM_Shield)
-CLASS(Shield, Powerups)
- ATTRIB(Shield, netname, string, "invincible"); // NOTE: referring to as invincible so that it matches the powerup item
- ATTRIB(Shield, m_name, string, _("Shield"));
- ATTRIB(Shield, m_color, vector, COLOR_POWERUP_SHIELD);
- ATTRIB(Shield, m_icon, string, "shield");
-ENDCLASS(Shield)
-REGISTER_STATUSEFFECT(Shield, NEW(Shield));
+CLASS(ShieldStatusEffect, Powerups)
+ ATTRIB(ShieldStatusEffect, netname, string, "invincible"); // NOTE: referring to as invincible so that it matches the powerup item
+ ATTRIB(ShieldStatusEffect, m_name, string, _("Shield"));
+ ATTRIB(ShieldStatusEffect, m_icon, string, "shield");
+ENDCLASS(ShieldStatusEffect)
+REGISTER_STATUSEFFECT(Shield, NEW(ShieldStatusEffect));
#include "speed.qh"
#ifdef SVQC
-METHOD(Speed, m_remove, void(StatusEffects this, entity actor, int removal_type))
+METHOD(SpeedStatusEffect, m_remove, void(StatusEffects this, entity actor, int removal_type))
{
bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
if(removal_type == STATUSEFFECT_REMOVE_TIMEOUT && wasactive && IS_PLAYER(actor))
}
if(wasactive)
stopsound(actor, CH_TRIGGER_SINGLE); // get rid of the pickup sound
- SUPER(Speed).m_remove(this, actor, removal_type);
+ SUPER(SpeedStatusEffect).m_remove(this, actor, removal_type);
}
-METHOD(Speed, m_apply, void(StatusEffects this, entity actor, float eff_time, float eff_flags))
+METHOD(SpeedStatusEffect, m_apply, void(StatusEffects this, entity actor, float eff_time, float eff_flags))
{
bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
if(!wasactive && IS_PLAYER(actor))
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_SPEED, actor.netname);
Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERUP_SPEED);
}
- SUPER(Speed).m_apply(this, actor, eff_time, eff_flags);
+ SUPER(SpeedStatusEffect).m_apply(this, actor, eff_time, eff_flags);
}
-METHOD(Speed, m_tick, void(StatusEffects this, entity actor))
+METHOD(SpeedStatusEffect, m_tick, void(StatusEffects this, entity actor))
{
play_countdown(actor, StatusEffects_gettime(this, actor), SND_POWEROFF);
- SUPER(Speed).m_tick(this, actor);
+ SUPER(SpeedStatusEffect).m_tick(this, actor);
}
#endif
#ifdef MENUQC
-METHOD(Speed, describe, string(Speed this))
+METHOD(SpeedItem, describe, string(SpeedItem this))
{
- TC(Speed, this);
+ TC(SpeedItem, this);
return sprintf(_("The %s powerup increases your movement speed, attack speed, and health regeneration speed while the powerup is active. "
"However, it also makes you a bit more vulnerable to incoming attacks\n\n"
"Since it is a powerup, it will drop if you die while holding it"),
- COLORED_NAME(STATUSEFFECT_Speed));
+ COLORED_NAME(this));
}
#endif
item.speed_finished = (item.count) ? item.count : autocvar_g_balance_powerup_speed_time;
}
#endif
-REGISTER_ITEM(Speed, NEW(Powerup)) {
- this.m_canonical_spawnfunc = "item_speed";
+
+CLASS(SpeedItem, Powerup)
+ ATTRIB(SpeedItem, m_canonical_spawnfunc, string, "item_speed");
#ifdef SVQC
- this.m_iteminit = powerup_speed_init;
+ ATTRIB(SpeedItem, m_iteminit, void(Pickup def, entity item), powerup_speed_init);
#endif
#ifdef GAMEQC
- this.spawnflags = ITEM_FLAG_NORMAL;
- this.m_itemid = IT_SPEED;
- this.m_model = MDL_BUFF; // TODO: MDL_Speed_ITEM when new model available
- this.m_skin = 9;
- this.m_sound = SND_Speed;
- this.m_glow = true;
- this.m_respawnsound = SND_SHIELD_RESPAWN;
+ ATTRIB(SpeedItem, spawnflags, int, ITEM_FLAG_NORMAL);
+ ATTRIB(SpeedItem, m_itemid, int, IT_SPEED);
+ ATTRIB(SpeedItem, m_model, Model, MDL_BUFF); // TODO: MDL_Speed_ITEM when new model available
+ ATTRIB(SpeedItem, m_skin, int, 9);
+ ATTRIB(SpeedItem, m_sound, Sound, SND_Speed);
+ ATTRIB(SpeedItem, m_glow, bool, true);
+ ATTRIB(SpeedItem, m_respawnsound, Sound, SND_SHIELD_RESPAWN);
#endif
- this.netname = "speed";
- this.m_name = _("Speed");
- this.m_icon = "buff_speed";
- this.m_color = COLOR_POWERUP_SPEED;
- this.m_waypoint = _("Speed");
- this.m_waypointblink = 2;
-}
+ ATTRIB(SpeedItem, netname, string, "speed");
+ ATTRIB(SpeedItem, m_name, string, _("Speed"));
+ ATTRIB(SpeedItem, m_icon, string, "buff_speed");
+ ATTRIB(SpeedItem, m_color, vector, COLOR_POWERUP_SPEED);
+ ATTRIB(SpeedItem, m_waypoint, string, _("Speed"));
+ ATTRIB(SpeedItem, m_waypointblink, int, 2);
+ENDCLASS(SpeedItem)
+REGISTER_ITEM(Speed, NEW(SpeedItem));
SPAWNFUNC_ITEM(item_speed, ITEM_Speed)
SPAWNFUNC_ITEM(item_buff_speed, ITEM_Speed)
-CLASS(Speed, Powerups)
- ATTRIB(Speed, netname, string, "speed");
- ATTRIB(Speed, m_name, string, _("Speed"));
- ATTRIB(Speed, m_color, vector, COLOR_POWERUP_SPEED);
- ATTRIB(Speed, m_icon, string, "buff_speed");
-ENDCLASS(Speed)
-REGISTER_STATUSEFFECT(Speed, NEW(Speed));
+CLASS(SpeedStatusEffect, Powerups)
+ ATTRIB(SpeedStatusEffect, netname, string, "speed");
+ ATTRIB(SpeedStatusEffect, m_name, string, _("Speed"));
+ ATTRIB(SpeedStatusEffect, m_color, vector, COLOR_POWERUP_SPEED);
+ ATTRIB(SpeedStatusEffect, m_icon, string, "buff_speed");
+ENDCLASS(SpeedStatusEffect)
+REGISTER_STATUSEFFECT(Speed, NEW(SpeedStatusEffect));
#include "strength.qh"
#ifdef SVQC
-METHOD(Strength, m_remove, void(StatusEffects this, entity actor, int removal_type))
+METHOD(StrengthStatusEffect, m_remove, void(StatusEffects this, entity actor, int removal_type))
{
bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
if(removal_type == STATUSEFFECT_REMOVE_TIMEOUT && wasactive && IS_PLAYER(actor))
if(wasactive)
stopsound(actor, CH_TRIGGER_SINGLE); // get rid of the pickup sound
actor.effects &= ~(EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT);
- SUPER(Strength).m_remove(this, actor, removal_type);
+ SUPER(StrengthStatusEffect).m_remove(this, actor, removal_type);
}
-METHOD(Strength, m_apply, void(StatusEffects this, entity actor, float eff_time, float eff_flags))
+METHOD(StrengthStatusEffect, m_apply, void(StatusEffects this, entity actor, float eff_time, float eff_flags))
{
bool wasactive = (actor.statuseffects && (actor.statuseffects.statuseffect_flags[this.m_id] & STATUSEFFECT_FLAG_ACTIVE));
if(!wasactive && IS_PLAYER(actor))
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_POWERUP_STRENGTH, actor.netname);
Send_Notification(NOTIF_ONE, actor, MSG_CENTER, CENTER_POWERUP_STRENGTH);
}
- SUPER(Strength).m_apply(this, actor, eff_time, eff_flags);
+ SUPER(StrengthStatusEffect).m_apply(this, actor, eff_time, eff_flags);
}
-METHOD(Strength, m_tick, void(StatusEffects this, entity actor))
+METHOD(StrengthStatusEffect, m_tick, void(StatusEffects this, entity actor))
{
play_countdown(actor, StatusEffects_gettime(this, actor), SND_POWEROFF);
actor.effects |= (EF_BLUE | EF_ADDITIVE | EF_FULLBRIGHT);
- SUPER(Strength).m_tick(this, actor);
+ SUPER(StrengthStatusEffect).m_tick(this, actor);
}
#endif
#ifdef CSQC
-METHOD(Strength, m_active, bool(StatusEffects this, entity actor))
+METHOD(StrengthStatusEffect, m_active, bool(StatusEffects this, entity actor))
{
if(autocvar__hud_configure)
return true;
- return SUPER(Strength).m_active(this, actor);
+ return SUPER(StrengthStatusEffect).m_active(this, actor);
}
-METHOD(Strength, m_tick, void(StatusEffects this, entity actor))
+METHOD(StrengthStatusEffect, m_tick, void(StatusEffects this, entity actor))
{
if(this.m_hidden)
return;
}
#endif
#ifdef MENUQC
-METHOD(Strength, describe, string(Strength this))
+METHOD(StrengthItem, describe, string(StrengthItem this))
{
- TC(Strength, this);
+ TC(StrengthItem, this);
return sprintf(_("The %s powerup greatly increases the damage you deal, until the powerup expires. "
"It also increases the knockback that your attacks deal\n\n"
"The damage and knockback you deal to yourself also increases but by a smaller amount\n\n"
"Since it is a powerup, it will drop if you die while holding it"),
- COLORED_NAME(STATUSEFFECT_Strength));
+ COLORED_NAME(this));
}
#endif
item.strength_finished = (item.count) ? item.count : autocvar_g_balance_powerup_strength_time;
}
#endif
-REGISTER_ITEM(Strength, NEW(Powerup)) {
- this.m_canonical_spawnfunc = "item_strength";
+
+CLASS(StrengthItem, Powerup)
+ ATTRIB(StrengthItem, m_canonical_spawnfunc, string, "item_strength");
#ifdef SVQC
- this.m_iteminit = powerup_strength_init;
+ ATTRIB(StrengthItem, m_iteminit, void(Pickup def, entity item), 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;
+ ATTRIB(StrengthItem, spawnflags, int, ITEM_FLAG_NORMAL);
+ ATTRIB(StrengthItem, m_itemid, int, IT_STRENGTH);
+ ATTRIB(StrengthItem, m_model, Model, MDL_Strength_ITEM);
+ ATTRIB(StrengthItem, m_sound, Sound, SND_Strength);
+ ATTRIB(StrengthItem, m_glow, bool, true);
+ ATTRIB(StrengthItem, m_respawnsound, Sound, SND_STRENGTH_RESPAWN);
#endif
- this.netname = "strength";
- this.m_name = _("Strength");
- this.m_icon = "strength";
- this.m_color = COLOR_POWERUP_STRENGTH;
- this.m_waypoint = _("Strength");
- this.m_waypointblink = 2;
-}
+ ATTRIB(StrengthItem, netname, string, "strength");
+ ATTRIB(StrengthItem, m_name, string, _("Strength"));
+ ATTRIB(StrengthItem, m_icon, string, "strength");
+ ATTRIB(StrengthItem, m_color, vector, COLOR_POWERUP_STRENGTH);
+ ATTRIB(StrengthItem, m_waypoint, string, _("Strength"));
+ ATTRIB(StrengthItem, m_waypointblink, int, 2);
+ENDCLASS(StrengthItem)
+REGISTER_ITEM(Strength, NEW(StrengthItem));
SPAWNFUNC_ITEM(item_strength, ITEM_Strength)
-CLASS(Strength, Powerups)
- ATTRIB(Strength, netname, string, "strength");
- ATTRIB(Strength, m_name, string, _("Strength"));
- ATTRIB(Strength, m_color, vector, COLOR_POWERUP_STRENGTH);
- ATTRIB(Strength, m_icon, string, "strength");
-ENDCLASS(Strength)
-REGISTER_STATUSEFFECT(Strength, NEW(Strength));
+CLASS(StrengthStatusEffect, Powerups)
+ ATTRIB(StrengthStatusEffect, netname, string, "strength");
+ ATTRIB(StrengthStatusEffect, m_name, string, _("Strength"));
+ ATTRIB(StrengthStatusEffect, m_icon, string, "strength");
+ENDCLASS(StrengthStatusEffect)
+REGISTER_STATUSEFFECT(Strength, NEW(StrengthStatusEffect));
ATTRIB(Powerup, m_respawntime, float(), GET(g_pickup_respawntime_powerup));
ATTRIB(Powerup, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_powerup));
#endif
+#ifdef MENUQC
+ METHOD(Powerup, describe, string(Powerup this))
+ {
+ TC(Powerup, this);
+ return SUPER(Object).describe(this);
+ }
+#endif
ENDCLASS(Powerup)
#include <common/mutators/mutator/status_effects/all.qh>
#ifdef GAMEQC
ATTRIB(Powerups, m_sound_rm, Sound, SND_POWEROFF);
#endif
-#ifdef MENUQC
- METHOD(Powerups, describe, string(Powerups this))
- {
- TC(Powerups, this);
- return SUPER(Object).describe(this);
- }
-#endif
ENDCLASS(Powerups)