]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/weapons/projectile.qc
Merge branch 'master' into Mario/balance
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / weapons / projectile.qc
index c57a5aeaf3b6545d71f1ff2ca7a4b938cb9c7a28..39032cd70d782aad8606f3d73addccbe61dde822 100644 (file)
 .float scale;
 .vector colormod;
 
-void SUB_Stop(entity this)
+void SUB_Stop(entity this, entity toucher)
 {
        this.move_velocity = this.move_avelocity = '0 0 0';
        this.move_movetype = MOVETYPE_NONE;
 }
 
-void SUB_Stop_self() { SUB_Stop(self); }
-
 void Projectile_ResetTrail(entity this, vector to)
 {
        this.trail_oldorigin = to;
@@ -167,6 +165,7 @@ void Projectile_Draw(entity this)
 
 void loopsound(entity e, int ch, string samp, float vol, float attn)
 {
+    TC(int, ch);
        if (e.silent)
                return;
 
@@ -252,7 +251,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                {
                        this.trail_oldorigin = this.origin;
                        if (!(this.count & 0x80))
-                               WITH(entity, self, this, InterpolateOrigin_Reset());
+                               InterpolateOrigin_Reset(this);
                }
 
                if (f & 0x20)
@@ -290,6 +289,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                        HANDLE(GRENADE_BOUNCING)   this.traileffect = EFFECT_TR_GRENADE.m_id; break;
                        HANDLE(MINE)               this.traileffect = EFFECT_TR_GRENADE.m_id; break;
                        HANDLE(BLASTER)            this.traileffect = EFFECT_Null.m_id; break;
+                       HANDLE(ARC_BOLT)           this.traileffect = EFFECT_Null.m_id; break;
                        HANDLE(HLAC)               this.traileffect = EFFECT_Null.m_id; break;
                        HANDLE(PORTO_RED)          this.traileffect = EFFECT_TR_WIZSPIKE.m_id; this.scale = 4; break;
                        HANDLE(PORTO_BLUE)         this.traileffect = EFFECT_TR_WIZSPIKE.m_id; this.scale = 4; break;
@@ -331,7 +331,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                this.mins = '0 0 0';
                this.maxs = '0 0 0';
                this.colormod = '0 0 0';
-               this.move_touch = SUB_Stop_self;
+               settouch(this, SUB_Stop);
                this.move_movetype = MOVETYPE_TOSS;
                this.alphamod = 1;
 
@@ -343,7 +343,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                                this.mins = '0 0 -4';
                                this.maxs = '0 0 -4';
                                this.move_movetype = MOVETYPE_BOUNCE;
-                               this.move_touch = func_null;
+                               settouch(this, func_null);
                                this.move_bounce_factor = WEP_CVAR_SEC(electro, bouncefactor);
                                this.move_bounce_stopspeed = WEP_CVAR_SEC(electro, bouncestop);
                                break;
@@ -361,7 +361,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                                this.mins = '-3 -3 -3';
                                this.maxs = '3 3 3';
                                this.move_movetype = MOVETYPE_BOUNCE;
-                               this.move_touch = func_null;
+                               settouch(this, func_null);
                                this.move_bounce_factor = WEP_CVAR(mortar, bouncefactor);
                                this.move_bounce_stopspeed = WEP_CVAR(mortar, bouncestop);
                                break;
@@ -379,21 +379,21 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                                this.colormod = '2 1 1';
                                this.alphamod = 0.5;
                                this.move_movetype = MOVETYPE_BOUNCE;
-                               this.move_touch = func_null;
+                               settouch(this, func_null);
                                break;
                        case PROJECTILE_PORTO_BLUE:
                                this.colormod = '1 1 2';
                                this.alphamod = 0.5;
                                this.move_movetype = MOVETYPE_BOUNCE;
-                               this.move_touch = func_null;
+                               settouch(this, func_null);
                                break;
                        case PROJECTILE_HAGAR_BOUNCING:
                                this.move_movetype = MOVETYPE_BOUNCE;
-                               this.move_touch = func_null;
+                               settouch(this, func_null);
                                break;
                        case PROJECTILE_CRYLINK_BOUNCING:
                                this.move_movetype = MOVETYPE_BOUNCE;
-                               this.move_touch = func_null;
+                               settouch(this, func_null);
                                break;
                        case PROJECTILE_FIREBALL:
                                loopsound(this, CH_SHOTS_SINGLE, SND(FIREBALL_FLY2), VOL_BASE, ATTEN_NORM);
@@ -403,7 +403,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                        case PROJECTILE_FIREMINE:
                                loopsound(this, CH_SHOTS_SINGLE, SND(FIREBALL_FLY), VOL_BASE, ATTEN_NORM);
                                this.move_movetype = MOVETYPE_BOUNCE;
-                               this.move_touch = func_null;
+                               settouch(this, func_null);
                                this.mins = '-4 -4 -4';
                                this.maxs = '4 4 4';
                                break;