From: terencehill Date: Sun, 18 Feb 2018 00:16:40 +0000 (+0100) Subject: Merge branch 'master' into terencehill/accuracy_shotgun X-Git-Tag: xonotic-v0.8.5~2281^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6e4c0c69ce16c05cdc8ce97c5287c848acfc3b1f;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into terencehill/accuracy_shotgun # Conflicts: # qcsrc/common/weapons/weapon/hagar.qc # qcsrc/server/player.qc # qcsrc/server/weapons/tracing.qc --- 6e4c0c69ce16c05cdc8ce97c5287c848acfc3b1f diff --cc qcsrc/common/weapons/weapon/hagar.qc index 026ad6ad8,bbd3ddb4e..d9164dc19 --- a/qcsrc/common/weapons/weapon/hagar.qc +++ b/qcsrc/common/weapons/weapon/hagar.qc @@@ -181,8 -183,7 +183,8 @@@ void W_Hagar_Attack2_Load_Release(entit weapon_prepareattack_do(actor, weaponentity, true, WEP_CVAR_SEC(hagar, refire)); - W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage), WEP_HAGAR.m_id | HITTYPE_SECONDARY); + shots = actor.(weaponentity).hagar_load; - W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage) * shots); ++ W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage) * shots, WEP_HAGAR.m_id | HITTYPE_SECONDARY); Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); forward = v_forward; diff --cc qcsrc/server/defs.qh index 6b626a74e,060e1ce55..4b600e3fc --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@@ -367,10 -364,8 +364,9 @@@ const float ACTIVE_TOGGLE = 3 .float player_blocked; - .float revive_progress = _STAT(REVIVE_PROGRESS); .float revival_time; // time at which player was last revived .float revive_speed; // NOTE: multiplier (anything above 1 is instaheal) +.float freeze_time; .entity iceblock; .entity frozen_by; // for ice fields diff --cc qcsrc/server/g_damage.qc index 713cf385d,804d9fd71..3fb000e70 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@@ -532,9 -529,9 +529,9 @@@ void Freeze (entity targ, float revives float targ_maxhealth = ((IS_MONSTER(targ)) ? targ.max_health : start_health); STAT(FROZEN, targ) = frozen_type; - targ.revive_progress = ((frozen_type == 3) ? 1 : 0); + STAT(REVIVE_PROGRESS, targ) = ((frozen_type == 3) ? 1 : 0); SetResourceAmount(targ, RESOURCE_HEALTH, ((frozen_type == 3) ? targ_maxhealth : 1)); - targ.revive_speed = freeze_time; + targ.revive_speed = revivespeed; if(targ.bot_attack) IL_REMOVE(g_bot_targets, targ); targ.bot_attack = false; diff --cc qcsrc/server/player.qc index 9d9281c0e,af6b52074..88acd12f9 --- a/qcsrc/server/player.qc +++ b/qcsrc/server/player.qc @@@ -655,7 -652,7 +654,7 @@@ void PlayerDamage(entity this, entity i if(autocvar_sv_gentle > 0 || autocvar_ekg || this.classname == "body") { // remove corpse // clones don't run any animation code any more, so we must gib them when they die :( - this.event_damage(this, inflictor, attacker, autocvar_sv_gibhealth + 1, deathtype, hitloc, force); - PlayerCorpseDamage(this, inflictor, attacker, autocvar_sv_gibhealth+1.0, deathtype, weaponentity, hitloc, force); ++ this.event_damage(this, inflictor, attacker, autocvar_sv_gibhealth + 1, deathtype, weaponentity, hitloc, force); } // reset fields the weapons may use just in case diff --cc qcsrc/server/weapons/tracing.qc index 87330e799,772809d65..8501e5186 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@@ -422,10 -418,10 +418,10 @@@ void fireBullet(entity this, .entity we yoda = 0; MUTATOR_CALLHOOK(FireBullet_Hit, this, hit, start, end, damage, this.(weaponentity)); damage = M_ARGV(4, float); - float g = accuracy_isgooddamage(this, hit); + bool gooddamage = accuracy_isgooddamage(this, hit); - Damage(hit, this, this, damage * solid_penetration_left, dtype, start, force * dir * solid_penetration_left); + Damage(hit, this, this, damage * solid_penetration_left, dtype, weaponentity, start, force * dir * solid_penetration_left); // calculate hits for ballistic weapons - if(g) + if(gooddamage) { // do not exceed 100% float added_damage = min(damage - total_damage, damage * solid_penetration_left);