Merge branch 'master' into divVerent/fruitbalance
authorRudolf Polzer <divverent@alientrap.org>
Wed, 21 Jul 2010 18:31:21 +0000 (20:31 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 21 Jul 2010 18:31:21 +0000 (20:31 +0200)
1  2 
qcsrc/common/constants.qh
qcsrc/server/cl_client.qc

index 8a74e964a6b776134b75096cbe12d775a38434d7,d48cff2227d02fdb0066aec51a8cfa3bb9cc6825..e8a20f55681ed45cb6991b98a03848f0f2ea9085
@@@ -59,8 -59,6 +59,8 @@@ const float TE_CSQC_ANNOUNCE = 110
  const float TE_CSQC_TARGET_MUSIC = 111;
  const float TE_CSQC_NOTIFY = 112;
  const float TE_CSQC_WEAPONCOMPLAIN = 113;
 +const float TE_CSQC_BEAM = 114;
 +const float TE_CSQC_CAMPINGRIFLE_SCOPE = 115;
  
  const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
  const float RACE_NET_CHECKPOINT_CLEAR = 1;
@@@ -593,8 -591,8 +593,8 @@@ float WR_RESETPLAYER    = 10; // (SVQC
  float WR_IMPACTEFFECT = 11; // (CSQC) impact effect
  
  
- float HUD_PANEL_WEAPONICONS   = 0;
- float HUD_PANEL_INVENTORY     = 1;
+ float HUD_PANEL_WEAPONS               = 0;
+ float HUD_PANEL_AMMO          = 1;
  float HUD_PANEL_POWERUPS      = 2;
  float HUD_PANEL_HEALTHARMOR   = 3;
  float HUD_PANEL_NOTIFY                = 4;
@@@ -610,8 -608,8 +610,8 @@@ float HUD_PANEL_ENGINEINFO = 13
  float HUD_PANEL_INFOMESSAGES  = 14;
  float HUD_PANEL_NUM           = 15; // always last panel id + 1, please increment when adding a new panel
  
- string HUD_PANELNAME_WEAPONICONS      = "weaponicons";
- string HUD_PANELNAME_INVENTORY                = "inventory";
+ string HUD_PANELNAME_WEAPONS          = "weapons";
+ string HUD_PANELNAME_AMMO             = "ammo";
  string HUD_PANELNAME_POWERUPS         = "powerups";
  string HUD_PANELNAME_HEALTHARMOR      = "healtharmor";
  string HUD_PANELNAME_NOTIFY           = "notify";
index fda3e902fa31649e8746faeaee0892a201755590,1543ac156187e0f4c2497ca2b203dfc71293a5b6..9244c93eb0f1016782db538b9b184e3c76821609
@@@ -1063,18 -1063,9 +1063,18 @@@ float ClientInit_SendEntity(entity to, 
  {
        WriteByte(MSG_ENTITY, ENT_CLIENT_INIT);
        WriteByte(MSG_ENTITY, g_nexball_meter_period * 32);
 -      WriteCoord(MSG_ENTITY, hook_shotorigin_x);
 -      WriteCoord(MSG_ENTITY, hook_shotorigin_y);
 -      WriteCoord(MSG_ENTITY, hook_shotorigin_z);
 +      WriteInt24_t(MSG_ENTITY, compressShotOrigin(hook_shotorigin[0]));
 +      WriteInt24_t(MSG_ENTITY, compressShotOrigin(hook_shotorigin[1]));
 +      WriteInt24_t(MSG_ENTITY, compressShotOrigin(hook_shotorigin[2]));
 +      WriteInt24_t(MSG_ENTITY, compressShotOrigin(hook_shotorigin[3]));
 +      WriteInt24_t(MSG_ENTITY, compressShotOrigin(electro_shotorigin[0]));
 +      WriteInt24_t(MSG_ENTITY, compressShotOrigin(electro_shotorigin[1]));
 +      WriteInt24_t(MSG_ENTITY, compressShotOrigin(electro_shotorigin[2]));
 +      WriteInt24_t(MSG_ENTITY, compressShotOrigin(electro_shotorigin[3]));
 +      WriteInt24_t(MSG_ENTITY, compressShotOrigin(gauntlet_shotorigin[0]));
 +      WriteInt24_t(MSG_ENTITY, compressShotOrigin(gauntlet_shotorigin[1]));
 +      WriteInt24_t(MSG_ENTITY, compressShotOrigin(gauntlet_shotorigin[2]));
 +      WriteInt24_t(MSG_ENTITY, compressShotOrigin(gauntlet_shotorigin[3]));
        if(sv_foginterval && world.fog != "")
                WriteString(MSG_ENTITY, world.fog);
        else
@@@ -2608,7 -2599,23 +2608,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();
                }
  
        }
  
        if(!zoomstate_set)
 -              SetZoomState(self.BUTTON_ZOOM || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX));
 +              SetZoomState(self.BUTTON_ZOOM || (self.BUTTON_ATCK2 && self.weapon == WEP_NEX) || (self.BUTTON_ATCK2 && self.weapon == WEP_CAMPINGRIFLE && cvar("g_balance_campingrifle_secondary") == 0));
  
        float oldspectatee_status;
        oldspectatee_status = self.spectatee_status;