set g_buffs_jump 0 "jump buff: greatly increased jump height"
set g_buffs_jump_time 60 "jump buff carry time"
set g_buffs_jump_height 600 "jump height while holding jump buff"
-set g_buffs_flight 0 "flight buff: greatly decreased gravity"
-set g_buffs_flight_time 60 "flight buff carry time"
-set g_buffs_flight_gravity 0.3 "player gravity multiplier while holding flight buff"
set g_buffs_invisible 1 "invisible buff: carrier becomes invisible"
set g_buffs_invisible_time 60 "invisible buff carry time"
set g_buffs_invisible_alpha 0.15 "player invisibility multiplier while holding invisible buff"
}
BUFF_SPAWNFUNCS(jump, BUFF_JUMP)
-REGISTER_BUFF(FLIGHT) {
- this.m_prettyName = _("Flight");
- this.m_name = "flight";
- this.m_skin = 11;
- this.m_color = '0.33 0.56 1';
-}
-BUFF_SPAWNFUNCS(flight, BUFF_FLIGHT)
-
REGISTER_BUFF(INVISIBLE) {
this.m_prettyName = _("Invisible");
this.m_name = "invisible";
float autocvar_g_buffs_speed_regen;
float autocvar_g_buffs_vampire_damage_steal;
float autocvar_g_buffs_invisible_alpha;
-float autocvar_g_buffs_flight_gravity;
float autocvar_g_buffs_jump_height;
float autocvar_g_buffs_inferno_burntime_factor;
float autocvar_g_buffs_inferno_burntime_min_time;
.int buff_ammo_prev_clipload;
// invisible
.float buff_invisible_prev_alpha;
-// flight
-.float buff_flight_prev_gravity;
// medic
.float buff_medic_healtime;
// disability
MUTATOR_HOOKFUNCTION(buffs, OnEntityPreSpawn, CBC_ORDER_LAST)
{SELFPARAM();
- if (self.classname == "item_flight" && cvar("g_buffs") && cvar("g_buffs_flight"))
- {
- buff_Init_Compat(self, BUFF_FLIGHT);
- return true;
- }
if(autocvar_g_buffs_replace_powerups)
switch(self.classname)
{
BUFF_ONREM(BUFF_INVISIBLE)
self.alpha = self.buff_invisible_prev_alpha;
- BUFF_ONADD(BUFF_FLIGHT)
- {
- self.buff_flight_prev_gravity = self.gravity;
- self.gravity = autocvar_g_buffs_flight_gravity;
- }
-
- BUFF_ONREM(BUFF_FLIGHT)
- self.gravity = self.buff_flight_prev_gravity;
-
self.oldbuffs = self.buffs;
if(self.buffs)
{
return sprintf("%s%s", rgb_to_hexcolor(b.m_color), b.m_prettyName);
}
-#ifndef MENUQC
-REGISTER_MUTATOR(buffs_flight, true);
-MUTATOR_HOOKFUNCTION(buffs_flight, IsFlying)
-{
- noref entity e = MUTATOR_ARGV(0, entity);
- return BUFFS_STAT(e) & BUFF_FLIGHT.m_itemid;
-}
-#endif
-
#ifdef CSQC
REGISTER_MUTATOR(cl_buffs, true);
MUTATOR_HOOKFUNCTION(cl_buffs, HUD_Powerups_add)
InitializeEntity(self, target_give_init, INITPRIO_FINDTARGET);
}
-//spawnfunc(item_flight) /* handled by buffs mutator or jetpack */
+//spawnfunc(item_flight) /* handled by jetpack */
//spawnfunc(item_haste) /* handled by buffs mutator */
//spawnfunc(item_health) /* handled in t_quake.qc */
//spawnfunc(item_health_large) /* handled in t_items.qc */