]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix compile errors
authorMario <mario.mario@y7mail.com>
Tue, 5 Mar 2013 12:41:14 +0000 (23:41 +1100)
committerMario <mario.mario@y7mail.com>
Tue, 5 Mar 2013 12:41:14 +0000 (23:41 +1100)
qcsrc/client/hud.qc
qcsrc/server/monsters/lib/monsters.qc
qcsrc/server/monsters/monster/hknight.qc
qcsrc/server/mutators/gamemode_rts.qc
qcsrc/server/mutators/gamemode_td.qc
qcsrc/server/mutators/mutator_zombie_apocalypse.qc

index ea7770e0abfc234bfc33bc94360841ab1389148f..82467348e588de0b7463885bf8e6de406566fb7b 100644 (file)
@@ -1645,75 +1645,6 @@ void HUD_Notify_Push(string icon, string attacker, string victim)
                if(notify_attackers[kn_index]) { strunzone(notify_attackers[kn_index]); }
                notify_attackers[kn_index] = strzone(attacker);
 
-               if(msg == MSG_KILL_ACTION) { // wtf is this? isnt it basically the same as MSG_SUICIDE?
-                       if(DEATH_ISMONSTER(type)) {
-                       HUD_KillNotify_Push(s1, "", 0, DEATH_GENERIC);
-                       if(alsoprint)
-                       {
-                               if(gentle)
-                                       print (sprintf(_("^1%s^1 hit a monster, and the monster hit back\n"), s1));
-                               else
-                               {
-                                       switch(type)
-                                       {
-                                               case DEATH_MONSTER_DEMON_MELEE:
-                                                       print (sprintf(_("^1%s^1 was eviscerated by a Fiend \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_DEMON_JUMP:
-                                                       print (sprintf(_("^1%s^1 didn't see the Fiend pouncing at them \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_SHAMBLER_MELEE:
-                                                       print (sprintf(_("^1%s^1 was smashed by a Shambler \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_SHAMBLER_CLAW:
-                                                       print (sprintf(_("^1%s^1's insides were ripped out by a Shambler \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_SHAMBLER_LIGHTNING:
-                                                       print (sprintf(_("^1%s^1 was zapped to death by a Shambler \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_SOLDIER_NAIL:
-                                                       print (sprintf(_("^1%s^1 was riddled full of holes by a Soldier \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_ENFORCER_NAIL:
-                                                       print (sprintf(_("^1%s^1 was riddled full of holes by an Enforcer \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_DOG_BITE:
-                                                       print (sprintf(_("^1%s^1 was mauled by a Rottweiler \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_DOG_JUMP:
-                                                       print (sprintf(_("^1%s^1 didn't see the pouncing Rottweiler \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_TARBABY_BLOWUP:
-                                                       print (sprintf(_("^1%s^1 was slimed by a Spawn \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_FISH_BITE:
-                                                       print (sprintf(_("^1%s^1 was fed to the Rotfish \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_HELLFISH_BITE:                       
-                                                       print (sprintf(_("^1%s^1 was eaten alive by a Hellfish \n"), s1));
-                                                       break;
-                        case DEATH_MONSTER_SHALRATH_MELEE:
-                                                       print (sprintf(_("^1%s^1 was exploded by a Vore \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_OGRE_CHAINSAW:
-                                                       print (sprintf(_("^1%s^1 was destroyed by an Ogre \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_OGRE_NAIL:
-                                                       print (sprintf(_("^1%s^1 was riddled full of holes by an Ogre \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_ZOMBIE:
-                                                       print (sprintf(_("^1%s^1's brains were eaten by a Zombie \n"), s1));
-                                                       break;
-                                               case DEATH_MONSTER_HELLKNIGHT_FIREBALL:
-                                                       print (sprintf(_("^1%s^1 was exploded by a Hell-Knight's fireball \n"), s1));
-                                               case DEATH_MONSTER_MELEE:                       
-                                                       print (sprintf(_("^1%s^1 was killed by a monster \n"), s1));
-                                                       break;
-                                       }
-                               }
-                       }
-               }    
-               }
                // victim
                if(notify_victims[kn_index]) { strunzone(notify_victims[kn_index]); }
                notify_victims[kn_index] = strzone(victim);
index 957017c119409f100c6560a3c9244054cbe2a8c3..15aa66cd04be9e2b67f8c67a0bbb15d02c1e0a23 100644 (file)
@@ -245,12 +245,12 @@ void Monster_CheckMinibossFlag ()
                ScaleMonster(1.5);
                self.flags |= MONSTERFLAG_MINIBOSS;
                
-               if (r < 2 || self.team == COLOR_TEAM2)
+               if (r < 2 || self.team == NUM_TEAM_2)
                {
                        self.strength_finished = -1;  
                        self.effects |= (EF_FULLBRIGHT | EF_BLUE);
                }
-               else if (r >= 1 || self.team == COLOR_TEAM1)
+               else if (r >= 1 || self.team == NUM_TEAM_1)
                {
                        self.invincible_finished = -1;
                        self.effects |= (EF_FULLBRIGHT | EF_RED);
@@ -701,7 +701,7 @@ void monster_hook_spawn()
        
        if(teamplay && self.team)
        {
-               self.colormod = TeamColor(self.team);
+               self.colormod = Team_ColorRGB(self.team);
                self.monster_attack = TRUE;
        }
        
@@ -713,7 +713,7 @@ void monster_hook_spawn()
                
        if(autocvar_g_monsters_healthbars)
        {
-               WaypointSprite_Spawn(self.netname, 0, 600, self, '0 0 1' * self.sprite_height, world, 0, self, sprite, FALSE, RADARICON_DANGER, ((teamplay) ? TeamColor(self.team) : '1 0 0')); 
+               WaypointSprite_Spawn(self.netname, 0, 600, self, '0 0 1' * self.sprite_height, world, 0, self, sprite, FALSE, RADARICON_DANGER, ((teamplay) ? Team_ColorRGB(self.team) : '1 0 0'));     
                WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
                WaypointSprite_UpdateHealth(self.sprite, self.health);
        }
index a2bfa653ba7fe0cd8ab730fc2d80b577d29c3ce2..c5e9bca3d4707abd100432425884e6543af2b6d0 100644 (file)
@@ -379,7 +379,7 @@ float hknight_magic ()
                        if (findtrajectorywithleading(self.origin, self.mins, self.maxs, self.enemy, 1000, 0, 10, 0, self))
                        {
                                self.velocity = findtrajectory_velocity;
-                               Damage(self.enemy, self, self, autocvar_g_monster_hellknight_jump_damage * monster_skill, DEATH_VHCRUSH, self.enemy.origin, normalize(self.enemy.origin - self.origin));
+                               Damage(self.enemy, self, self, autocvar_g_monster_hellknight_jump_damage * monster_skill, DEATH_VH_CRUSH, self.enemy.origin, normalize(self.enemy.origin - self.origin));
                                self.attack_finished_single = time + 2;
                                return TRUE;
                        }
index 166ffad049e349d243ab2721430a4824981ae1a8..874aaccfb3b0727f07f17588505855ef6c9be5cd 100644 (file)
@@ -157,7 +157,7 @@ MUTATOR_HOOKFUNCTION(rts_PlayerThink)
                        wp.owner = self; // hmm...
                        wp.think = rts_waypoint_think;
                        wp.nextthink = time;
-                       WaypointSprite_Spawn("Here", 1, 0, wp, '0 0 10', world, self.team, wp, sprite, FALSE, RADARICON_DANGER, ((teamplay) ? TeamColor(self.team) : '1 0 0'));
+                       WaypointSprite_Spawn("Here", 1, 0, wp, '0 0 10', world, self.team, wp, sprite, FALSE, RADARICON_DANGER, ((teamplay) ? Team_ColorRGB(self.team) : '1 0 0'));
                        setorigin(wp, self.cursor_trace_endpos);
                }
                
@@ -171,13 +171,13 @@ MUTATOR_HOOKFUNCTION(rts_PlayerThink)
                                float sheight = ((e.sprite_height) ? e.sprite_height + 20 : 80);
                                if(IsDifferentTeam(e, self))
                                {
-                                       WaypointSprite_Spawn("Attacking", 1, 0, e, '0 0 1' * sheight, world, self.team, self, sprite, FALSE, RADARICON_DANGER, ((teamplay) ? TeamColor(self.team) : '1 0 0'));
+                                       WaypointSprite_Spawn("Attacking", 1, 0, e, '0 0 1' * sheight, world, self.team, self, sprite, FALSE, RADARICON_DANGER, ((teamplay) ? Team_ColorRGB(self.team) : '1 0 0'));
                                        head.goalentity = world;
                                        head.enemy = e;
                                }
                                else if(e.flags & FL_MONSTER)
                                {
-                                       WaypointSprite_Spawn("Following", 1, 0, e, '0 0 1' * sheight, world, self.team, self, sprite, FALSE, RADARICON_DANGER, ((teamplay) ? TeamColor(self.team) : '1 0 0'));
+                                       WaypointSprite_Spawn("Following", 1, 0, e, '0 0 1' * sheight, world, self.team, self, sprite, FALSE, RADARICON_DANGER, ((teamplay) ? Team_ColorRGB(self.team) : '1 0 0'));
                                        head.goalentity = e;
                                }
                                else // its not a monster or an enemy, so revert to waypoint
@@ -226,7 +226,7 @@ MUTATOR_HOOKFUNCTION(rts_MonsterSpawn)
 
 MUTATOR_HOOKFUNCTION(rts_MonsterThink)
 {
-       vector color = ((self.team) ? TeamColor(self.team) : '1 1 1');
+       vector color = ((self.team) ? Team_ColorRGB(self.team) : '1 1 1');
                
        if(self.health >= self.max_health)
                self.heal_delay = -1;   
@@ -266,7 +266,7 @@ MUTATOR_HOOKFUNCTION(rts_MonsterThink)
        
        if not(self.sprite)
        {
-               WaypointSprite_Spawn(self.netname, 0, 0, self, '0 0 1' * self.sprite_height, world, self.team, self, sprite, FALSE, RADARICON_DANGER, ((teamplay) ? TeamColor(self.team) : '1 0 0'));
+               WaypointSprite_Spawn(self.netname, 0, 0, self, '0 0 1' * self.sprite_height, world, self.team, self, sprite, FALSE, RADARICON_DANGER, ((teamplay) ? Team_ColorRGB(self.team) : '1 0 0'));
                WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
                WaypointSprite_UpdateHealth(self.sprite, self.health);
        }
index 67189f67962a28e5b017bf75bc13a26041fa1ecd..70d2efbeb4f2208b00dec40cb4c7f72cdec8c813 100644 (file)
@@ -56,7 +56,7 @@ void td_generator_die()
                
        FOR_EACH_PLAYER(tail)
        {
-               Send_CSQC_Centerprint_Generic(tail, CPID_KH_MSG, ((td_gencount > 1) ? "A generator was destroyed!" : "The generator was destroyed."), 0, 0);
+               centerprint(tail, ((td_gencount > 1) ? "A generator was destroyed!" : "The generator was destroyed."));
        }
        
        setmodel(self, "models/onslaught/generator_dead.md3");
@@ -80,7 +80,7 @@ void td_generator_damage(entity inflictor, entity attacker, float damage, float
        
        FOR_EACH_PLAYER(tail)
        {
-               Send_CSQC_Centerprint_Generic(tail, CPID_KH_MSG, "The generator is under attack!", 0, 0);
+               centerprint(tail, "The generator is under attack!");
        }
        
        self.health -= damage;
@@ -305,7 +305,7 @@ void AnnounceSpawn(string anounce)
        entity tail;
        FOR_EACH_PLAYER(tail)
        {
-               Send_CSQC_Centerprint_Generic(tail, CPID_KH_MSG, strcat("^1A ", anounce, " has arrived!"), 0, 0);
+               centerprint(tail, strcat("^1A ", anounce, " has arrived!"));
        }
 }
 
@@ -488,7 +488,7 @@ void combat_phase_begin()
        print("^1Combat phase!\n");
        FOR_EACH_PLAYER(tail)
        {
-               Send_CSQC_Centerprint_Generic(tail, CPID_KH_MSG, "^1Combat phase!", 0, 0);
+               centerprint(tail, "^1Combat phase!");
        }
        if(autocvar_sv_eventlog)
                GameLogEcho(":combatphase");
@@ -576,7 +576,7 @@ void build_phase()
                        PlayerScore_Add(head, SP_TD_SCORE, -autocvar_g_td_generator_damaged_points);
                        
         n_players += 1;
-        Send_CSQC_Centerprint_Generic(head, CPID_KH_MSG, strcat(buildmsg, healmsg, countmsg, startmsg), 5, 0);
+        centerprint(head, strcat(buildmsg, healmsg, countmsg, startmsg));
     }
     
     FOR_EACH_MONSTER(head)
@@ -622,9 +622,9 @@ void wave_end(float starting)
        FOR_EACH_PLAYER(tail)
        {
                if(starting)
-                       Send_CSQC_Centerprint_Generic(tail, CPID_KH_MSG, "Protect the generator from waves of monsters!", 0, 0);
+                       centerprint(tail, "Protect the generator from waves of monsters!");
                else
-                       Send_CSQC_Centerprint_Generic(tail, CPID_KH_MSG, ((wave_count >= max_waves) ? "Level victory!" : "Wave victory!"), 0, 0);
+                       centerprint(tail, ((wave_count >= max_waves) ? "Level victory!" : "Wave victory!"));
        }
        
        if not(starting)
index 2c3030eb2894df5df91c988e7b855f64f54c38cb..5ff50d3f8b1b6ab97569cc53e965776fb3e1767e 100644 (file)
@@ -57,7 +57,7 @@ void za_roundwon()
        entity head;
        FOR_EACH_PLAYER(head)
        {
-               Send_CSQC_Centerprint_Generic(head, CPID_MINSTA_FINDAMMO, "All the zombies have been exterminated! Prepare for round 2!", 0, 0);
+               centerprint(head, "All the zombies have been exterminated! Prepare for round 2!");
        }
        
        roundcnt += 1;