]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/effects/qc/damageeffects.qc
Merge branch 'master' into terencehill/hud_shake_fix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / effects / qc / damageeffects.qc
index c8afaf99068a6886f668d2c55b15b6c25bd83001..c1144d2616c9b58991d5d6e5d5c1af89b340314e 100644 (file)
@@ -69,8 +69,8 @@ void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad
 .int state;
 .bool isplayermodel;
 
-void DamageEffect_Think()
-{SELFPARAM();
+void DamageEffect_Think(entity this)
+{
        // if particle distribution is enabled, slow ticrate by total number of damages
        if(autocvar_cl_damageeffect_distribute)
                this.nextthink = time + autocvar_cl_damageeffect_ticrate * this.owner.total_damages;
@@ -273,7 +273,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
 
        if(DEATH_ISVEHICLE(w_deathtype))
        {
-               traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, world);
+               traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, NULL);
                if(trace_plane_normal != '0 0 0')
                        w_backoff = trace_plane_normal;
                else
@@ -347,7 +347,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
 
        if(DEATH_ISTURRET(w_deathtype))
        {
-               traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, world);
+               traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, NULL);
                if(trace_plane_normal != '0 0 0')
                        w_backoff = trace_plane_normal;
                else
@@ -408,7 +408,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
                Weapon hitwep = DEATH_WEAPONOF(w_deathtype);
                w_random = prandom();
 
-               traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, world);
+               traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, NULL);
                if(trace_fraction < 1 && hitwep != WEP_VORTEX && hitwep != WEP_VAPORIZER)
                        w_backoff = trace_plane_normal;
                else
@@ -417,8 +417,8 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
 
                if(!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY))
                {
-                       if(!MUTATOR_CALLHOOK(Weapon_ImpactEffect, hitwep))
-                               hitwep.wr_impacteffect(hitwep);
+                       if(!MUTATOR_CALLHOOK(Weapon_ImpactEffect, hitwep, this))
+                               hitwep.wr_impacteffect(hitwep, this);
                }
        }
 }