]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monster/wyvern.qc
Merge branch 'master' into TimePath/deathtypes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monster / wyvern.qc
index 17b0a96d7bab0991ae8478f3e077739ebc11dca1..ac9f32205dae432e9104065d29957df55dd7debd 100644 (file)
@@ -18,7 +18,7 @@ ENDCLASS(Wyvern)
 
 REGISTER_MONSTER(WYVERN, NEW(Wyvern)) {
 #ifndef MENUQC
-    MON_ACTION(this, MR_PRECACHE);
+    this.mr_precache(this);
 #endif
 }
 
@@ -50,7 +50,7 @@ void M_Wyvern_Attack_Fireball_Touch();
 
 METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, bool fire1, bool fire2)) {
     if (fire1)
-    if (time > actor.attack_finished_single || weapon_prepareattack(actor, false, 1.2)) {
+    if (time > actor.attack_finished_single || weapon_prepareattack(thiswep, actor, false, 1.2)) {
         if (IS_PLAYER(actor)) W_SetupShot_Dir(actor, v_forward, false, 0, W_Sound("electro_fire"), CH_WEAPON_B, 0);
                if (IS_MONSTER(actor)) {
                        actor.attack_finished_single = time + 1.2;
@@ -62,7 +62,7 @@ METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, bool fir
                missile.owner = missile.realowner = actor;
                missile.solid = SOLID_TRIGGER;
                missile.movetype = MOVETYPE_FLYMISSILE;
-               missile.projectiledeathtype = DEATH_MONSTER_WYVERN;
+               missile.projectiledeathtype = DEATH_MONSTER_WYVERN.m_id;
                setsize(missile, '-6 -6 -6', '6 6 6');
                setorigin(missile, actor.origin + actor.view_ofs + v_forward * 14);
                missile.flags = FL_PROJECTILE;
@@ -136,7 +136,7 @@ float M_Wyvern_Attack(float attack_type, entity targ)
        return false;
 }
 
-void spawnfunc_monster_wyvern() { Monster_Spawn(MON_WYVERN.monsterid); }
+spawnfunc(monster_wyvern) { Monster_Spawn(MON_WYVERN.monsterid); }
 #endif // SVQC
 
                #ifdef SVQC
@@ -177,6 +177,7 @@ void spawnfunc_monster_wyvern() { Monster_Spawn(MON_WYVERN.monsterid); }
                }
                #endif
                #ifdef SVQC
+               spawnfunc(item_cells);
                METHOD(Wyvern, mr_setup, bool(Wyvern thismon))
                {
                        SELFPARAM();