X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_player.qc;h=3435c2b2960e5c47b976580d4ed33f8040762119;hb=da8bf18830fc6ce2af0787e6d326606985b3ad2b;hp=85044c27409c948609d42a47f7aec70d0983816c;hpb=490a31934aa67cc7de5299a4d3f625d5271f8583;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 85044c274..3435c2b29 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -95,7 +95,7 @@ void CopyBody(entity this, float keepvelocity) clone.solid = this.solid; clone.ballistics_density = this.ballistics_density; clone.takedamage = this.takedamage; - clone.customizeentityforclient = this.customizeentityforclient; + setcefc(clone, getcefc(this)); clone.uncustomizeentityforclient = this.uncustomizeentityforclient; clone.uncustomizeentityforclient_set = this.uncustomizeentityforclient_set; if (keepvelocity == 1) @@ -126,15 +126,15 @@ void CopyBody(entity this, float keepvelocity) animdecide_setframes(clone, false, frame, frame1time, frame2, frame2time); } -void player_setupanimsformodel() -{SELFPARAM(); +void player_setupanimsformodel(entity this) +{ // load animation info - animdecide_load_if_needed(self); - animdecide_setstate(self, 0, false); + animdecide_load_if_needed(this); + animdecide_setstate(this, 0, false); } -void player_anim () -{SELFPARAM(); +void player_anim(entity this) +{ int deadbits = (this.anim_state & (ANIMSTATE_DEAD1 | ANIMSTATE_DEAD2)); if(IS_DEAD(this)) { if (!deadbits) { @@ -384,10 +384,9 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, save = v.y; } - frag_damage = damage; - MUTATOR_CALLHOOK(PlayerDamage_SplitHealthArmor, inflictor, attacker, this, force, take, save); - take = bound(0, damage_take, this.health); - save = bound(0, damage_save, this.armorvalue); + MUTATOR_CALLHOOK(PlayerDamage_SplitHealthArmor, inflictor, attacker, this, force, take, save, deathtype, damage); + take = bound(0, M_ARGV(4, float), this.health); + save = bound(0, M_ARGV(5, float), this.armorvalue); excess = max(0, damage - take - save); if(sound_allowed(MSG_BROADCAST, attacker)) @@ -552,8 +551,8 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, if(accuracy_isgooddamage(attacker, this)) attacker.accuracy.(accuracy_frags[w.m_id-1]) += 1; - MUTATOR_CALLHOOK(PlayerDies, inflictor, attacker, this, deathtype); - excess = frag_damage; + MUTATOR_CALLHOOK(PlayerDies, inflictor, attacker, this, deathtype, excess); + excess = M_ARGV(4, float); Weapon wep = PS(this).m_weapon; WITHSELF(this, wep.wr_playerdeath(wep, this)); @@ -637,7 +636,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, // reset fields the weapons may use just in case FOREACH(Weapons, it != WEP_Null, LAMBDA( - WITHSELF(this, it.wr_resetplayer(it, this)); + it.wr_resetplayer(it, this); for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { ATTACK_FINISHED_FOR(this, it.m_id, slot) = 0; @@ -675,7 +674,7 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc if (!teamsay && !privatesay) if (substring(msgin, 0, 1) == " ") msgin = substring(msgin, 1, -1); // work around DP say bug (say_team does not have this!) - msgin = formatmessage(msgin); + msgin = formatmessage(source, msgin); string colorstr; if (!IS_PLAYER(source)) @@ -705,7 +704,7 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc // for now, just give "say" back and only handle say_team if(!teamsay) { - clientcommand(self, strcat("say ", msgin)); + clientcommand(source, strcat("say ", msgin)); return; } */