X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_common.qc;h=1efd6132d084e217b586015bf4910fb61446ebcc;hb=97f5b5383d79263056aefc82ea1a78ade2671a93;hp=24f434044a9b466b816b8cc0244fcd6d7d88f17f;hpb=3f05fffaca85fdb6af5f1d5baeeded5a3b45ce0f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_common.qc b/qcsrc/server/w_common.qc index 24f434044..1efd6132d 100644 --- a/qcsrc/server/w_common.qc +++ b/qcsrc/server/w_common.qc @@ -23,6 +23,7 @@ void W_GiveWeapon (entity e, float wep, string name) } .float railgundistance; +.vector railgunforce; void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, float deathtype) { local vector hitloc, force, endpoint, dir; @@ -67,6 +68,7 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f trace_ent.railgunhitloc = end; trace_ent.railgunhitsolidbackup = trace_ent.solid; trace_ent.railgundistance = vlen(WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos) - start); + trace_ent.railgunforce = WarpZone_TransformVelocity(WarpZone_trace_transform, force); // stop if this is a wall if (trace_ent.solid == SOLID_BSP) @@ -130,7 +132,7 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f // apply the damage if (ent.takedamage) - Damage (ent, self, self, bdamage * f, deathtype, hitloc, force * ffs); + Damage (ent, self, self, bdamage * f, deathtype, hitloc, ent.railgunforce * ffs); // create a small explosion to throw gibs around (if applicable) //setorigin (explosion, hitloc); @@ -182,7 +184,7 @@ void W_BallisticBullet_Hit (void) if(headshot) f *= q; - if(DEATH_WEAPONOF(self.projectiledeathtype) == WEP_CAMPINGRIFLE) + if(self.dmg_edge > 0) { if(headshot) AnnounceTo(self.owner, "headshot");