]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/Main.qc
Fade out tags of dead players, split health/armor values into two separate sendflags...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / Main.qc
index f2311200e3cddcfbaba68061fe1e727866f9d127..ddace6382ac4a0db186730d120af9303fcfde33d 100644 (file)
@@ -63,7 +63,7 @@ void CSQC_Init(void)
        check_unacceptable_compiler_bugs();
 
 #ifdef WATERMARK
-       print(sprintf(_("^4CSQC Build information: %s\n"), WATERMARK()));
+       print(sprintf(_("^4CSQC Build information: ^1%s\n"), WATERMARK()));
 #endif
 
        float i;
@@ -205,6 +205,10 @@ void CSQC_Shutdown(void)
        if(camera_active)
                cvar_set("chase_active",ftos(chase_active_backup));
 
+       // unset the event chasecam's chase_active
+       if(autocvar_chase_active < 0)
+               cvar_set("chase_active", "0");
+
        if not(isdemo())
        {
                if not(calledhooks & HOOK_START)
@@ -840,9 +844,9 @@ void Ent_ClientData()
                if ( (spectatee_status == -1 && newspectatee_status > 0) //before observing, now spectating
                  || (spectatee_status > 0 && newspectatee_status > 0 && spectatee_status != newspectatee_status) //changed spectated player
                )
-                       last_p_health = -1;
+                       prev_p_health = -1;
                else if(spectatee_status && !newspectatee_status) //before observing/spectating, now playing
-                       health_time = -1;
+                       prev_health = -1;
        }
        spectatee_status = newspectatee_status;
 }
@@ -926,6 +930,7 @@ void Ent_ShowNames()
     //self.movetype = MOVETYPE_FLY; // movetype needed so we can traceline?
     self.mins = '-20 -20 -24';
     self.maxs = '20 20 45';
+    self.classname = "shownames_tag";
 
     sf = ReadByte();
 
@@ -938,6 +943,9 @@ void Ent_ShowNames()
     if(sf & 2)
     {
         self.healthvalue = ReadByte();
+    }
+    if(sf & 4)
+    {
         self.armorvalue = ReadByte();
     }
 
@@ -1006,6 +1014,7 @@ void(float bIsNewEntity) CSQC_Ent_Update =
                case ENT_CLIENT_TUBANOTE: Ent_TubaNote(bIsNewEntity); break;
                case ENT_CLIENT_WARPZONE: WarpZone_Read(bIsNewEntity); break;
                case ENT_CLIENT_WARPZONE_CAMERA: WarpZone_Camera_Read(bIsNewEntity); break;
+               case ENT_CLIENT_WARPZONE_TELEPORTED: WarpZone_Teleported_Read(bIsNewEntity); break;
                case ENT_CLIENT_TRIGGER_MUSIC: Ent_ReadTriggerMusic(); break;
                case ENT_CLIENT_HOOK: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_HOOK); break;
                case ENT_CLIENT_LGBEAM: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_LGBEAM); break;