]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rename rotfish to stingray
authorMario <mario.mario@y7mail.com>
Mon, 29 Apr 2013 19:27:27 +0000 (05:27 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 29 Apr 2013 19:27:27 +0000 (05:27 +1000)
monsters.cfg
qcsrc/client/monsters.qc
qcsrc/common/deathtypes.qh
qcsrc/common/notifications.qh
qcsrc/menu/xonotic/dialog_monstertools.c
qcsrc/server/monsters/lib/monsters_early.qh
qcsrc/server/monsters/monster/fish.qc [deleted file]
qcsrc/server/monsters/monster/stingray.qc [new file with mode: 0644]
qcsrc/server/monsters/monsters.qh
qcsrc/server/mutators/gamemode_towerdefense.qc
qcsrc/server/mutators/gamemode_towerdefense.qh

index fd9e198f65f23683cd708795c4bef334e0fc07f6..2d21965907b784afbe528a729af3d4455d4c3009 100644 (file)
@@ -90,7 +90,7 @@ set g_monster_wyvern_fireball_radius 70 "Wyvern fireball projectile damage radiu
 set g_monster_wyvern_fireball_speed 400 "Wyvern fireball projectile speed"
 
 // Cerberus
-set g_monster_cerberus 1 "Enable Cerberuss"
+set g_monster_cerberus 1 "Enable Cerberuses"
 set g_monster_cerberus_health 25 "Cerberus health"
 set g_monster_cerberus_bite_damage 15 "Cerberus bite attack damage"
 set g_monster_cerberus_attack_jump_damage 30 "Cerberus jump attack damage"
@@ -134,14 +134,14 @@ set g_monster_knight_spike_chance 0.5 "Knight spike attack chance"
 set g_monster_knight_speed_walk 75 "Knight walk speed"
 set g_monster_knight_speed_run 150 "Knight run speed"
 
-// Rotfish
-set g_monster_fish 1 "Enable Rotfish"
-set g_monster_fish_health 25 "Rotfish health"
-set g_monster_fish_damage 10 "Rotfish bite attack damage"
-set g_monster_fish_drop health "Rotfish drops this item on death"
-set g_monster_fish_drop_size small "Size of the item Rotfish drop. Possible values are: small, medium, large"
-set g_monster_fish_speed_walk 40 "Rotfish walk speed"
-set g_monster_fish_speed_run 70 "Rotfish run speed"
+// Stingray
+set g_monster_stingray 1 "Enable Stingray"
+set g_monster_stingray_health 25 "Stingray health"
+set g_monster_stingray_damage 10 "Stingray bite attack damage"
+set g_monster_stingray_drop health "Stingray drops this item on death"
+set g_monster_stingray_drop_size small "Size of the item Stingray drop. Possible values are: small, medium, large"
+set g_monster_stingray_speed_walk 40 "Stingray walk speed"
+set g_monster_stingray_speed_run 70 "Stingray run speed"
 
 // Mage
 set g_monster_mage 1 "Enable Mages"
index ff2a3d00e13d066580d3fa8882ef2031d32c313e..346e8280a84190bcd788751e2659001bdf49ef07 100644 (file)
@@ -60,9 +60,9 @@ void monster_precache(float _mid)
                        precache_model(KNIGHT_MODEL);
                        break;
                }
-               case MONSTER_FISH:
+               case MONSTER_STINGRAY:
                {
-                       precache_model(FISH_MODEL);
+                       precache_model(STINGRAY_MODEL);
                        break;
                }
                case MONSTER_MAGE:
@@ -168,12 +168,12 @@ void monster_mid2info(float _mid)
                        if(self) self.scale = 1.3;
                        break;
                }
-               case MONSTER_FISH:
+               case MONSTER_STINGRAY:
                {
-                       mid2info_model = FISH_MODEL;
-                       mid2info_name = "Rotfish";
-                       mid2info_min = FISH_MIN;
-                       mid2info_max = FISH_MAX;
+                       mid2info_model = STINGRAY_MODEL;
+                       mid2info_name = "Stingray";
+                       mid2info_min = STINGRAY_MIN;
+                       mid2info_max = STINGRAY_MAX;
                        if(self) self.scale = 1.3;
                        break;
                }
index 1a8eca952c3b4f849e241b1750cd47a6a436cc45..99a5ea7ec9b68d321ccf2e588194ac7977662eab 100644 (file)
@@ -18,7 +18,7 @@
        DEATHTYPE(DEATH_MONSTER_CERBERUS_BITE,  DEATH_SELF_MON_CERBERUS_BITE,           NO_MSG,                                            DEATH_MONSTER_FIRST) \
        DEATHTYPE(DEATH_MONSTER_CERBERUS_JUMP,  DEATH_SELF_MON_CERBERUS_JUMP,           NO_MSG,                                            NORMAL_POS) \
        DEATHTYPE(DEATH_MONSTER_ANIMUS,                 DEATH_SELF_MON_ANIMUS,                          NO_MSG,                                            NORMAL_POS) \
-       DEATHTYPE(DEATH_MONSTER_FISH,                   DEATH_SELF_MON_FISH,                            NO_MSG,                                            NORMAL_POS) \
+       DEATHTYPE(DEATH_MONSTER_STINGRAY,               DEATH_SELF_MON_STINGRAY,                        NO_MSG,                                            NORMAL_POS) \
        DEATHTYPE(DEATH_MONSTER_KNIGHT_CRUSH,   DEATH_SELF_MON_KNIGHT_CRUSH,            NO_MSG,                                            NORMAL_POS) \
        DEATHTYPE(DEATH_MONSTER_KNIGHT_FBALL,   DEATH_SELF_MON_KNIGHT_FBALL,            NO_MSG,                                            NORMAL_POS) \
        DEATHTYPE(DEATH_MONSTER_KNIGHT_INFERNO, DEATH_SELF_MON_KNIGHT_INFERNO,          NO_MSG,                                            NORMAL_POS) \
index afff4cba02bf55980f09720d27b51a6c6a32e694..a1bbf8d7609fbd5e217fb961d1ea00afe91370f7 100644 (file)
@@ -294,7 +294,7 @@ void Send_Notification_WOVA(
        MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_CERBERUS_BITE,   2, 1, "s1 s2loc spree_lost", "s1",               "notify_death",                 _("^BG%s^K1 was mauled by a Cerberus%s%s\n"), "") \
        MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_CERBERUS_JUMP,   2, 1, "s1 s2loc spree_lost", "s1",               "notify_death",                 _("^BG%s^K1 didn't see the pouncing Cerberus%s%s\n"), "") \
        MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_ANIMUS,          2, 1, "s1 s2loc spree_lost", "s1",               "notify_death",                 _("^BG%s^K1 was eviscerated by an Animus%s%s\n"), "") \
-       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_FISH,                2, 1, "s1 s2loc spree_lost", "s1",           "notify_death",                 _("^BG%s^K1 was fed to the Rotfish%s%s\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_STINGRAY,        2, 1, "s1 s2loc spree_lost", "s1",               "notify_death",                 _("^BG%s^K1 was fatally wounded by a Stingray%s%s\n"), "") \
        MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_KNIGHT_CRUSH,    2, 1, "s1 s2loc spree_lost", "s1",               "notify_death",                 _("^BG%s^K1 was crushed by a pouncing Knight%s%s\n"), "") \
        MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_KNIGHT_FBALL,    2, 1, "s1 s2loc spree_lost", "s1",               "notify_death",                 _("^BG%s^K1 was turned to ash by a Knight%s%s\n"), "") \
        MSG_INFO_NOTIF(1, INFO_DEATH_SELF_MON_KNIGHT_INFERNO,  2, 1, "s1 s2loc spree_lost", "s1",               "notify_death",                 _("^BG%s^K1 was burned to death by a Knight%s%s\n"), "") \
@@ -648,7 +648,7 @@ void Send_Notification_WOVA(
        MSG_MULTI_NOTIF(1, DEATH_SELF_MON_CERBERUS_BITE,                 NO_MSG,        INFO_DEATH_SELF_MON_CERBERUS_BITE,                 CENTER_DEATH_SELF_MONSTER) \
        MSG_MULTI_NOTIF(1, DEATH_SELF_MON_CERBERUS_JUMP,                 NO_MSG,        INFO_DEATH_SELF_MON_CERBERUS_JUMP,                 CENTER_DEATH_SELF_MONSTER) \
        MSG_MULTI_NOTIF(1, DEATH_SELF_MON_ANIMUS,                                NO_MSG,        INFO_DEATH_SELF_MON_ANIMUS,                                CENTER_DEATH_SELF_MONSTER) \
-       MSG_MULTI_NOTIF(1, DEATH_SELF_MON_FISH,                                  NO_MSG,        INFO_DEATH_SELF_MON_FISH,                                  CENTER_DEATH_SELF_MONSTER) \
+       MSG_MULTI_NOTIF(1, DEATH_SELF_MON_STINGRAY,                              NO_MSG,        INFO_DEATH_SELF_MON_STINGRAY,                      CENTER_DEATH_SELF_MONSTER) \
        MSG_MULTI_NOTIF(1, DEATH_SELF_MON_KNIGHT_CRUSH,                  NO_MSG,        INFO_DEATH_SELF_MON_KNIGHT_CRUSH,                  CENTER_DEATH_SELF_MONSTER) \
        MSG_MULTI_NOTIF(1, DEATH_SELF_MON_KNIGHT_FBALL,              NO_MSG,        INFO_DEATH_SELF_MON_KNIGHT_FBALL,              CENTER_DEATH_SELF_MONSTER) \
        MSG_MULTI_NOTIF(1, DEATH_SELF_MON_KNIGHT_INFERNO,                NO_MSG,        INFO_DEATH_SELF_MON_KNIGHT_INFERNO,            CENTER_DEATH_SELF_MONSTER) \
index 5cdbeac7feedab7e21d5987a2c4dc499d9f79b05..cc7e56c946bd13b21cc2fe3fe7c8e04809d58c5b 100644 (file)
@@ -28,7 +28,7 @@ void XonoticMonsterToolsDialog_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "cerberus", _("Cerberus")));
                me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "slime", _("Slime")));
-               me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "fish", _("Rotfish")));
+               me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "stingray", _("Stingray")));
                me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "mage", _("Mage")));
                me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "wyvern", _("Wyvern")));
        me.TR(me);
index 4d27864599475e8b04e2272bd7c9f1500cac7610..ccbbe61898ac0911587d497cee66feb4ed1a6394 100644 (file)
@@ -31,7 +31,7 @@ float MONSTER_WYVERN          = 7;
 float MONSTER_CERBERUS         = 8;
 float MONSTER_SLIME            = 9;
 float MONSTER_KNIGHT           = 10;
-float MONSTER_FISH                     = 11;
+float MONSTER_STINGRAY                 = 11;
 float MONSTER_MAGE                     = 12;
 float MONSTER_SPIDER           = 13;
 float MONSTER_LAST                     = 14;
diff --git a/qcsrc/server/monsters/monster/fish.qc b/qcsrc/server/monsters/monster/fish.qc
deleted file mode 100644 (file)
index 1f19da0..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-// size
-const vector FISH_MIN = '-20 -20 -31';
-const vector FISH_MAX = '20 20 20';
-
-// model
-string FISH_MODEL = "models/monsters/fish.mdl";
-
-#ifdef SVQC
-// cvars
-float autocvar_g_monster_fish;
-float autocvar_g_monster_fish_health;
-float autocvar_g_monster_fish_damage;
-float autocvar_g_monster_fish_speed_walk;
-float autocvar_g_monster_fish_speed_run;
-
-// animations
-const float fish_anim_attack = 0;
-const float fish_anim_death  = 1;
-const float fish_anim_swim   = 2;
-const float fish_anim_pain   = 3;
-
-void fish_think ()
-{
-       self.think = fish_think;
-       self.nextthink = time + self.ticrate;
-       
-       monster_move(autocvar_g_monster_fish_speed_run, autocvar_g_monster_fish_speed_walk, 10, fish_anim_swim, fish_anim_swim, fish_anim_swim);
-}
-
-float fish_attack(float attack_type)
-{
-       switch(attack_type)
-       {
-               case MONSTER_ATTACK_MELEE:
-               {
-                       monsters_setframe(fish_anim_attack);
-                       self.attack_finished_single = time + 0.5;
-                       monster_melee(self.enemy, autocvar_g_monster_fish_damage, 0.1, DEATH_MONSTER_FISH, FALSE);
-                       
-                       return TRUE;
-               }
-               case MONSTER_ATTACK_RANGED:
-       }
-       
-       return FALSE;
-}
-
-void fish_die ()
-{
-       Monster_CheckDropCvars ("fish");
-       
-       self.think = monster_dead_think;
-       self.nextthink = time + self.ticrate;
-       self.ltime = time + 5;
-       monsters_setframe(fish_anim_death);
-       
-       monster_hook_death(); // for post-death mods
-}
-
-void fish_spawn ()
-{
-       if not(self.health)
-               self.health = autocvar_g_monster_fish_health;
-
-       self.damageforcescale   = 0.5;
-       self.classname                  = "monster_fish";
-       self.monster_attackfunc = fish_attack;
-       self.flags                         |= FL_SWIM;
-       self.nextthink                  = time + random() * 0.5 + 0.1;
-       self.think                              = fish_think;
-       
-       monster_setupsounds("fish");
-       
-       monster_hook_spawn(); // for post-spawn mods
-}
-
-void spawnfunc_monster_fish ()
-{      
-       if not(autocvar_g_monster_fish) { remove(self); return; }
-       
-       self.monster_spawnfunc = spawnfunc_monster_fish;
-       
-       if(Monster_CheckAppearFlags(self))
-               return;
-       
-       self.scale = 1.3;
-       
-       if not (monster_initialize(
-                        "Rotfish", MONSTER_FISH,
-                        FISH_MIN, FISH_MAX,
-                        TRUE,
-                        fish_die, fish_spawn))
-       {
-               remove(self);
-               return;
-       }
-}
-
-#endif // SVQC
diff --git a/qcsrc/server/monsters/monster/stingray.qc b/qcsrc/server/monsters/monster/stingray.qc
new file mode 100644 (file)
index 0000000..cc28f08
--- /dev/null
@@ -0,0 +1,99 @@
+// size
+const vector STINGRAY_MIN = '-20 -20 -31';
+const vector STINGRAY_MAX = '20 20 20';
+
+// model
+string STINGRAY_MODEL = "models/monsters/fish.mdl";
+
+#ifdef SVQC
+// cvars
+float autocvar_g_monster_stingray;
+float autocvar_g_monster_stingray_health;
+float autocvar_g_monster_stingray_damage;
+float autocvar_g_monster_stingray_speed_walk;
+float autocvar_g_monster_stingray_speed_run;
+
+// animations
+const float stingray_anim_attack = 0;
+const float stingray_anim_death  = 1;
+const float stingray_anim_swim   = 2;
+const float stingray_anim_pain   = 3;
+
+void stingray_think ()
+{
+       self.think = stingray_think;
+       self.nextthink = time + self.ticrate;
+       
+       monster_move(autocvar_g_monster_stingray_speed_run, autocvar_g_monster_stingray_speed_walk, 10, stingray_anim_swim, stingray_anim_swim, stingray_anim_swim);
+}
+
+float stingray_attack(float attack_type)
+{
+       switch(attack_type)
+       {
+               case MONSTER_ATTACK_MELEE:
+               {
+                       monsters_setframe(stingray_anim_attack);
+                       self.attack_finished_single = time + 0.5;
+                       monster_melee(self.enemy, autocvar_g_monster_stingray_damage, 0.1, DEATH_MONSTER_STINGRAY, FALSE);
+                       
+                       return TRUE;
+               }
+               case MONSTER_ATTACK_RANGED:
+       }
+       
+       return FALSE;
+}
+
+void stingray_die ()
+{
+       Monster_CheckDropCvars ("stingray");
+       
+       self.think = monster_dead_think;
+       self.nextthink = time + self.ticrate;
+       self.ltime = time + 5;
+       monsters_setframe(stingray_anim_death);
+       
+       monster_hook_death(); // for post-death mods
+}
+
+void stingray_spawn ()
+{
+       if not(self.health)
+               self.health = autocvar_g_monster_stingray_health;
+
+       self.damageforcescale   = 0.5;
+       self.classname                  = "monster_stingray";
+       self.monster_attackfunc = stingray_attack;
+       self.flags                         |= FL_SWIM;
+       self.nextthink                  = time + random() * 0.5 + 0.1;
+       self.think                              = stingray_think;
+       
+       monster_setupsounds("stingray");
+       
+       monster_hook_spawn(); // for post-spawn mods
+}
+
+void spawnfunc_monster_stingray ()
+{      
+       if not(autocvar_g_monster_stingray) { remove(self); return; }
+       
+       self.monster_spawnfunc = spawnfunc_monster_stingray;
+       
+       if(Monster_CheckAppearFlags(self))
+               return;
+       
+       self.scale = 1.3;
+       
+       if not (monster_initialize(
+                        "Stingray", MONSTER_STINGRAY,
+                        STINGRAY_MIN, STINGRAY_MAX,
+                        TRUE,
+                        stingray_die, stingray_spawn))
+       {
+               remove(self);
+               return;
+       }
+}
+
+#endif // SVQC
index 8edb390e3d10e77918a6bcdbb9a696de4d7266b9..8591b9e2f75919ce017fa94ab6c8eb4e1c88f7b3 100644 (file)
@@ -14,7 +14,7 @@
 #include "monster/cerberus.qc"
 #include "monster/slime.qc"
 #include "monster/knight.qc"
-#include "monster/fish.qc"
+#include "monster/stingray.qc"
 #include "monster/mage.qc"
 #include "monster/zombie.qc"
 #include "monster/spider.qc"
index 29f90993275196c779698a32d6200042aad41f43..736400054fde3d200ef8a9dbe669960fed8e0a83 100644 (file)
@@ -385,7 +385,7 @@ float Monster_GetStrength(float mnster)
                case MONSTER_SLIME:
                case MONSTER_CERBERUS:
                case MONSTER_WYVERN:
-               case MONSTER_FISH:
+               case MONSTER_STINGRAY:
                        return SWARM_WEAK;
                case MONSTER_KNIGHT:
                case MONSTER_OGRE:
@@ -410,7 +410,7 @@ string monster_type2string(float mnster)
                case MONSTER_CERBERUS: return "cerberus";
                case MONSTER_SLIME: return "slime";
                case MONSTER_KNIGHT: return "knight";
-               case MONSTER_FISH: return "fish";
+               case MONSTER_STINGRAY: return "stingray";
                case MONSTER_MAGE: return "mage";
                case MONSTER_SPIDER: return "spider";
                default: return "";
@@ -435,7 +435,7 @@ float Monster_GetType(float mnster)
                        return SWARM_NORMAL;
                case MONSTER_WYVERN:
                        return SWARM_FLY;
-               case MONSTER_FISH:
+               case MONSTER_STINGRAY:
                        return SWARM_SWIM;
        }
 }
@@ -455,7 +455,7 @@ float RandomMonster()
        if(n_shamblers) RandomSelection_Add(world, MONSTER_SHAMBLER, "", 0.2, 0.2);
        if(n_slimes) RandomSelection_Add(world, MONSTER_SLIME, "", 0.2, 0.2);
        if(n_wyverns && flyspawns_count) RandomSelection_Add(world, MONSTER_WYVERN, "", 1, 1);
-       if(n_fish && waterspawns_count) RandomSelection_Add(world, MONSTER_FISH, "", 0.2, 0.2);
+       if(n_stingrays && waterspawns_count) RandomSelection_Add(world, MONSTER_STINGRAY, "", 0.2, 0.2);
        
        return RandomSelection_chosen_float;
 }
@@ -511,7 +511,7 @@ void queue_monsters(float maxmonsters)
        if(flyspawns_count > 0)
                n_wyverns = DistributeEvenly_Get(1);
        if(waterspawns_count > 0)
-               n_fish = DistributeEvenly_Get(1);
+               n_stingrays = DistributeEvenly_Get(1);
 }
 
 void combat_phase_begin()
@@ -842,7 +842,7 @@ MUTATOR_HOOKFUNCTION(td_MonsterSpawn)
                case MONSTER_CERBERUS: n_cerberuses -= 1; break;
                case MONSTER_SLIME: n_slimes -= 1; break;
                case MONSTER_KNIGHT: n_knights -= 1; break;
-               case MONSTER_FISH: n_fish -= 1; break;
+               case MONSTER_STINGRAY: n_stingrays -= 1; break;
                case MONSTER_MAGE: n_mages -= 1; break;
                case MONSTER_SPIDER: n_spiders -= 1; break;
        }
index de8a84347dc9dc12f15680b6796eb23062e5391e..cadeb9cc356aa422915757cf4bf81acf006143ee 100644 (file)
@@ -1,6 +1,6 @@
 // Counters
 float monster_count, totalmonsters;
-float n_bruisers, n_cerberuses, n_ogres, n_shamblers, n_wyverns, n_mages, n_knights, n_animuses, n_zombies, n_slimes, n_fish, n_spiders;
+float n_bruisers, n_cerberuses, n_ogres, n_shamblers, n_wyverns, n_mages, n_knights, n_animuses, n_zombies, n_slimes, n_stingrays, n_spiders;
 float current_monsters;
 float waterspawns_count, flyspawns_count;
 float wave_count, max_waves;