]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monster/mage.qc
Tidy up classnames
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monster / mage.qc
index efdd836d21e8af7bedd7de2ebffe8555031e173a..00aa9e6acc88dcd62891d9a3405d9c8e23b2e1d7 100644 (file)
@@ -12,6 +12,7 @@ METHOD(MageSpike, wr_think, void(MageSpike thiswep, entity actor, .entity weapon
     if (!IS_PLAYER(actor) || weapon_prepareattack(thiswep, actor, weaponentity, false, 0.2)) {
         if (!actor.target_range) actor.target_range = autocvar_g_monsters_target_range;
         actor.enemy = Monster_FindTarget(actor);
+        monster_makevectors(actor, actor.enemy);
         W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_MageSpike_FIRE, CH_WEAPON_B, 0, DEATH_MONSTER_MAGE.m_id);
        if (!IS_PLAYER(actor)) w_shotdir = normalize((actor.enemy.origin + '0 0 10') - actor.origin);
         M_Mage_Attack_Spike(actor, w_shotdir);
@@ -200,7 +201,7 @@ void M_Mage_Attack_Spike(entity this, vector dir)
 {
        makevectors(this.angles);
 
-       entity missile = spawn();
+       entity missile = new(M_Mage_Attack_Spike);
        missile.owner = missile.realowner = this;
        setthink(missile, M_Mage_Attack_Spike_Think);
        missile.ltime = time + 7;
@@ -387,7 +388,7 @@ bool M_Mage_Attack(int attack_type, entity actor, entity targ, .entity weaponent
        return false;
 }
 
-spawnfunc(monster_mage) { Monster_Spawn(this, true, MON_MAGE.monsterid); }
+spawnfunc(monster_mage) { Monster_Spawn(this, true, MON_MAGE); }
 
 #endif // SVQC