]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix weapon glow color when vortex starts charging
authorterencehill <piuntn@gmail.com>
Sun, 12 May 2019 23:29:21 +0000 (01:29 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 12 May 2019 23:29:21 +0000 (01:29 +0200)
qcsrc/common/mutators/mutator/overkill/oknex.qc
qcsrc/common/weapons/weapon/vortex.qc

index 225b3d93f8e162dd1e122b7abf4bc096fe899709..cbcc285a54585382d61e0618fa7a2269a8985860 100644 (file)
@@ -24,6 +24,9 @@ METHOD(OverkillNex, wr_glow, vector(OverkillNex this, entity actor, entity wepen
                g.y += f * autocvar_g_weapon_charge_colormod_green_full;
                g.z += f * autocvar_g_weapon_charge_colormod_blue_full;
        }
+       // transition color can't be '0 0 0' as it defaults to player model glow color
+       if (g == '0 0 0')
+               g = '0 0 0.000001';
        return g;
 }
 #endif
index f1e14750379daebd4ba84d60842060839572fcb6..fec4d756e97b5e3a5b1c672dc54a5521f8bd1d65 100644 (file)
@@ -29,6 +29,9 @@ METHOD(Vortex, wr_glow, vector(Vortex this, entity actor, entity wepent))
                g.y += f * autocvar_g_weapon_charge_colormod_green_full;
                g.z += f * autocvar_g_weapon_charge_colormod_blue_full;
        }
+       // transition color can't be '0 0 0' as it defaults to player model glow color
+       if (g == '0 0 0')
+               g = '0 0 0.000001';
        return g;
 }
 #endif