From: terencehill Date: Tue, 15 Jun 2021 13:24:58 +0000 (+0000) Subject: Merge branch 'master' into 'Mario/status_effects' X-Git-Tag: xonotic-v0.8.5~405 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=aecd4e7b9523204a1dec88eaee0fd618976baf85;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into 'Mario/status_effects' # Conflicts: # qcsrc/common/stats.qh --- aecd4e7b9523204a1dec88eaee0fd618976baf85 diff --cc qcsrc/common/mutators/mutator/buffs/sv_buffs.qc index bf680f9a4,3433aad9d..a176e512f --- a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc @@@ -563,9 -532,10 +563,10 @@@ MUTATOR_HOOKFUNCTION(buffs, Damage_Calc MUTATOR_HOOKFUNCTION(buffs, PlayerDamage_SplitHealthArmor) { + // NOTE: vampire PlayerDamage_SplitHealthArmor code is similar entity frag_attacker = M_ARGV(1, entity); entity frag_target = M_ARGV(2, entity); - if(!(STAT(BUFFS, frag_attacker) & BUFF_VAMPIRE.m_itemid)) + if(!StatusEffects_active(BUFF_VAMPIRE, frag_attacker)) return; float health_take = bound(0, M_ARGV(4, float), GetResource(frag_target, RES_HEALTH)); diff --cc qcsrc/common/stats.qh index e476969fa,1d96dacde..12879a753 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@@ -84,10 -87,10 +87,8 @@@ int autocvar_leadlimit REGISTER_STAT(WEAPONRATEFACTOR, float, W_WeaponRateFactor(this)) REGISTER_STAT(GAME_STOPPED, int, game_stopped) REGISTER_STAT(GAMESTARTTIME, float, game_starttime) -REGISTER_STAT(STRENGTH_FINISHED, float) -REGISTER_STAT(INVINCIBLE_FINISHED, float) /** arc heat in [0,1] */ REGISTER_STAT(PRESSED_KEYS, int) - /** this stat could later contain some other bits of info, like, more server-side particle config */ - REGISTER_STAT(ALLOW_OLDVORTEXBEAM, bool, autocvar_g_allow_oldvortexbeam) REGISTER_STAT(FUEL, int) REGISTER_STAT(NB_METERSTART, float) /** compressShotOrigin */ @@@ -125,7 -130,7 +126,6 @@@ REGISTER_STAT(PLASMA, int REGISTER_STAT(FROZEN, int) REGISTER_STAT(REVIVE_PROGRESS, float) REGISTER_STAT(ROUNDLOST, int) - REGISTER_STAT(CTF_FLAGSTATUS, int) -REGISTER_STAT(BUFF_TIME, float) REGISTER_STAT(CAPTURE_PROGRESS, float) REGISTER_STAT(ENTRAP_ORB, float) REGISTER_STAT(ENTRAP_ORB_ALPHA, float) diff --cc qcsrc/server/player.qc index 291c9588c,dd0007e36..916aa8a28 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@@ -558,10 -558,11 +558,8 @@@ void PlayerDamage(entity this, entity i // don't play teleportation sounds this.teleportable = TELEPORT_SIMPLE; - STAT(STRENGTH_FINISHED, this) = 0; - STAT(INVINCIBLE_FINISHED, this) = 0; - STAT(SUPERWEAPONS_FINISHED, this) = 0; STAT(AIR_FINISHED, this) = 0; - STAT(MOVEVARS_SPECIALCOMMAND, this) = false; // sweet release - this.death_time = time; if (random() < 0.5) animdecide_setstate(this, this.anim_state | ANIMSTATE_DEAD1, true);