]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Set colormod properly on consumable items
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 19 Nov 2011 13:13:59 +0000 (15:13 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 19 Nov 2011 13:13:59 +0000 (15:13 +0200)
data/qcsrc/server/t_items.qc

index 5f5b99f96046320b43c1cc3cca17e75e9c7af590..dc7c0f4a1de812c90113bc884b2f8ec0f26b956f 100644 (file)
@@ -243,6 +243,12 @@ void Item_Consumable_Think()
                return;\r
        }\r
 \r
+       if(self.predator.digesting)\r
+       {\r
+               if(stov(cvar_string("g_vore_regurgitatecolor_color_digest")))\r
+                       self.colormod = stov(cvar_string("g_vore_regurgitatecolor_color_digest"));\r
+       }\r
+\r
        dprint("!!!!!!!!\n");\r
        self.nextthink = time;\r
 }\r
@@ -303,6 +309,9 @@ void Item_Consumable_Spawn(entity e, entity pl)
        item.think = Item_Consumable_Think;\r
        item.nextthink = time;\r
 \r
+       if(stov(cvar_string("g_vore_regurgitatecolor_color_normal")))\r
+               item.colormod = stov(cvar_string("g_vore_regurgitatecolor_color_normal"));\r
+\r
        // predator effects, some common to those in Vore_Swallow\r
        PlayerSound(pl, playersound_swallow, CHAN_VOICE, VOICETYPE_PLAYERSOUND);\r
        setanim(pl, pl.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating\r