]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Apply regurgitation colors to weapon entities.
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 2 Sep 2010 21:16:44 +0000 (00:16 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 2 Sep 2010 21:16:44 +0000 (00:16 +0300)
Unfortunately, there's no way to dirty specific weapons only. So for instance: If you are regurgitated, drop your weapon, then pick up a new weapon from a pickup spot, the new weapon will still appear green. An excuse however can be that "you dirty / clean any new weapon you touch" :P

data/qcsrc/server/cl_weaponsystem.qc

index 76ea196e3baaa9ad721f580c98d69613ed7fc54e..6594119f6a092691aa18841544b05b12807a006f 100644 (file)
@@ -579,6 +579,8 @@ void CL_Weaponentity_Think()
                self.weaponentity.alpha = self.alpha;\r
                self.weaponentity.colormap = self.colormap;\r
        }\r
+       if(self.owner.colormod != '0 0 0') // used by the regurgitating colors\r
+               self.weaponentity.colormod = self.owner.colormod;\r
 \r
        self.angles = '0 0 0';\r
        local float f;\r
@@ -788,6 +790,8 @@ void CL_ExteriorWeaponentity_Think()
                self.alpha = self.owner.alpha;\r
        else\r
                self.alpha = 1;\r
+       if(self.owner.colormod != '0 0 0') // used by the regurgitating colors\r
+               self.exteriorweaponentity.colormod = self.owner.colormod;\r
 \r
        ang_x = bound(sv_pitch_min, self.owner.v_angle_x, sv_pitch_max);\r
        ang_y = 0;\r