]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clean up spawnflags a bit
authorMario <mario.mario@y7mail.com>
Tue, 23 Apr 2013 14:25:46 +0000 (00:25 +1000)
committerMario <mario.mario@y7mail.com>
Tue, 23 Apr 2013 14:25:46 +0000 (00:25 +1000)
qcsrc/server/monsters/lib/defs.qh
qcsrc/server/monsters/monster/dog.qc
qcsrc/server/monsters/monster/shalrath.qc
qcsrc/server/monsters/monster/soldier.qc

index f6f03ddc285068bf32719a63235ce32f7b0833c3..0e72d578ac42890535c81d1846c6c03e9982e55b 100644 (file)
@@ -9,8 +9,7 @@
 .string oldtarget2;
 .float lastshielded;
 
-const float MONSTER_RESPAWN_SPAWNPOINT = 10; // re-spawn at original spawn point
-const float MONSTER_RESPAWN_DEATHPOINT = 11; // re-spawn where we died
+const float MONSTER_RESPAWN_DEATHPOINT = 8; // re-spawn where we died
 
 .float monster_respawned; // used to make sure we're not recounting respawned monster stats
 
@@ -22,11 +21,10 @@ const float MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill 4
 const float MONSTERSKILL_NOTINSANE = 2048; // monster will not spawn on skill 5
 const float MONSTERSKILL_NOTNIGHTMARE = 4096; // monster will not spawn on skill >= 6
 
-// legacy flags
-const float MONSTERFLAG_NORESPAWN = 2;
-const float MONSTERFLAG_MINIBOSS = 64;  // monster spawns as mini-boss (also has a chance of naturally becoming one)
-const float MONSTERFLAG_NOWANDER = 128; // disable wandering around (currently unused)
-const float MONSTERFLAG_APPEAR = 256; // delay spawn until triggered
+// new flags
+const float MONSTERFLAG_MINIBOSS = 1;  // monster spawns as mini-boss (also has a chance of naturally becoming one)
+const float MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
+const float MONSTERFLAG_NORESPAWN = 4;
 const float MONSTERFLAG_SPAWNED = 512; // flag for spawned monsters
 
 .float msound_delay; // restricts some monster sounds
index 2fc197350328d7e4bbc4cfff195188150d028fbc..654e4363465561a29011ad85e8da12dc2ec33035 100644 (file)
@@ -1,6 +1,6 @@
 // size
-const vector DOG_MAX = '16 16 12';
 const vector DOG_MIN = '-16 -16 -24';
+const vector DOG_MAX = '16 16 12';
 
 // model
 string DOG_MODEL = "models/monsters/dog.dpm";
index ad302a52bc5b400f1f67d9dbfecd53f43a3cacd9..c8e65fa992dce883fc681569c2218a030a210cba 100644 (file)
@@ -44,7 +44,7 @@ void() shalrath_heal;
 void() shalrath_shield;
 void() shalrath_shield_die;
 
-void shalrath_think ()
+void shalrath_think()
 {
        entity head;
        float friend_needshelp = FALSE;
@@ -93,7 +93,7 @@ void shalrath_think ()
        monster_move(autocvar_g_monster_shalrath_speed, autocvar_g_monster_shalrath_speed, 50, shalrath_anim_walk, shalrath_anim_run, shalrath_anim_idle);
 }
 
-void shalrath_attack ()
+void shalrath_attack()
 {
        monsters_setframe(shalrath_anim_attack);
        self.delay = time + 0.2;
@@ -101,7 +101,7 @@ void shalrath_attack ()
        self.monster_delayedattack = ShalMissile;
 }
 
-void shalrathattack_melee ()
+void shalrathattack_melee()
 {
        monster_melee(self.enemy, autocvar_g_monster_shalrath_attack_melee_damage, 0.3, DEATH_MONSTER_MAGE, TRUE);
        
@@ -109,7 +109,7 @@ void shalrathattack_melee ()
        self.monster_delayedattack = func_null;
 }
 
-void shalrath_attack_melee ()
+void shalrath_attack_melee()
 {
        self.monster_delayedattack = shalrathattack_melee;
        self.delay = time + 0.2;
@@ -168,7 +168,7 @@ void shalrath_throw_itemgrenade()
        self.attack_finished_single = time + 1.5;
 }
 
-float shal_missile ()
+float shal_missile()
 {
        if(random() < autocvar_g_monster_shalrath_attack_grenade_chance / 100)
        {
@@ -181,7 +181,7 @@ float shal_missile ()
        return TRUE;
 }
 
-void ShalHome ()
+void ShalHome()
 {
        local vector dir = '0 0 0', vtemp = self.enemy.origin + '0 0 10';
        
@@ -200,7 +200,7 @@ void ShalHome ()
        self.think = ShalHome;  
 }
 
-void shal_spike_explode ()
+void shal_spike_explode()
 {
        self.event_damage = func_null;
 
@@ -217,7 +217,7 @@ void shal_spike_touchexplode()
        shal_spike_explode();
 }
 
-void ShalMissile ()
+void ShalMissile()
 {
        local   entity  missile = world;
        local   vector  dir = '0 0 0';
@@ -250,7 +250,7 @@ void ShalMissile ()
        CSQCProjectile(missile, TRUE, PROJECTILE_VORE_SPIKE, TRUE);
 }
 
-float ShalrathCheckAttack ()
+float ShalrathCheckAttack()
 {
        vector spot1 = '0 0 0', spot2 = '0 0 0';
 
@@ -386,7 +386,7 @@ void shalrath_shield()
        self.armorvalue = autocvar_g_monster_shalrath_shield_blockpercent / 100;
 }
 
-void shalrath_die ()
+void shalrath_die()
 {
        Monster_CheckDropCvars ("shalrath");
        
@@ -398,7 +398,7 @@ void shalrath_die ()
        monster_hook_death(); // for post-death mods
 }
 
-void shalrath_spawn ()
+void shalrath_spawn()
 {
        if not(self.health)
                self.health = autocvar_g_monster_shalrath_health;
@@ -418,7 +418,7 @@ void shalrath_spawn ()
        monster_hook_spawn(); // for post-spawn mods
 }
 
-void spawnfunc_monster_shalrath ()
+void spawnfunc_monster_mage()
 {      
        if not(autocvar_g_monster_shalrath) { remove(self); return; }
        
@@ -439,6 +439,7 @@ void spawnfunc_monster_shalrath ()
 }
 
 // compatibility with old spawns
-void spawnfunc_monster_vore () { spawnfunc_monster_shalrath(); }
+void spawnfunc_monster_vore () { spawnfunc_monster_mage(); }
+void spawnfunc_monster_shalrath () { spawnfunc_monster_mage(); }
 
 #endif // SVQC
index a6b03caada0f5e617e205650fa7f67b20c161dbc..26ed4669179f9b0281bbec9a159b3f75cf9512a4 100644 (file)
@@ -344,7 +344,7 @@ void soldier_spawn ()
        monster_hook_spawn(); // for post-spawn mods
 }
 
-void spawnfunc_monster_soldier ()
+void spawnfunc_monster_marine()
 {      
        if not(autocvar_g_monster_soldier) { remove(self); return; }
        
@@ -368,6 +368,7 @@ void spawnfunc_monster_soldier ()
 }
 
 // compatibility with old spawns
-void spawnfunc_monster_army () { spawnfunc_monster_soldier(); }
+void spawnfunc_monster_army () { spawnfunc_monster_marine(); }
+void spawnfunc_monster_soldier () { spawnfunc_monster_marine(); }
 
 #endif // SVQC