set g_instagib_ammo_drop 5 "how much ammo you'll get for weapons or cells"
set g_instagib_invis_alpha 0.15
set g_instagib_speed_highspeed 1.5 "speed-multiplier that applies while you carry the invincibility powerup"
+set g_instagib_damagedbycontents 1 "allow damage from lava pits in instagib"
// ==========
int autocvar_g_instagib_extralives;
float autocvar_g_instagib_speed_highspeed;
float autocvar_g_instagib_invis_alpha;
+bool autocvar_g_instagib_damagedbycontents = true;
#define autocvar_g_mirrordamage cvar("g_mirrordamage")
#define autocvar_g_mirrordamage_virtual cvar("g_mirrordamage_virtual")
if(IS_PLAYER(frag_target))
{
- if ((frag_deathtype == DEATH_FALL) ||
- (frag_deathtype == DEATH_DROWN) ||
- (frag_deathtype == DEATH_SLIME) ||
- (frag_deathtype == DEATH_LAVA))
+ if(frag_deathtype == DEATH_FALL)
+ frag_damage = 0; // never count fall damage
+
+ if(!autocvar_g_instagib_damagedbycontents)
+ switch(frag_deathtype)
{
- frag_damage = 0;
+ case DEATH_DROWN:
+ case DEATH_SLIME:
+ case DEATH_LAVA:
+ frag_damage = 0;
+ break;
}
if(IS_PLAYER(frag_attacker))
if(self.weapon == WEP_DEVASTATOR.m_id || self.weapon == WEP_VORTEX.m_id)
{
- entity e = spawn();
+ entity e = spawn(), oldself;
setorigin(e, self.origin);
- entity oldself;
oldself = self;
self = e;
+ self.noalign = oldself.noalign;
+ self.cnt = oldself.cnt;
+ self.team = oldself.team;
spawnfunc_item_minst_cells();
self = oldself;
return true;