]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/Main.qc
Merge remote-tracking branch 'origin/master' into samual/notification_rewrite
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / Main.qc
index d7f65c6ecdc4369988dbca5f08c08618362f0859..c24778b95a3db4be2270b705a20c66bcad860d01 100644 (file)
@@ -149,12 +149,14 @@ void CSQC_Init(void)
        teams = Sort_Spawn();
        players = Sort_Spawn();
 
-       GetTeam(COLOR_SPECTATOR, true); // add specs first
+       GetTeam(FL_SPECTATOR, true); // add specs first
 
        // needs to be done so early because of the constants they create
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
-
+       CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
+       CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
+       
        WaypointSprite_Load();
 
        // precaches
@@ -261,16 +263,16 @@ float SetTeam(entity o, float Team)
                switch(Team)
                {
                        case -1:
-                       case COLOR_TEAM1:
-                       case COLOR_TEAM2:
-                       case COLOR_TEAM3:
-                       case COLOR_TEAM4:
+                       case FL_TEAM_1:
+                       case FL_TEAM_2:
+                       case FL_TEAM_3:
+                       case FL_TEAM_4:
                                break;
                        default:
                                if(GetTeam(Team, false) == world)
                                {
                                        print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
-                                       Team = COLOR_SPECTATOR;
+                                       Team = FL_SPECTATOR;
                                }
                                break;
                }
@@ -286,7 +288,7 @@ float SetTeam(entity o, float Team)
                                if(GetTeam(Team, false) == world)
                                {
                                        print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
-                                       Team = COLOR_SPECTATOR;
+                                       Team = FL_SPECTATOR;
                                }
                                break;
                }
@@ -779,7 +781,8 @@ void CSQC_Ent_Update(float bIsNewEntity)
                case ENT_CLIENT_TURRET: ent_turret(); break; 
                case ENT_CLIENT_MODEL: CSQCModel_Read(bIsNewEntity); break;
                case ENT_CLIENT_ITEM: ItemRead(bIsNewEntity); break;  
-               case ENT_CLIENT_BUMBLE_RAYGUN: bumble_raygun_read(bIsNewEntity); break;  
+               case ENT_CLIENT_BUMBLE_RAYGUN: bumble_raygun_read(bIsNewEntity); break;
+               case ENT_CLIENT_NOTIFICATION: Read_Notification(bIsNewEntity); break;
                default:
                        //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
                        error(sprintf(_("Unknown entity type in CSQC_Ent_Update (enttype: %d, edict: %d, classname: %s)\n"), self.enttype, num_for_edict(self), self.classname));
@@ -1198,10 +1201,6 @@ float CSQC_Parse_TempEntity()
                        HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadShort(), ReadByte());
                        bHandled = true;
                        break;
-               case TE_CSQC_KILLCENTERPRINT:
-                       HUD_KillCenterprint(ReadString(), ReadString(), ReadShort(), ReadByte());
-                       bHandled = true;
-                       break;
                case TE_CSQC_CENTERPRINT_GENERIC:
                        float id;
                        string s;