]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/Main.qc
Merge branch 'terencehill/scoreboard_fixes'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / Main.qc
index db99e507ff7b68d86586799ca7942ac99088e360..809802dff18e629504928ef8b48ea359d2402879 100644 (file)
@@ -87,12 +87,17 @@ void CSQC_Init(void)
        registercvar("hud_usecsqc", "1");
        registercvar("scoreboard_columns", "default");
 
+       registercvar("cl_nade_type", "3");
+       registercvar("cl_pokenade_type", "zombie");
+
        gametype = 0;
 
        // hud_fields uses strunzone on the titles!
        for(i = 0; i < MAX_HUD_FIELDS; ++i)
                hud_title[i] = strzone("(null)");
 
+       Cmd_HUD_SetFields(0);
+
        postinit = false;
 
        calledhooks = 0;
@@ -109,6 +114,7 @@ void CSQC_Init(void)
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
        CALL_ACCUMULATED_FUNCTION(RegisterHUD_Panels);
+       CALL_ACCUMULATED_FUNCTION(RegisterBuffs);
 
        WaypointSprite_Load();
 
@@ -214,7 +220,7 @@ float SetTeam(entity o, float Team)
                        default:
                                if(GetTeam(Team, false) == world)
                                {
-                                       printf(_("trying to switch to unsupported team %d\n"), Team);
+                                       dprintf("trying to switch to unsupported team %d\n", Team);
                                        Team = NUM_SPECTATOR;
                                }
                                break;
@@ -230,7 +236,7 @@ float SetTeam(entity o, float Team)
                        default:
                                if(GetTeam(Team, false) == world)
                                {
-                                       printf(_("trying to switch to unsupported team %d\n"), Team);
+                                       dprintf("trying to switch to unsupported team %d\n", Team);
                                        Team = NUM_SPECTATOR;
                                }
                                break;
@@ -312,8 +318,6 @@ void Porto_Init();
 void TrueAim_Init();
 void PostInit(void)
 {
-       localcmd(strcat("\nscoreboard_columns_set ", autocvar_scoreboard_columns, ";\n"));
-
        entity playerchecker;
        playerchecker = spawn();
        playerchecker.think = Playerchecker_Think;
@@ -830,6 +834,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
                case ENT_CLIENT_SPAWNPOINT: Ent_ReadSpawnPoint(bIsNewEntity); break;
                case ENT_CLIENT_SPAWNEVENT: Ent_ReadSpawnEvent(bIsNewEntity); break;
                case ENT_CLIENT_NOTIFICATION: Read_Notification(bIsNewEntity); break;
+               case ENT_CLIENT_HEALING_ORB: ent_healer(); break;
 
                default:
                        //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
@@ -937,11 +942,15 @@ void Ent_ScoresInfo()
        HUD_ModIcons_SetFunc();
        for(i = 0; i < MAX_SCORE; ++i)
        {
+               if(scores_label[i])
+                       strunzone(scores_label[i]);
                scores_label[i] = strzone(ReadString());
                scores_flags[i] = ReadByte();
        }
        for(i = 0; i < MAX_TEAMSCORE; ++i)
        {
+               if(teamscores_label[i])
+                       strunzone(teamscores_label[i]);
                teamscores_label[i] = strzone(ReadString());
                teamscores_flags[i] = ReadByte();
        }