]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_common.qc
New way of handling the jumping/impact effect, plus clean up the code a lot.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_common.qc
index 3343fa7c3f5f24d9977e41b05e4da32a498bc0ac..8da19cbec28f10bde4b1f3399bda4e3571c9b830 100644 (file)
@@ -38,6 +38,8 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
        entity pseudoprojectile;
        float f, ffs;
 
+       pseudoprojectile = world;
+
        railgun_start = start;
        railgun_end = end;
 
@@ -146,7 +148,7 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
 
                // create a small explosion to throw gibs around (if applicable)
                //setorigin (explosion, hitloc);
-               //RadiusDamage (explosion, self, 10, 0, 50, world, 300, deathtype);
+               //RadiusDamage (explosion, self, 10, 0, 50, world, world, 300, deathtype);
 
                ent.railgunhitloc = '0 0 0';
                ent.railgunhitsolidbackup = SOLID_NOT;
@@ -585,9 +587,13 @@ void W_PrepareExplosionByDamage(entity attacker, void() explode)
 {
        self.takedamage = DAMAGE_NO;
        self.event_damage = SUB_Null;
-       self.owner = attacker;
-       self.realowner = attacker;
-
+       
+       if not(g_ca)
+       {
+               self.owner = attacker;
+               self.realowner = attacker;
+       }
+       
        // do not explode NOW but in the NEXT FRAME!
        // because recursive calls to RadiusDamage are not allowed
        self.nextthink = time;