X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fmonster%2Fmage.qc;h=fcac1e4091434e898821c9cc350e8c7d3695e372;hb=118e6c304a242d2de95978fdbf593a62c9d86073;hp=b63c0f73e5e64171f8532ce4d73e94661234d13b;hpb=dd56fad16f10856522e381bbecdfb887f86b0f8e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/monsters/monster/mage.qc b/qcsrc/common/monsters/monster/mage.qc index b63c0f73e5..fcac1e4091 100644 --- a/qcsrc/common/monsters/monster/mage.qc +++ b/qcsrc/common/monsters/monster/mage.qc @@ -2,7 +2,7 @@ #define MAGE_H #ifndef MENUQC -MODEL(MON_MAGE, "models/monsters/mage.dpm"); +MODEL(MON_MAGE, M_Model("mage.dpm")); #endif CLASS(Mage, Monster) @@ -22,14 +22,14 @@ REGISTER_MONSTER(MAGE, NEW(Mage)) { #endif } -#include "../../weapons/all.qh" -#include "../../items/all.qc" +#include +#include CLASS(MageSpike, PortoLaunch) /* flags */ ATTRIB(MageSpike, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED); /* impulse */ ATTRIB(MageSpike, impulse, int, 9); /* refname */ ATTRIB(MageSpike, netname, string, "magespike"); -/* wepname */ ATTRIB(MageSpike, message, string, _("Mage spike")); +/* wepname */ ATTRIB(MageSpike, m_name, string, _("Mage spike")); ENDCLASS(MageSpike) REGISTER_WEAPON(MAGE_SPIKE, NEW(MageSpike)); @@ -39,33 +39,37 @@ REGISTER_WEAPON(MAGE_SPIKE, NEW(MageSpike)); #ifdef SVQC -void M_Mage_Attack_Spike(vector dir); -void M_Mage_Attack_Push(); -METHOD(MageSpike, wr_think, void(MageSpike thiswep, entity actor, int slot, int fire)) { +SOUND(MageSpike_FIRE, W_Sound("electro_fire")); +void M_Mage_Attack_Spike(entity this, vector dir); +void M_Mage_Attack_Push(entity this); +METHOD(MageSpike, wr_think, void(MageSpike thiswep, entity actor, .entity weaponentity, int fire)) +{ + TC(MageSpike, thiswep); if (fire & 1) - if (!IS_PLAYER(actor) || weapon_prepareattack(thiswep, actor, slot, false, 0.2)) { + 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); - W_SetupShot_Dir(actor, v_forward, false, 0, W_Sound("electro_fire"), CH_WEAPON_B, 0); + W_SetupShot_Dir(actor, v_forward, false, 0, SND(MageSpike_FIRE), CH_WEAPON_B, 0); if (!IS_PLAYER(actor)) w_shotdir = normalize((actor.enemy.origin + '0 0 10') - actor.origin); - M_Mage_Attack_Spike(w_shotdir); - weapon_thinkf(actor, slot, WFRAME_FIRE1, 0, w_ready); + M_Mage_Attack_Spike(actor, w_shotdir); + weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, 0, w_ready); } if (fire & 2) - if (!IS_PLAYER(actor) || weapon_prepareattack(thiswep, actor, slot, true, 0.5)) { - M_Mage_Attack_Push(); - weapon_thinkf(actor, slot, WFRAME_FIRE2, 0, w_ready); + if (!IS_PLAYER(actor) || weapon_prepareattack(thiswep, actor, weaponentity, true, 0.5)) { + M_Mage_Attack_Push(actor); + weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, 0, w_ready); } } -void M_Mage_Attack_Teleport(); +void M_Mage_Attack_Teleport(entity this, entity targ); CLASS(OffhandMageTeleport, OffhandWeapon) .bool OffhandMageTeleport_key_pressed; METHOD(OffhandMageTeleport, offhand_think, void(OffhandMageTeleport this, entity player, bool key_pressed)) { + TC(OffhandMageTeleport, this); if (key_pressed && !player.OffhandMageTeleport_key_pressed) - WITH(entity, self, player, M_Mage_Attack_Teleport()); + M_Mage_Attack_Teleport(player, player.enemy); player.OffhandMageTeleport_key_pressed = key_pressed; } ENDCLASS(OffhandMageTeleport) @@ -109,58 +113,58 @@ const float mage_anim_death = 4; const float mage_anim_run = 5; */ -void() M_Mage_Defend_Heal; -void() M_Mage_Defend_Shield; +void M_Mage_Defend_Heal(entity this); +void M_Mage_Defend_Shield(entity this); .entity mage_spike; .float mage_shield_delay; .float mage_shield_time; -float M_Mage_Defend_Heal_Check(entity e) -{SELFPARAM(); - if(e == world) +bool M_Mage_Defend_Heal_Check(entity this, entity targ) +{ + if(targ == world) return false; - if(e.health <= 0) + if(targ.health <= 0) return false; - if(DIFF_TEAM(e, self) && e != self.monster_follow) + if(DIFF_TEAM(targ, this) && targ != this.monster_follow) return false; - if(e.frozen) + if(STAT(FROZEN, targ)) return false; - if(!IS_PLAYER(e)) - return (IS_MONSTER(e) && e.health < e.max_health); - if(e.items & ITEM_Shield.m_itemid) + if(!IS_PLAYER(targ)) + return (IS_MONSTER(targ) && targ.health < targ.max_health); + if(targ.items & ITEM_Shield.m_itemid) return false; - switch(self.skin) + switch(this.skin) { - case 0: return (e.health < autocvar_g_balance_health_regenstable); - case 1: return ((e.ammo_cells && e.ammo_cells < g_pickup_cells_max) || (e.ammo_plasma && e.ammo_plasma < g_pickup_plasma_max) || (e.ammo_rockets && e.ammo_rockets < g_pickup_rockets_max) || (e.ammo_nails && e.ammo_nails < g_pickup_nails_max) || (e.ammo_shells && e.ammo_shells < g_pickup_shells_max)); - case 2: return (e.armorvalue < autocvar_g_balance_armor_regenstable); - case 3: return (e.health > 0); + case 0: return (targ.health < autocvar_g_balance_health_regenstable); + case 1: return ((targ.ammo_cells && targ.ammo_cells < g_pickup_cells_max) || (targ.ammo_plasma && targ.ammo_plasma < g_pickup_plasma_max) || (targ.ammo_rockets && targ.ammo_rockets < g_pickup_rockets_max) || (targ.ammo_nails && targ.ammo_nails < g_pickup_nails_max) || (targ.ammo_shells && targ.ammo_shells < g_pickup_shells_max)); + case 2: return (targ.armorvalue < autocvar_g_balance_armor_regenstable); + case 3: return (targ.health > 0); } return false; } -void M_Mage_Attack_Spike_Explode() -{SELFPARAM(); - self.event_damage = func_null; +void M_Mage_Attack_Spike_Explode(entity this) +{ + this.event_damage = func_null; - sound(self, CH_SHOTS, SND_GRENADE_IMPACT, VOL_BASE, ATTEN_NORM); + sound(this, CH_SHOTS, SND_GRENADE_IMPACT, VOL_BASE, ATTEN_NORM); - self.realowner.mage_spike = world; + this.realowner.mage_spike = world; - Send_Effect(EFFECT_EXPLOSION_SMALL, self.origin, '0 0 0', 1); - RadiusDamage (self, self.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), world, world, 0, DEATH_MONSTER_MAGE.m_id, other); + Send_Effect(EFFECT_EXPLOSION_SMALL, this.origin, '0 0 0', 1); + RadiusDamage (this, this.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), world, world, 0, DEATH_MONSTER_MAGE.m_id, other); - remove (self); + remove (this); } void M_Mage_Attack_Spike_Touch() { PROJECTILE_TOUCH; - M_Mage_Attack_Spike_Explode(); + M_Mage_Attack_Spike_Explode(self); } .float wait; @@ -170,7 +174,7 @@ void M_Mage_Attack_Spike_Think() {SELFPARAM(); if (time > self.ltime || (self.enemy && self.enemy.health <= 0) || self.owner.health <= 0) { self.projectiledeathtype |= HITTYPE_SPLASH; - M_Mage_Attack_Spike_Explode(); + M_Mage_Attack_Spike_Explode(self); } float spd = vlen(self.velocity); @@ -181,7 +185,7 @@ void M_Mage_Attack_Spike_Think() ); if (self.enemy != world) - if (self.enemy.takedamage != DAMAGE_AIM || self.enemy.deadflag != DEAD_NO) + if (self.enemy.takedamage != DAMAGE_AIM || IS_DEAD(self.enemy)) self.enemy = world; if (self.enemy != world) @@ -191,13 +195,12 @@ void M_Mage_Attack_Spike_Think() float turnrate = (autocvar_g_monster_mage_attack_spike_turnrate); // how fast to turn vector desireddir = normalize(eorg - self.origin); vector olddir = normalize(self.velocity); // get my current direction - float dist = vlen(eorg - self.origin); // Do evasive maneuvers for world objects? ( this should be a cpu hog. :P ) - if ((autocvar_g_monster_mage_attack_spike_smart) && (dist > (autocvar_g_monster_mage_attack_spike_smart_mindist))) + if ((autocvar_g_monster_mage_attack_spike_smart) && vdist(eorg - self.origin, >, autocvar_g_monster_mage_attack_spike_smart_mindist)) { // Is it a better idea (shorter distance) to trace to the target itself? - if ( vlen(self.origin + olddir * self.wait) < dist) + if ( vlen2(self.origin + olddir * self.wait) < vlen2(eorg - self.origin)) traceline(self.origin, self.origin + olddir * self.wait, false, self); else traceline(self.origin, eorg, false, self); @@ -220,43 +223,42 @@ void M_Mage_Attack_Spike_Think() UpdateCSQCProjectile(self); } -void M_Mage_Attack_Spike(vector dir) +void M_Mage_Attack_Spike(entity this, vector dir) { - SELFPARAM(); - makevectors(self.angles); + makevectors(this.angles); entity missile = spawn(); - missile.owner = missile.realowner = self; + missile.owner = missile.realowner = this; missile.think = M_Mage_Attack_Spike_Think; missile.ltime = time + 7; missile.nextthink = time; missile.solid = SOLID_BBOX; missile.movetype = MOVETYPE_FLYMISSILE; missile.flags = FL_PROJECTILE; - setorigin(missile, self.origin + v_forward * 14 + '0 0 30' + v_right * -14); + setorigin(missile, this.origin + v_forward * 14 + '0 0 30' + v_right * -14); setsize(missile, '0 0 0', '0 0 0'); missile.velocity = dir * 400; missile.avelocity = '300 300 300'; - missile.enemy = self.enemy; + missile.enemy = this.enemy; missile.touch = M_Mage_Attack_Spike_Touch; - self.mage_spike = missile; + this.mage_spike = missile; CSQCProjectile(missile, true, PROJECTILE_MAGE_SPIKE, true); } -void M_Mage_Defend_Heal() -{SELFPARAM(); +void M_Mage_Defend_Heal(entity this) +{ entity head; float washealed = false; - for(head = findradius(self.origin, (autocvar_g_monster_mage_heal_range)); head; head = head.chain) if(M_Mage_Defend_Heal_Check(head)) + for(head = findradius(this.origin, (autocvar_g_monster_mage_heal_range)); head; head = head.chain) if(M_Mage_Defend_Heal_Check(this, head)) { washealed = true; string fx = ""; if(IS_PLAYER(head)) { - switch(self.skin) + switch(this.skin) { case 0: if(head.health < autocvar_g_balance_health_regenstable) head.health = bound(0, head.health + (autocvar_g_monster_mage_heal_allies), autocvar_g_balance_health_regenstable); @@ -278,7 +280,7 @@ void M_Mage_Defend_Heal() } break; case 3: - head.health = bound(0, head.health - ((head == self) ? (autocvar_g_monster_mage_heal_self) : (autocvar_g_monster_mage_heal_allies)), autocvar_g_balance_health_regenstable); + head.health = bound(0, head.health - ((head == this) ? (autocvar_g_monster_mage_heal_self) : (autocvar_g_monster_mage_heal_allies)), autocvar_g_balance_health_regenstable); fx = EFFECT_RAGE.eent_eff_name; break; } @@ -296,66 +298,70 @@ void M_Mage_Defend_Heal() if(washealed) { - setanim(self, self.anim_shoot, true, true, true); - self.attack_finished_single[0] = time + (autocvar_g_monster_mage_heal_delay); - self.anim_finished = time + 1.5; + setanim(this, this.anim_shoot, true, true, true); + this.attack_finished_single[0] = time + (autocvar_g_monster_mage_heal_delay); + this.anim_finished = time + 1.5; } } -void M_Mage_Attack_Push() -{SELFPARAM(); - sound(self, CH_SHOTS, SND_TAGEXP1, 1, ATTEN_NORM); - RadiusDamage (self, self, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), world, world, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE.m_id, self.enemy); - Send_Effect(EFFECT_TE_EXPLOSION, self.origin, '0 0 0', 1); +void M_Mage_Attack_Push(entity this) +{ + sound(this, CH_SHOTS, SND_TAGEXP1, 1, ATTEN_NORM); + RadiusDamage (this, this, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), world, world, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE.m_id, this.enemy); + Send_Effect(EFFECT_TE_EXPLOSION, this.origin, '0 0 0', 1); - setanim(self, self.anim_shoot, true, true, true); - self.attack_finished_single[0] = time + (autocvar_g_monster_mage_attack_push_delay); + setanim(this, this.anim_shoot, true, true, true); + this.attack_finished_single[0] = time + (autocvar_g_monster_mage_attack_push_delay); } -void M_Mage_Attack_Teleport() -{SELFPARAM(); - entity targ = self.enemy; - if (!targ) return; - if (vlen(targ.origin - self.origin) > 1500) return; +void M_Mage_Attack_Teleport(entity this, entity targ) +{ + if(!targ) return; + if(vdist(targ.origin - this.origin, >, 1500)) return; makevectors(targ.angles); - tracebox(targ.origin + ((v_forward * -1) * 200), self.mins, self.maxs, self.origin, MOVE_NOMONSTERS, self); + tracebox(targ.origin + ((v_forward * -1) * 200), this.mins, this.maxs, this.origin, MOVE_NOMONSTERS, this); if(trace_fraction < 1) return; - Send_Effect(EFFECT_SPAWN_NEUTRAL, self.origin, '0 0 0', 1); - setorigin(self, targ.origin + ((v_forward * -1) * 200)); + vector newpos = targ.origin + ((v_forward * -1) * 200); - vector a = vectoangles(targ.origin - self.origin); + Send_Effect(EFFECT_SPAWN_NEUTRAL, this.origin, '0 0 0', 1); + Send_Effect(EFFECT_SPAWN_NEUTRAL, newpos, '0 0 0', 1); + + setorigin(this, newpos); + + vector a = vectoangles(targ.origin - this.origin); a.x = -a.x; - self.angles_x = a.x; - self.angles_y = a.y; - self.fixangle = true; - self.velocity *= 0.5; + this.angles_x = a.x; + this.angles_y = a.y; + this.fixangle = true; + this.velocity *= 0.5; - self.attack_finished_single[0] = time + 0.2; + this.attack_finished_single[0] = time + 0.2; } -void M_Mage_Defend_Shield_Remove() -{SELFPARAM(); - self.effects &= ~(EF_ADDITIVE | EF_BLUE); - self.armorvalue = autocvar_g_monsters_armor_blockpercent; +void M_Mage_Defend_Shield_Remove(entity this) +{ + this.effects &= ~(EF_ADDITIVE | EF_BLUE); + this.armorvalue = autocvar_g_monsters_armor_blockpercent; } -void M_Mage_Defend_Shield() -{SELFPARAM(); - self.effects |= (EF_ADDITIVE | EF_BLUE); - self.mage_shield_delay = time + (autocvar_g_monster_mage_shield_delay); - self.armorvalue = (autocvar_g_monster_mage_shield_blockpercent); - self.mage_shield_time = time + (autocvar_g_monster_mage_shield_time); - setanim(self, self.anim_shoot, true, true, true); - self.attack_finished_single[0] = time + 1; - self.anim_finished = time + 1; +void M_Mage_Defend_Shield(entity this) +{ + this.effects |= (EF_ADDITIVE | EF_BLUE); + this.mage_shield_delay = time + (autocvar_g_monster_mage_shield_delay); + this.armorvalue = (autocvar_g_monster_mage_shield_blockpercent); + this.mage_shield_time = time + (autocvar_g_monster_mage_shield_time); + setanim(this, this.anim_shoot, true, true, true); + this.attack_finished_single[0] = time + 1; + this.anim_finished = time + 1; } -float M_Mage_Attack(float attack_type, entity targ) -{SELFPARAM(); +bool M_Mage_Attack(int attack_type, entity actor, entity targ) +{ + .entity weaponentity = weaponentities[0]; switch(attack_type) { case MONSTER_ATTACK_MELEE: @@ -363,7 +369,8 @@ float M_Mage_Attack(float attack_type, entity targ) if(random() <= 0.7) { Weapon wep = WEP_MAGE_SPIKE; - wep.wr_think(wep, self, 0, 2); + + wep.wr_think(wep, actor, weaponentity, 2); return true; } @@ -371,26 +378,26 @@ float M_Mage_Attack(float attack_type, entity targ) } case MONSTER_ATTACK_RANGED: { - if(!self.mage_spike) + if(!actor.mage_spike) { if(random() <= 0.4) { OffhandWeapon off = OFFHAND_MAGE_TELEPORT; - off.offhand_think(off, self, true); + off.offhand_think(off, actor, true); return true; } else { - setanim(self, self.anim_shoot, true, true, true); - self.attack_finished_single[0] = time + (autocvar_g_monster_mage_attack_spike_delay); - self.anim_finished = time + 1; + setanim(actor, actor.anim_shoot, true, true, true); + actor.attack_finished_single[0] = time + (autocvar_g_monster_mage_attack_spike_delay); + actor.anim_finished = time + 1; Weapon wep = WEP_MAGE_SPIKE; - wep.wr_think(wep, self, 0, 1); + wep.wr_think(wep, actor, weaponentity, 1); return true; } } - if(self.mage_spike) + if(actor.mage_spike) return true; else return false; @@ -400,89 +407,95 @@ float M_Mage_Attack(float attack_type, entity targ) return false; } -spawnfunc(monster_mage) { Monster_Spawn(MON_MAGE.monsterid); } +spawnfunc(monster_mage) { Monster_Spawn(this, MON_MAGE.monsterid); } #endif // SVQC - #ifdef SVQC - METHOD(Mage, mr_think, bool(Monster thismon)) - { - SELFPARAM(); - entity head; - bool need_help = false; - - for(head = world; (head = findfloat(head, iscreature, true)); ) - if(head != self) - if(vlen(head.origin - self.origin) <= (autocvar_g_monster_mage_heal_range)) - if(M_Mage_Defend_Heal_Check(head)) - { - need_help = true; - break; - } +#ifdef SVQC +METHOD(Mage, mr_think, bool(Mage thismon, entity actor)) +{ + TC(Mage, thismon); + bool need_help = false; + + FOREACH_ENTITY_FLOAT(iscreature, true, + { + if(it != actor) + if(vdist(it.origin - actor.origin, <=, autocvar_g_monster_mage_heal_range)) + if(M_Mage_Defend_Heal_Check(actor, it)) + { + need_help = true; + break; + } + }); + + if(actor.health < (autocvar_g_monster_mage_heal_minhealth) || need_help) + if(time >= actor.attack_finished_single[0]) + if(random() < 0.5) + M_Mage_Defend_Heal(actor); + + if(time >= actor.mage_shield_time && actor.armorvalue) + M_Mage_Defend_Shield_Remove(actor); + + if(actor.enemy) + if(actor.health < actor.max_health) + if(time >= actor.mage_shield_delay) + if(random() < 0.5) + M_Mage_Defend_Shield(actor); + + return true; +} - if(self.health < (autocvar_g_monster_mage_heal_minhealth) || need_help) - if(time >= self.attack_finished_single[0]) - if(random() < 0.5) - M_Mage_Defend_Heal(); +METHOD(Mage, mr_pain, bool(Mage this, entity actor)) +{ + TC(Mage, this); + return true; +} - if(time >= self.mage_shield_time && self.armorvalue) - M_Mage_Defend_Shield_Remove(); +METHOD(Mage, mr_death, bool(Mage this, entity actor)) +{ + TC(Mage, this); + setanim(actor, actor.anim_die1, false, true, true); + return true; +} - if(self.enemy) - if(self.health < self.max_health) - if(time >= self.mage_shield_delay) - if(random() < 0.5) - M_Mage_Defend_Shield(); +#endif +#ifndef MENUQC +METHOD(Mage, mr_anim, bool(Mage this, entity actor)) +{ + TC(Mage, this); + vector none = '0 0 0'; + actor.anim_die1 = animfixfps(actor, '4 1 0.5', none); // 2 seconds + actor.anim_walk = animfixfps(actor, '1 1 1', none); + actor.anim_idle = animfixfps(actor, '0 1 1', none); + actor.anim_pain1 = animfixfps(actor, '3 1 2', none); // 0.5 seconds + actor.anim_shoot = animfixfps(actor, '2 1 5', none); // analyze models and set framerate + actor.anim_run = animfixfps(actor, '5 1 1', none); + return true; +} +#endif +#ifdef SVQC +.float speed; +spawnfunc(item_health_large); +METHOD(Mage, mr_setup, bool(Mage this, entity actor)) +{ + TC(Mage, this); + if(!actor.health) actor.health = (autocvar_g_monster_mage_health); + if(!actor.speed) { actor.speed = (autocvar_g_monster_mage_speed_walk); } + if(!actor.speed2) { actor.speed2 = (autocvar_g_monster_mage_speed_run); } + if(!actor.stopspeed) { actor.stopspeed = (autocvar_g_monster_mage_speed_stop); } + if(!actor.damageforcescale) { actor.damageforcescale = (autocvar_g_monster_mage_damageforcescale); } - return true; - } - METHOD(Mage, mr_pain, bool(Monster thismon)) - { - return true; - } - METHOD(Mage, mr_death, bool(Monster thismon)) - { - SELFPARAM(); - setanim(self, self.anim_die1, false, true, true); - return true; - } - #endif - #ifndef MENUQC - METHOD(Mage, mr_anim, bool(Monster thismon)) - { - SELFPARAM(); - vector none = '0 0 0'; - self.anim_die1 = animfixfps(self, '4 1 0.5', none); // 2 seconds - self.anim_walk = animfixfps(self, '1 1 1', none); - self.anim_idle = animfixfps(self, '0 1 1', none); - self.anim_pain1 = animfixfps(self, '3 1 2', none); // 0.5 seconds - self.anim_shoot = animfixfps(self, '2 1 5', none); // analyze models and set framerate - self.anim_run = animfixfps(self, '5 1 1', none); - - return true; - } - #endif - #ifdef SVQC - .float speed; - spawnfunc(item_health_large); - METHOD(Mage, mr_setup, bool(Monster thismon)) - { - SELFPARAM(); - if(!self.health) self.health = (autocvar_g_monster_mage_health); - if(!self.speed) { self.speed = (autocvar_g_monster_mage_speed_walk); } - if(!self.speed2) { self.speed2 = (autocvar_g_monster_mage_speed_run); } - if(!self.stopspeed) { self.stopspeed = (autocvar_g_monster_mage_speed_stop); } - if(!self.damageforcescale) { self.damageforcescale = (autocvar_g_monster_mage_damageforcescale); } + actor.monster_loot = spawnfunc_item_health_large; + actor.monster_attackfunc = M_Mage_Attack; - self.monster_loot = spawnfunc_item_health_large; - self.monster_attackfunc = M_Mage_Attack; + return true; +} - return true; - } - METHOD(Mage, mr_precache, bool(Monster thismon)) - { - return true; - } - #endif +METHOD(Mage, mr_precache, bool(Mage this)) +{ + TC(Mage, this); + return true; +} +#endif #endif