]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'refs/remotes/origin/mirceakitsune/death_unglow'
authorRudolf Polzer <divverent@alientrap.org>
Wed, 21 Jul 2010 18:14:01 +0000 (20:14 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 21 Jul 2010 18:14:01 +0000 (20:14 +0200)
defaultXonotic.cfg
qcsrc/server/cl_client.qc

index d42b8649c1b225d1900787c35856dadce2d943b7..5c76f7df8a867325f7863f0293861bd74d61fa5d 100644 (file)
@@ -849,6 +849,8 @@ set g_bloodloss 0   "amount of health below which blood loss occurs"
 
 set g_footsteps 0      "serverside footstep sounds"
 
+set g_deathglow 1.25 "when enabled, players stop glowing after they die (the value specifies glow fading speed)"
+
 // effects
 r_picmipsprites 0 // Xonotic uses sprites that should never be picmipped (team mate, typing, waypoints)
 r_mipsprites 1
index 08c53c19403bc819372fbe97c3138750f236e5bc..1543ac156187e0f4c2497ca2b203dfc71293a5b6 100644 (file)
@@ -2599,7 +2599,23 @@ void PlayerPreThink (void)
 
                if(frametime)
                {
-                       self.glowmod = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2;
+                       if(self.health <= 0 && cvar("g_deathglow"))
+                       {
+                               if(self.glowmod_x > 0)
+                                       self.glowmod_x -= cvar("g_deathglow") * frametime;
+                               else
+                                       self.glowmod_x = -1;
+                               if(self.glowmod_y > 0)
+                                       self.glowmod_y -= cvar("g_deathglow") * frametime;
+                               else
+                                       self.glowmod_y = -1;
+                               if(self.glowmod_z > 0)
+                                       self.glowmod_z -= cvar("g_deathglow") * frametime;
+                               else
+                                       self.glowmod_z = -1;
+                       }
+                       else
+                               self.glowmod = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2;
                        player_powerups();
                }