set g_balance_falldamage_factor 0.15
set g_balance_falldamage_maxdamage 25
set g_balance_damagepush_speedfactor 0
-set g_balance_contents_damagerate 5 // how many times to apply damage per second (so 5 is 0.2 second delay per impulse of damage)
+set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning
set g_balance_contents_playerdamage_lava 50 // damage per second for while player is inside lava
set g_balance_falldamage_factor 0.20
set g_balance_falldamage_maxdamage 15
set g_balance_damagepush_speedfactor 2.5
-set g_balance_contents_damagerate 5 // how many times to apply damage per second (so 5 is 0.2 second delay per impulse of damage)
+set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning
set g_balance_contents_playerdamage_lava 50 // damage per second for while player is inside lava
set g_balance_falldamage_factor 0.15
set g_balance_falldamage_maxdamage 25
set g_balance_damagepush_speedfactor 0
-set g_balance_contents_damagerate 5 // how many times to apply damage per second (so 5 is 0.2 second delay per impulse of damage)
+set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning
set g_balance_contents_playerdamage_lava 50 // damage per second for while player is inside lava
set g_balance_falldamage_factor 0.20
set g_balance_falldamage_maxdamage 40
set g_balance_damagepush_speedfactor 2.5
-set g_balance_contents_damagerate 5 // how many times to apply damage per second (so 5 is 0.2 second delay per impulse of damage)
+set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning
set g_balance_contents_playerdamage_lava 50 // damage per second for while player is inside lava
set g_balance_falldamage_factor 0.02 // maxspeed = minspeed + maxdamage / factor = 4550
set g_balance_falldamage_maxdamage 75
set g_balance_damagepush_speedfactor 0
-set g_balance_contents_damagerate 5 // how many times to apply damage per second (so 5 is 0.2 second delay per impulse of damage)
+set g_balance_contents_damagerate 0.2 // ticrate interval for applying damage with playerdamage/projectiledamage
set g_balance_contents_drowndelay 10 // time under water before a player begins drowning
-set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning
+set g_balance_contents_playerdamage_drowning 20 // damage per second for while player is drowning
set g_balance_contents_playerdamage_lava 50 // damage per second for while player is inside lava
set g_balance_contents_playerdamage_slime 30 // damage per second for while player is inside slime
set g_balance_contents_projectiledamage 10000 // instantly kill projectiles upon touching lava/slime
set g_balance_powerup_strength_time 30
set g_balance_powerup_strength_selfdamage 1.5
set g_balance_powerup_strength_selfforce 1.5
-
// }}}
// {{{ jetpack/hook
void CreatureFrame (void)
{
- local entity oldself;
- local float dm;
-
- float damagerate; // where damagerate 5 means 5 hits per second (0.2 delay)
- damagerate = (1 / bound(1, autocvar_g_balance_contents_damagerate, 100));
+ entity oldself;
+ float dm;
oldself = self;
for(self = world; (self = findfloat(self, damagedbycontents, TRUE)); )
if (!self.deadflag)
if (self.pain_finished < time)
{
- Damage (self, world, world, autocvar_g_balance_contents_playerdamage_drowning * damagerate, DEATH_DROWN, self.origin, '0 0 0');
+ Damage (self, world, world, autocvar_g_balance_contents_playerdamage_drowning * autocvar_g_balance_contents_damagerate, DEATH_DROWN, self.origin, '0 0 0');
self.pain_finished = time + 0.5;
}
}
if (self.dmgtime < time)
{
- self.dmgtime = time + damagerate;
+ self.dmgtime = time + autocvar_g_balance_contents_damagerate;
if (!projectile)
{
self.watersound_finished = time + 0.5;
sound (self, CH_PLAYER, "player/lava.wav", VOL_BASE, ATTN_NORM);
}
- Damage (self, world, world, autocvar_g_balance_contents_playerdamage_lava * damagerate * self.waterlevel, DEATH_LAVA, self.origin, '0 0 0');
+ Damage (self, world, world, autocvar_g_balance_contents_playerdamage_lava * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_LAVA, self.origin, '0 0 0');
}
else if (self.watertype == CONTENT_SLIME)
{
self.watersound_finished = time + 0.5;
sound (self, CH_PLAYER, "player/slime.wav", VOL_BASE, ATTN_NORM);
}
- Damage (self, world, world, autocvar_g_balance_contents_playerdamage_slime * damagerate * self.waterlevel, DEATH_SLIME, self.origin, '0 0 0');
+ Damage (self, world, world, autocvar_g_balance_contents_playerdamage_slime * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_SLIME, self.origin, '0 0 0');
}
}
else if ((self.watertype == CONTENT_LAVA) || (self.watertype == CONTENT_SLIME))
{
- Damage (self, world, world, autocvar_g_balance_contents_projectiledamage * damagerate * self.waterlevel, DEATH_SLIME, self.origin, '0 0 0');
+ Damage (self, world, world, autocvar_g_balance_contents_projectiledamage * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_SLIME, self.origin, '0 0 0');
}
}
}
float is_from_enemy = (inflictor.realowner != self.realowner);
- if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, is_from_enemy))
+ if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, (is_from_enemy ? 1 : -1)))
return; // g_projectiles_damage says to halt
self.health = self.health - damage;