]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Add a new model for tarbaby
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index bcff1babf0db1e8939db14cb2a390329ce5d74be..f8ba5e16c4b7f61e381addc251520c47d0260f09 100644 (file)
@@ -6,22 +6,6 @@ void send_CSQC_teamnagger() {
        WriteByte(MSG_BROADCAST, TE_CSQC_TEAMNAGGER);
 }
 
-void Announce(string snd) {
-       WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
-       WriteByte(MSG_BROADCAST, TE_CSQC_ANNOUNCE);
-       WriteString(MSG_BROADCAST, snd);
-}
-
-void AnnounceTo(entity e, string snd) {
-       if (clienttype(e) == CLIENTTYPE_REAL)
-       {
-               msg_entity = e;
-               WriteByte(MSG_ONE, SVC_TEMPENTITY);
-               WriteByte(MSG_ONE, TE_CSQC_ANNOUNCE);
-               WriteString(MSG_ONE, snd);
-       }
-}
-
 float ClientData_Send(entity to, float sf)
 {
        if(to != self.owner)
@@ -407,6 +391,8 @@ void PutObserverInServer (void)
 
        Portal_ClearAll(self);
        
+       Unfreeze(self);
+       
        if(self.alivetime)
        {
                if(!inWarmupStage)
@@ -1150,7 +1136,7 @@ void KillIndicator_Think()
                if(clienttype(self.owner) == CLIENTTYPE_REAL)
                {
                        if(self.cnt <= 10)
-                               AnnounceTo(self.owner, strcat(ftos(self.cnt), ""));
+                               { Send_Notification(NOTIF_ONE, self.owner, MSG_ANNCE, Announcer_PickNumber(self.cnt)); }
                }
                self.nextthink = time + 1;
                self.cnt -= 1;
@@ -1271,7 +1257,7 @@ void ClientKill (void)
        {
                // do nothing
        }
-    else if(self.freezetag_frozen)
+    else if(self.frozen == 1)
     {
         // do nothing
     }
@@ -1639,6 +1625,8 @@ void ClientDisconnect (void)
        MUTATOR_CALLHOOK(ClientDisconnect);
 
        Portal_ClearAll(self);
+       
+       Unfreeze(self);
 
        RemoveGrapplingHook(self);
 
@@ -2288,7 +2276,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
-                               AnnounceTo(self, strcat(ftos(number), ""));
+                               Send_Notification(NOTIF_ONE, self, MSG_ANNCE, Announcer_PickNumber(number)); 
                }
        }
 }
@@ -2593,7 +2581,7 @@ void PlayerPreThink (void)
                return;
 #endif
 
-       if(self.frozen)
+       if(self.frozen == 2)
        {
                self.revive_progress = bound(0, self.revive_progress + frametime * self.revive_speed, 1);
                self.health = max(1, self.revive_progress * autocvar_g_balance_health_start);
@@ -2768,7 +2756,7 @@ void PlayerPreThink (void)
                        do_crouch = 1;
                if(self.vehicle)
                        do_crouch = 0;
-               if(self.freezetag_frozen || self.frozen)
+               if(self.frozen)
                        do_crouch = 0;
                if(self.weapon == WEP_SHOTGUN && self.weaponentity.wframe == WFRAME_FIRE2 && time < self.weapon_nextthink)
                        do_crouch = 0;
@@ -2971,7 +2959,7 @@ void PlayerPostThink (void)
                        else if(timeleft <= 10)
                        {
                                if(timeleft != self.idlekick_lasttimeleft)
-                                       AnnounceTo(self, ftos(timeleft));
+                                       Send_Notification(NOTIF_ONE, self, MSG_ANNCE, Announcer_PickNumber(timeleft));
                                self.idlekick_lasttimeleft = timeleft;
                        }
                }