- prefix = strcat(cvar_string("hostname"), "\t", GetGametype(), "_", GetMapname(), "\t");
- if(cvar_string("sv_weaponstats_killfile") != "")
+ prefix = strcat(autocvar_hostname, "\t", GetGametype(), "_", GetMapname(), "\t");
+ if(autocvar_sv_weaponstats_killfile != "")
// damage resistance (ignore most of the damage from a bullet or similar)
damage = max(damage - 5, 1);
// damage resistance (ignore most of the damage from a bullet or similar)
damage = max(damage - 5, 1);
self.armorvalue = self.armorvalue - save;
self.health = self.health - take;
// pause regeneration for 5 seconds
self.armorvalue = self.armorvalue - save;
self.health = self.health - take;
// pause regeneration for 5 seconds
}
self.dmg_save = self.dmg_save + save;//max(save - 10, 0);
self.dmg_take = self.dmg_take + take;//max(take - 10, 0);
}
self.dmg_save = self.dmg_save + save;//max(save - 10, 0);
self.dmg_take = self.dmg_take + take;//max(take - 10, 0);
void PlayerDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
{
void PlayerDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
{
+ frag_inflictor = inflictor;
+ frag_attacker = attacker;
+ frag_target = self;
+ damage_take = take;
+ damage_save = save;
+ damage_force = force;
+ MUTATOR_CALLHOOK(PlayerDamage_SplitHealthArmor);
+ take = bound(0, damage_take, self.health);
+ save = bound(0, damage_save, self.armorvalue);
+
self.armorvalue = self.armorvalue - save;
self.health = self.health - take;
// pause regeneration for 5 seconds
self.armorvalue = self.armorvalue - save;
self.health = self.health - take;
// pause regeneration for 5 seconds
- if(self.health > 75) // TODO make a "gentle" version?
+ if(deathtype == DEATH_FALL)
+ PlayerSound(playersound_fall, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
+ else if(self.health > 75) // TODO make a "gentle" version?
PlayerSound(playersound_pain100, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
else if(self.health > 50)
PlayerSound(playersound_pain75, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
else if(self.health > 25)
PlayerSound(playersound_pain50, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
PlayerSound(playersound_pain100, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
else if(self.health > 50)
PlayerSound(playersound_pain75, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
else if(self.health > 25)
PlayerSound(playersound_pain50, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
if(valid_damage_for_weaponstats)
WeaponStats_LogKill(DEATH_WEAPONOF(deathtype), self.weapon);
if(valid_damage_for_weaponstats)
WeaponStats_LogKill(DEATH_WEAPONOF(deathtype), self.weapon);
- // become fully visible
- self.alpha = 1;
- // clear selected player display
- ClearSelectedPlayer();
- // throw a weapon
- SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);
+ if(!g_freezetag)
+ {
+ // become fully visible
+ self.alpha = 1;
+ // clear selected player display
+ ClearSelectedPlayer();
+ // throw a weapon
+ SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon);
+ }
+
// print an obituary message
Obituary (attacker, inflictor, self, deathtype);
race_PreDie();
DropAllRunes(self);
// print an obituary message
Obituary (attacker, inflictor, self, deathtype);
race_PreDie();
DropAllRunes(self);
frag_attacker = attacker;
frag_inflictor = inflictor;
frag_target = self;
MUTATOR_CALLHOOK(PlayerDies);
frag_attacker = attacker;
frag_inflictor = inflictor;
frag_target = self;
MUTATOR_CALLHOOK(PlayerDies);
DropBall(self.ballcarried, self.origin, self.velocity);
Portal_ClearAllLater(self);
// clear waypoints
DropBall(self.ballcarried, self.origin, self.velocity);
Portal_ClearAllLater(self);
// clear waypoints
// call the corpse damage function just in case it wants to gib
self.event_damage(inflictor, attacker, 0, deathtype, hitloc, force);
// set up to fade out later
// call the corpse damage function just in case it wants to gib
self.event_damage(inflictor, attacker, 0, deathtype, hitloc, force);
// set up to fade out later
- SUB_SetFade (self, time + 12 + random () * 4, 1);
-
- // remove laserdot
- if(self.weaponentity)
- if(self.weaponentity.lasertarget)
- remove(self.weaponentity.lasertarget);
+ SUB_SetFade (self, time + 6 + random (), 1);
// remove corpse
PlayerCorpseDamage (inflictor, attacker, 100.0, deathtype, hitloc, force);
}
// remove corpse
PlayerCorpseDamage (inflictor, attacker, 100.0, deathtype, hitloc, force);
}
{
string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr, privatemsgprefix;
float flood, privatemsgprefixlen;
{
string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr, privatemsgprefix;
float flood, privatemsgprefixlen;
privatemsgprefixlen = strlen(msgstr);
msgstr = strcat(msgstr, msgin);
cmsgstr = strcat(colorstr, "^3", namestr, "^3 tells you:\n^7", msgin);
privatemsgprefixlen = strlen(msgstr);
msgstr = strcat(msgstr, msgin);
cmsgstr = strcat(colorstr, "^3", namestr, "^3 tells you:\n^7", msgin);
privatemsgprefix = strcat("\{1}\{13}* ^3You tell ", playername(privatesay), ": ^7");
else
privatemsgprefix = strcat("\{1}\{13}* ^3You tell ", privatesay.netname, ": ^7");
privatemsgprefix = strcat("\{1}\{13}* ^3You tell ", playername(privatesay), ": ^7");
else
privatemsgprefix = strcat("\{1}\{13}* ^3You tell ", privatesay.netname, ": ^7");
- flood_spl = cvar("g_chat_flood_spl_tell");
- flood_burst = cvar("g_chat_flood_burst_tell");
- flood_lmax = cvar("g_chat_flood_lmax_tell");
+ flood_spl = autocvar_g_chat_flood_spl_tell;
+ flood_burst = autocvar_g_chat_flood_burst_tell;
+ flood_lmax = autocvar_g_chat_flood_lmax_tell;
- flood_spl = cvar("g_chat_flood_spl_team");
- flood_burst = cvar("g_chat_flood_burst_team");
- flood_lmax = cvar("g_chat_flood_lmax_team");
+ flood_spl = autocvar_g_chat_flood_spl_team;
+ flood_burst = autocvar_g_chat_flood_burst_team;
+ flood_lmax = autocvar_g_chat_flood_lmax_team;
- flood_spl = cvar("g_chat_flood_spl");
- flood_burst = cvar("g_chat_flood_burst");
- flood_lmax = cvar("g_chat_flood_lmax");
+ flood_spl = autocvar_g_chat_flood_spl;
+ flood_burst = autocvar_g_chat_flood_burst;
+ flood_lmax = autocvar_g_chat_flood_lmax;
flood_field = floodcontrol_chat;
}
flood_burst = max(0, flood_burst - 1);
flood_field = floodcontrol_chat;
}
flood_burst = max(0, flood_burst - 1);
- if (timeoutStatus == 2) //when game is paused, no flood protection
- source.flood_field = flood = 0;
+ if (timeoutStatus == 2) //when game is paused, no flood protection
+ source.flood_field = flood = 0;
+ }
{
sprint(source, strcat("^3FLOOD CONTROL: ^7wait ^1", ftos(source.flood_field - time), "^3 seconds\n"));
ret = 0;
{
sprint(source, strcat("^3FLOOD CONTROL: ^7wait ^1", ftos(source.flood_field - time), "^3 seconds\n"));
ret = 0;