--- /dev/null
+ring,models/relics/relic_ring
+mesh,models/relics/relic
+sign,models/relics/sign_magnet
\ No newline at end of file
set g_buffs_inferno_burntime_min_time 0.5 "minimum seconds of burn time"
set g_buffs_inferno_burntime_target_damage 150 "damage required for g_buffs_inferno_burntime_target_time seconds of burn"
set g_buffs_inferno_burntime_target_time 5 "seconds of burn given g_buffs_inferno_burntime_target_damage damage"
+set g_buffs_swapper 1 "swapper buff: press dropweapon to switch places with a nearby enemy"
+set g_buffs_swapper_time 60 "swapper buff carry time"
set g_buffs_swapper_range 1500 "maximum range of swapping with enemy"
+set g_buffs_magnet 1 "magnet buff: greatly increased item pickup range"
+set g_buffs_magnet_time 60 "magnet buff carry time"
+set g_buffs_magnet_range_item 450 "item pickup range"
REGISTER_BUFF(_("Invisible"),invisible,INVISIBLE,12,'0.9 0.9 0.9');
REGISTER_BUFF(_("Inferno"),inferno,INFERNO,16,'2 0 0');
REGISTER_BUFF(_("Swapper"),swapper,SWAPPER,17,'0.59 0 0.95');
+REGISTER_BUFF(_("Magnet"),magnet,MAGNET,18,'0.45 0.45 0.45');
#undef REGISTER_BUFF
#ifdef SVQC
BUFF_SPAWNFUNCS(invisible, BUFF_INVISIBLE)
BUFF_SPAWNFUNCS(inferno, BUFF_INFERNO)
BUFF_SPAWNFUNCS(swapper, BUFF_SWAPPER)
+BUFF_SPAWNFUNCS(magnet, BUFF_MAGNET)
BUFF_SPAWNFUNCS(random, 0)
BUFF_SPAWNFUNC_Q3TA_COMPAT(doubler, BUFF_MEDIC)
float autocvar_g_buffs_inferno_burntime_target_time;
float autocvar_g_buffs_inferno_damagemultiplier;
float autocvar_g_buffs_swapper_range;
+float autocvar_g_buffs_magnet_range_item;
#endif
}
}
+ if(self.buffs & BUFF_MAGNET)
+ {
+ vector pickup_size = '1 1 1' * autocvar_g_buffs_magnet_range_item;
+ for(other = world; (other = findflags(other, flags, FL_ITEM)); )
+ if(boxesoverlap(self.absmin - pickup_size, self.absmax + pickup_size, other.absmin, other.absmax))
+ {
+ entity oldself = self;
+ self = other;
+ other = oldself;
+ if(self.touch)
+ self.touch();
+ other = self;
+ self = oldself;
+ }
+ }
+
if((self.buffs & BUFF_INVISIBLE) && (self.oldbuffs & BUFF_INVISIBLE))
if(self.alpha != autocvar_g_buffs_invisible_alpha)
self.alpha = autocvar_g_buffs_invisible_alpha; // powerups reset alpha, so we must enforce this (TODO)
rgbgen lightingDiffuse
}
}
+models/relics/sign_magnet
+{
+ cull none
+ {
+ map models/relics/sign_magnet
+ blendfunc add
+ rgbgen lightingDiffuse
+ }
+}