#include "player.qh"
+#include <common/effects/all.qh>
#include "bot/api.qh"
#include "cheats.qh"
#include "g_damage.qh"
#include "../common/minigames/sv_minigames.qh"
#include "../common/physics/player.qh"
-#include "../common/effects/qc/all.qh"
+#include "../common/effects/qc/_mod.qh"
#include "../common/mutators/mutator/waypoints/waypointsprites.qh"
#include "../common/triggers/include.qh"
#include "../common/wepent.qh"
clone.move_qcphysics = false; // don't run gamecode logic on clones, too many
set_movetype(clone, this.move_movetype);
clone.solid = this.solid;
- clone.ballistics_density = this.ballistics_density;
clone.takedamage = this.takedamage;
setcefc(clone, getcefc(this));
clone.uncustomizeentityforclient = this.uncustomizeentityforclient;
//clone.weapon = this.weapon;
setorigin(clone, this.origin);
setsize(clone, this.mins, this.maxs);
- clone.prevorigin = this.origin;
clone.reset = SUB_Remove;
clone._ps = this._ps;
float pcount = 1; // Include myself whether or not team is already set right and I'm a "player".
if (teamplay)
{
- FOREACH_CLIENT(IS_PLAYER(it) && it != this, LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it) && it != this, {
if(it.team == this.team)
++pcount;
- ));
+ });
if (sdelay_small_count == 0)
sdelay_small_count = 1;
if (sdelay_large_count == 0)
}
else
{
- FOREACH_CLIENT(IS_PLAYER(it) && it != this, LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it) && it != this, {
++pcount;
- ));
+ });
if (sdelay_small_count == 0)
{
if (IS_INDEPENDENT_PLAYER(this))
if(!DEATH_ISSPECIAL(deathtype))
{
- damage *= bound(1.0, this.cvar_cl_handicap, 10.0);
- if(this != attacker)
- damage /= bound(1.0, attacker.cvar_cl_handicap, 10.0);
+ damage *= bound(1.0, CS(this).cvar_cl_handicap, 10.0);
+ if(this != attacker && IS_PLAYER(attacker))
+ damage /= bound(1.0, CS(attacker).cvar_cl_handicap, 10.0);
}
if (time < this.spawnshieldtime && autocvar_g_spawnshield_blockdamage < 1)
{
delete(this.killindicator);
this.killindicator = NULL;
- if(this.killindicator_teamchange)
+ if(CS(this).killindicator_teamchange)
defer_ClientKill_Now_TeamChange = true;
if(this.classname == "body")
// increment frag counter for used weapon type
Weapon w = DEATH_WEAPONOF(deathtype);
if(w != WEP_Null && accuracy_isgooddamage(attacker, this))
- attacker.accuracy.(accuracy_frags[w.m_id-1]) += 1;
+ CS(attacker).accuracy.(accuracy_frags[w.m_id-1]) += 1;
MUTATOR_CALLHOOK(PlayerDies, inflictor, attacker, this, deathtype, damage);
damage = M_ARGV(4, float);
set_movetype(this, MOVETYPE_TOSS);
// shootable corpse
this.solid = SOLID_CORPSE;
- this.ballistics_density = autocvar_g_ballistics_density_corpse;
+ PS(this).ballistics_density = autocvar_g_ballistics_density_corpse;
// don't stick to the floor
UNSET_ONGROUND(this);
// dying animation
this.deadflag = DEAD_DYING;
+ STAT(MOVEVARS_SPECIALCOMMAND, this) = false; // sweet release
+
// when to allow respawn
calculate_player_respawn_time(this);
}
if(flood)
- LOG_INFO("NOTE: ", playername(source, true), "^7 is flooding.\n");
+ LOG_INFO("NOTE: ", playername(source, true), "^7 is flooding.");
// build sourcemsgstr by cutting off a prefix and replacing it by the other one
if(privatesay)
centerprint(privatesay, cmsgstr);
}
}
- else if ( teamsay && source.active_minigame )
+ else if ( teamsay && CS(source).active_minigame )
{
sprint(source, sourcemsgstr);
dedicated_print(msgstr); // send to server console too
- FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source && it.active_minigame == source.active_minigame && !MUTATOR_CALLHOOK(ChatMessageTo, it, source), sprint(it, msgstr));
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source && CS(it).active_minigame == CS(source).active_minigame && !MUTATOR_CALLHOOK(ChatMessageTo, it, source), sprint(it, msgstr));
}
else if(teamsay > 0) // team message, only sent to team mates
{