#include "view.qh"
- #include "autocvars.qh"
+ #include <client/announcer.qh>
+ #include <client/csqcmodel_hooks.qh>
#include <client/draw.qh>
- #include "announcer.qh"
- #include "hud/_mod.qh"
- #include "main.qh"
- #include "mapvoting.qh"
- #include "shownames.qh"
- #include "hud/panel/scoreboard.qh"
- #include "hud/panel/quickmenu.qh"
-
+ #include <client/hud/_mod.qh>
+ #include <client/hud/panel/quickmenu.qh>
+ #include <client/hud/panel/scoreboard.qh>
+ #include <client/mapvoting.qh>
#include <client/mutators/_mod.qh>
-
+ #include <client/shownames.qh>
+ #include <common/anim.qh>
#include <common/animdecide.qh>
+ #include <common/constants.qh>
#include <common/deathtypes/all.qh>
+ #include <common/debug.qh>
#include <common/ent_cs.qh>
- #include <common/anim.qh>
- #include <common/constants.qh>
+ #include <common/gamemodes/_mod.qh>
+ #include <common/mapinfo.qh>
+ #include <common/mapobjects/target/music.qh>
+ #include <common/mapobjects/trigger/viewloc.qh>
+ #include <common/minigames/cl_minigames.qh>
+ #include <common/minigames/cl_minigames_hud.qh>
+ #include <common/mutators/mutator/waypoints/all.qh>
#include <common/net_linked.qh>
#include <common/net_notice.qh>
- #include <common/debug.qh>
- #include <common/mapinfo.qh>
- #include <common/gamemodes/_mod.qh>
#include <common/physics/player.qh>
#include <common/stats.qh>
- #include <common/mapobjects/target/music.qh>
#include <common/teams.qh>
- #include <common/wepent.qh>
-
- #include <common/weapons/weapon/tuba.qh>
-
#include <common/vehicles/all.qh>
- #include <common/weapons/_all.qh>
- #include <common/mutators/mutator/waypoints/all.qh>
#include <common/viewloc.qh>
- #include <common/mapobjects/trigger/viewloc.qh>
- #include <common/minigames/cl_minigames.qh>
- #include <common/minigames/cl_minigames_hud.qh>
-
- #include <lib/csqcmodel/cl_player.qh>
+ #include <common/weapons/_all.qh>
+ #include <common/weapons/weapon/tuba.qh>
+ #include <common/wepent.qh>
#include <lib/csqcmodel/cl_model.qh>
- #include "csqcmodel_hooks.qh"
-
+ #include <lib/csqcmodel/cl_player.qh>
#include <lib/warpzone/client.qh>
#include <lib/warpzone/common.qh>
else if(STAT(FROZEN))
{
vector col = '0.25 0.90 1';
- if(STAT(REVIVE_PROGRESS))
- col += vec3(STAT(REVIVE_PROGRESS), -STAT(REVIVE_PROGRESS), -STAT(REVIVE_PROGRESS));
- drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), col, autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+ float col_fade = max(0, STAT(REVIVE_PROGRESS) * 2 - 1);
+ float alpha_fade = 0.3 + 0.7 * (1 - max(0, STAT(REVIVE_PROGRESS) * 4 - 3));
+ if(col_fade)
+ col += vec3(col_fade, -col_fade, -col_fade);
+ drawfill('0 0 0', vec2(vid_conwidth, vid_conheight), col, autocvar_hud_colorflash_alpha * alpha_fade, DRAWFLAG_ADDITIVE);
}
HUD_Scale_Enable();
#include "damage.qh"
+ #include <common/constants.qh>
+ #include <common/deathtypes/all.qh>
#include <common/effects/all.qh>
- #include "bot/api.qh"
- #include "hook.qh"
+ #include <common/gamemodes/_mod.qh>
+ #include <common/gamemodes/rules.qh>
+ #include <common/items/_mod.qh>
+ #include <common/mapobjects/defs.qh>
+ #include <common/mapobjects/triggers.qh>
+ #include <common/mutators/mutator/buffs/buffs.qh>
+ #include <common/mutators/mutator/instagib/sv_instagib.qh>
+ #include <common/mutators/mutator/waypoints/waypointsprites.qh>
+ #include <common/notifications/all.qh>
+ #include <common/physics/movetypes/movetypes.qh>
+ #include <common/physics/player.qh>
+ #include <common/playerstats.qh>
+ #include <common/state.qh>
+ #include <common/teams.qh>
+ #include <common/util.qh>
+ #include <common/vehicles/all.qh>
+ #include <common/weapons/_all.qh>
+ #include <lib/csqcmodel/sv_model.qh>
+ #include <lib/warpzone/common.qh>
+ #include <server/bot/api.qh>
#include <server/client.qh>
#include <server/gamelog.qh>
+ #include <server/hook.qh>
#include <server/items/items.qh>
- #include <server/mutators/_mod.qh>
#include <server/main.qh>
+ #include <server/mutators/_mod.qh>
+ #include <server/resources.qh>
+ #include <server/scores.qh>
+ #include <server/spawnpoints.qh>
+ #include <server/teamplay.qh>
+ #include <server/weapons/accuracy.qh>
+ #include <server/weapons/csqcprojectile.qh>
+ #include <server/weapons/selection.qh>
+ #include <server/weapons/weaponsystem.qh>
#include <server/world.qh>
- #include "teamplay.qh"
- #include "scores.qh"
- #include "spawnpoints.qh"
- #include "../common/state.qh"
- #include "../common/physics/player.qh"
- #include "resources.qh"
- #include "../common/vehicles/all.qh"
- #include "../common/items/_mod.qh"
- #include "../common/mutators/mutator/waypoints/waypointsprites.qh"
- #include "../common/mutators/mutator/instagib/sv_instagib.qh"
- #include "../common/mutators/mutator/buffs/buffs.qh"
- #include "weapons/accuracy.qh"
- #include "weapons/csqcprojectile.qh"
- #include "weapons/selection.qh"
- #include "../common/constants.qh"
- #include "../common/deathtypes/all.qh"
- #include <common/mapobjects/defs.qh>
- #include <common/mapobjects/triggers.qh>
- #include "../common/notifications/all.qh"
- #include "../common/physics/movetypes/movetypes.qh"
- #include "../common/playerstats.qh"
- #include "../common/teams.qh"
- #include "../common/util.qh"
- #include <common/gamemodes/_mod.qh>
- #include <common/gamemodes/rules.qh>
- #include <common/weapons/_all.qh>
- #include "../lib/csqcmodel/sv_model.qh"
- #include "../lib/warpzone/common.qh"
void UpdateFrags(entity player, int f)
{
damage = 0;
force = '0 0 0';
}
- else if(SAME_TEAM(attacker, targ))
+ else if(!STAT(FROZEN, targ) && SAME_TEAM(attacker, targ))
{
if(autocvar_teamplay_mode == 1)
damage = 0;
if(IS_PLAYER(victim) || (IS_TURRET(victim) && victim.active == ACTIVE_ACTIVE) || IS_MONSTER(victim) || MUTATOR_CALLHOOK(PlayHitsound, victim, attacker))
{
- if(DIFF_TEAM(victim, attacker) && !STAT(FROZEN, victim))
+ if (DIFF_TEAM(victim, attacker))
{
if(damage > 0)
{
}
}
}
- else if(IS_PLAYER(attacker))
+ else if (IS_PLAYER(attacker) && !STAT(FROZEN, victim)) // same team
{
- // if enemy gets frozen in this frame and receives other damage don't
- // play the typehitsound e.g. when hit by multiple bullets of the shotgun
- if (deathtype != DEATH_FIRE.m_id && (!STAT(FROZEN, victim) || time > victim.freeze_time))
+ if (deathtype != DEATH_FIRE.m_id)
{
attacker.typehitsound += 1;
}
#include "player.qh"
+ #include <common/anim.qh>
+ #include <common/animdecide.qh>
+ #include <common/animdecide.qh>
+ #include <common/csqcmodel_settings.qh>
+ #include <common/deathtypes/all.qh>
#include <common/effects/all.qh>
- #include "bot/api.qh"
- #include "cheats.qh"
- #include "client.qh"
- #include "clientkill.qh"
- #include "damage.qh"
- #include <server/mutators/_mod.qh>
- #include "world.qh"
- #include "handicap.qh"
- #include "portals.qh"
- #include "teamplay.qh"
- #include <server/main.qh>
- #include "weapons/common.qh"
- #include "weapons/throwing.qh"
- #include "command/common.qh"
- #include "command/vote.qh"
- #include "../common/state.qh"
- #include "../common/anim.qh"
- #include "../common/animdecide.qh"
- #include "../common/csqcmodel_settings.qh"
- #include "../common/gamemodes/sv_rules.qh"
- #include "../common/deathtypes/all.qh"
- #include "../common/mapobjects/subs.qh"
- #include <common/mapobjects/teleporters.qh>
- #include "../common/playerstats.qh"
- #include "../lib/csqcmodel/sv_model.qh"
-
- #include "../common/minigames/sv_minigames.qh"
-
+ #include <common/effects/qc/_mod.qh>
#include <common/gamemodes/_mod.qh>
-
- #include "../common/physics/player.qh"
- #include "../common/effects/qc/_mod.qh"
- #include "../common/mutators/mutator/waypoints/waypointsprites.qh"
- #include "../common/mapobjects/_mod.qh"
- #include "../common/wepent.qh"
-
- #include "weapons/weaponstats.qh"
+ #include <common/gamemodes/sv_rules.qh>
+ #include <common/mapobjects/_mod.qh>
+ #include <common/mapobjects/subs.qh>
+ #include <common/mapobjects/teleporters.qh>
+ #include <common/minigames/sv_minigames.qh>
+ #include <common/mutators/mutator/waypoints/waypointsprites.qh>
+ #include <common/physics/player.qh>
+ #include <common/playerstats.qh>
+ #include <common/state.qh>
+ #include <common/wepent.qh>
+ #include <lib/csqcmodel/sv_model.qh>
+ #include <server/bot/api.qh>
+ #include <server/cheats.qh>
+ #include <server/client.qh>
+ #include <server/clientkill.qh>
+ #include <server/command/common.qh>
+ #include <server/command/vote.qh>
+ #include <server/damage.qh>
+ #include <server/handicap.qh>
+ #include <server/hook.qh>
+ #include <server/main.qh>
+ #include <server/mutators/_mod.qh>
+ #include <server/portals.qh>
+ #include <server/teamplay.qh>
+ #include <server/weapons/accuracy.qh>
+ #include <server/weapons/common.qh>
+ #include <server/weapons/throwing.qh>
+ #include <server/weapons/weaponstats.qh>
#include <server/weapons/weaponsystem.qh>
-
- #include "../common/animdecide.qh"
+ #include <server/world.qh>
void Drop_Special_Items(entity player)
{
}
}
- if (time < this.spawnshieldtime && autocvar_g_spawnshield_blockdamage < 1)
+ if (STAT(FROZEN, this))
+ {
+ if (!ITEM_DAMAGE_NEEDKILL(deathtype))
+ damage = 0;
+ }
+ else if (time < this.spawnshieldtime && autocvar_g_spawnshield_blockdamage < 1)
damage *= 1 - max(0, autocvar_g_spawnshield_blockdamage);
if(deathtype & HITTYPE_SOUND) // sound based attacks cause bleeding from the ears
if(take)
this.pauseregen_finished = max(this.pauseregen_finished, time + autocvar_g_balance_pause_health_regen);
- if (time > this.pain_finished) //Don't switch pain sequences like crazy
+ if (time > this.pain_finished && !STAT(FROZEN, this)) // Don't switch pain sequences like crazy
{
this.pain_finished = time + 0.5; //Supajoe
}
float realdmg = damage - excess;
- if (this != attacker && realdmg)
- if (!(round_handler_IsActive() && !round_handler_IsRoundStarted()) && time >= game_starttime)
+ if (this != attacker && realdmg && !STAT(FROZEN, this)
+ && (!(round_handler_IsActive() && !round_handler_IsRoundStarted()) && time >= game_starttime))
{
if (IS_PLAYER(attacker) && DIFF_TEAM(attacker, this)) {
GameRules_scoring_add(attacker, DMG, realdmg);
if(vbot || IS_REAL_CLIENT(this))
if(abot || IS_REAL_CLIENT(attacker))
if(attacker && this != attacker)
- if(DIFF_TEAM(this, attacker))
+ if (DIFF_TEAM(this, attacker) && (!STAT(FROZEN, this) || this.freeze_time > time))
{
if(DEATH_ISSPECIAL(deathtype))
awep = attacker.(weaponentity).m_weapon;
valid_damage_for_weaponstats = true;
}
- dh = dh - max(GetResource(this, RES_HEALTH), 0);
- da = da - max(GetResource(this, RES_ARMOR), 0);
+ dh -= max(GetResource(this, RES_HEALTH), 0); // health difference
+ da -= max(GetResource(this, RES_ARMOR), 0); // armor difference
if(valid_damage_for_weaponstats)
{
WeaponStats_LogDamage(awep.m_id, abot, this.(weaponentity).m_weapon.m_id, vbot, dh + da);
UNSET_ONGROUND(this);
// dying animation
this.deadflag = DEAD_DYING;
+ // don't play teleportation sounds
+ this.teleportable = TELEPORT_SIMPLE;
STAT(MOVEVARS_SPECIALCOMMAND, this) = false; // sweet release