X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_damage.qc;h=22a45f23532f2b8005d9466438a68cab2a92ab6e;hb=bf4161ef3639ba716090dd4b31c104a8e1617126;hp=9a8be98da877ea4bb29b7cde797d9ebec386dc86;hpb=50f099d4c7185489caf387128bbf547b00779b07;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 9a8be98da..22a45f235 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -27,6 +27,7 @@ #include "../common/playerstats.qh" #include "../common/teams.qh" #include "../common/util.qh" +#include #include #include #include "../lib/csqcmodel/sv_model.qh" @@ -584,8 +585,8 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de entity attacker_save = attacker; - // special rule: gravity bomb does not hit team mates (other than for disconnecting the hook) - if(DEATH_ISWEAPON(deathtype, WEP_HOOK) || DEATH_ISWEAPON(deathtype, WEP_TUBA)) + // special rule: gravity bombs and sound-based attacks do not affect team mates (other than for disconnecting the hook) + if(DEATH_ISWEAPON(deathtype, WEP_HOOK) || (deathtype & HITTYPE_SOUND)) { if(IS_PLAYER(targ) && SAME_TEAM(targ, attacker)) { @@ -860,7 +861,7 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de farcent.nextthink = time + 0.1; setthink(farcent, SUB_Remove); } - else + else if(targ.move_movetype != MOVETYPE_NOCLIP) { targ.velocity = targ.velocity + farce; } @@ -909,8 +910,8 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in total_damage_to_creatures = 0; - if(deathtype != (WEP_HOOK.m_id | HITTYPE_SECONDARY | HITTYPE_BOUNCE)) // only send gravity bomb damage once - if(DEATH_WEAPONOF(deathtype) != WEP_TUBA) // do not send tuba damage (bandwidth hog) + if(deathtype != (WEP_HOOK.m_id | HITTYPE_SECONDARY | HITTYPE_BOUNCE) && deathtype != (WEP_ELECTRO.m_id | HITTYPE_BOUNCE | HITTYPE_SPLASH)) // only send damage over time bombs once + if(!(deathtype & HITTYPE_SOUND)) // do not send radial sound damage (bandwidth hog) { force = inflictorvelocity; if(force == '0 0 0')