]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Update announcer countdown system with different types, update debugprint
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index c687c4502c33ae7c7ec9c8c69fc95559f6d2a788..479dea7599407b803bed7b34b3afd2a07d7032bc 100644 (file)
@@ -170,7 +170,7 @@ void PutObserverInServer (void)
        
        if(self.alivetime)
        {
-               if(!inWarmupStage)
+               if(!warmup_stage)
                        PlayerStats_Event(self, PLAYERSTATS_ALIVETIME, time - self.alivetime);
                self.alivetime = 0;
        }
@@ -424,7 +424,7 @@ void PutClientInServer (void)
                        self.nex_charge = autocvar_g_balance_nex_charge_start;
                }
 
-               if(inWarmupStage)
+               if(warmup_stage)
                {
                        self.ammo_shells = warmup_start_ammo_shells;
                        self.ammo_nails = warmup_start_ammo_nails;
@@ -593,7 +593,7 @@ void PutClientInServer (void)
                self.weaponname = "";
                self.switchingweapon = 0;
 
-               if(!inWarmupStage)
+               if(!warmup_stage)
                        if(!self.alivetime)
                                self.alivetime = time;
 
@@ -811,7 +811,7 @@ void KillIndicator_Think()
                if(IS_REAL_CLIENT(self.owner))
                {
                        if(self.cnt <= 10)
-                               { Send_Notification(NOTIF_ONE, self.owner, MSG_ANNCE, Announcer_PickNumber(self.cnt)); }
+                               { Send_Notification(NOTIF_ONE, self.owner, MSG_ANNCE, Announcer_PickNumber(CNT_KILL, self.cnt)); }
                }
                self.nextthink = time + 1;
                self.cnt -= 1;
@@ -1517,15 +1517,6 @@ void player_powerups (void)
        if(autocvar_g_fullbrightplayers)
                self.effects = self.effects | EF_FULLBRIGHT;
 
-       // midair gamemode: damage only while in the air
-       // if in midair mode, being on ground grants temporary invulnerability
-       // (this is so that multishot weapon don't clear the ground flag on the
-       // first damage in the frame, leaving the player vulnerable to the
-       // remaining hits in the same frame)
-       if (self.flags & FL_ONGROUND)
-       if (g_midair)
-               self.spawnshieldtime = max(self.spawnshieldtime, time + autocvar_g_midair_shieldtime);
-
        if (time >= game_starttime)
        if (time < self.spawnshieldtime)
                self.effects = self.effects | (EF_ADDITIVE | EF_FULLBRIGHT);
@@ -1919,7 +1910,7 @@ void ShowRespawnCountdown()
                {
                        self.respawn_countdown = number - 1;
                        if(ceil(self.respawn_time - (time + 0.5)) == number) // only say it if it is the same number even in 0.5s; to prevent overlapping sounds
-                               Send_Notification(NOTIF_ONE, self, MSG_ANNCE, Announcer_PickNumber(number)); 
+                               { Send_Notification(NOTIF_ONE, self, MSG_ANNCE, Announcer_PickNumber(CNT_RESPAWN, number)); }
                }
        }
 }
@@ -2355,8 +2346,6 @@ void PlayerPreThink (void)
                float do_crouch = self.BUTTON_CROUCH;
                if(self.hook.state)
                        do_crouch = 0;
-               if(self.health <= g_bloodloss)
-                       do_crouch = 1;
                if(self.vehicle)
                        do_crouch = 0;
                if(self.freezetag_frozen)
@@ -2388,15 +2377,6 @@ void PlayerPreThink (void)
                        }
                }
 
-               if(self.health <= g_bloodloss && self.deadflag == DEAD_NO)
-               {
-                       if(self.bloodloss_timer < time)
-                       {
-                               self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0');
-                               self.bloodloss_timer = time + 0.5 + random() * 0.5;
-                       }
-               }
-
                FixPlayermodel();
 
                GrapplingHookFrame();
@@ -2424,9 +2404,6 @@ void PlayerPreThink (void)
 
                if(frametime)
                        player_anim();
-
-               if(g_nexball)
-                       nexball_setstatus();
                
                // secret status
                secrets_setstatus();
@@ -2564,7 +2541,7 @@ void PlayerPostThink (void)
                        else if(timeleft <= 10)
                        {
                                if(timeleft != self.idlekick_lasttimeleft)
-                                       Send_Notification(NOTIF_ONE, self, MSG_ANNCE, Announcer_PickNumber(timeleft));
+                                       { Send_Notification(NOTIF_ONE, self, MSG_ANNCE, Announcer_PickNumber(CNT_IDLE, timeleft)); }
                                self.idlekick_lasttimeleft = timeleft;
                        }
                }