X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fmonster%2Fspider.qc;h=512422d33b9c8227420106035d5b9e41991c3c9e;hb=2a19e375a2fdf01a5b0337f2029e7a46019ccc64;hp=89239941ee1d3dfc4c25d60e2f1cb93b21245415;hpb=692cb758fe8f25fa078bfd5885333ee031885600;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/monsters/monster/spider.qc b/qcsrc/common/monsters/monster/spider.qc index 89239941e..512422d33 100644 --- a/qcsrc/common/monsters/monster/spider.qc +++ b/qcsrc/common/monsters/monster/spider.qc @@ -214,53 +214,56 @@ bool M_Spider_Attack(int attack_type, entity actor, entity targ) spawnfunc(monster_spider) { Monster_Spawn(this, MON_SPIDER.monsterid); } #endif // SVQC - #ifdef SVQC - METHOD(Spider, mr_think, bool(Spider thismon, entity actor)) - { - return true; - } - METHOD(Spider, mr_pain, bool(Spider thismon, entity actor)) - { - return true; - } - METHOD(Spider, mr_death, bool(Spider thismon, entity actor)) - { - setanim(actor, actor.anim_melee, false, true, true); - actor.angles_x = 180; - return true; - } - #endif - #ifndef MENUQC - METHOD(Spider, mr_anim, bool(Spider thismon, entity actor)) - { - vector none = '0 0 0'; - actor.anim_walk = animfixfps(actor, '1 1 1', none); - actor.anim_idle = animfixfps(actor, '0 1 1', none); - actor.anim_melee = animfixfps(actor, '2 1 5', none); // analyze models and set framerate - actor.anim_shoot = animfixfps(actor, '3 1 5', none); // analyze models and set framerate - actor.anim_run = animfixfps(actor, '1 1 1', none); - return true; - } - #endif - #ifdef SVQC - spawnfunc(item_health_medium); - METHOD(Spider, mr_setup, bool(Spider thismon, entity actor)) - { - if(!actor.health) actor.health = (autocvar_g_monster_spider_health); - if(!actor.speed) { actor.speed = (autocvar_g_monster_spider_speed_walk); } - if(!actor.speed2) { actor.speed2 = (autocvar_g_monster_spider_speed_run); } - if(!actor.stopspeed) { actor.stopspeed = (autocvar_g_monster_spider_speed_stop); } - if(!actor.damageforcescale) { actor.damageforcescale = (autocvar_g_monster_spider_damageforcescale); } +#ifdef SVQC +METHOD(Spider, mr_think, bool(Spider thismon, entity actor)) +{ + return true; +} - actor.monster_loot = spawnfunc_item_health_medium; - actor.monster_attackfunc = M_Spider_Attack; +METHOD(Spider, mr_pain, bool(Spider thismon, entity actor)) +{ + return true; +} - return true; - } - METHOD(Spider, mr_precache, bool(Spider thismon)) - { - return true; - } - #endif +METHOD(Spider, mr_death, bool(Spider thismon, entity actor)) +{ + setanim(actor, actor.anim_melee, false, true, true); + actor.angles_x = 180; + return true; +} +#endif +#ifndef MENUQC +METHOD(Spider, mr_anim, bool(Spider thismon, entity actor)) +{ + vector none = '0 0 0'; + actor.anim_walk = animfixfps(actor, '1 1 1', none); + actor.anim_idle = animfixfps(actor, '0 1 1', none); + actor.anim_melee = animfixfps(actor, '2 1 5', none); // analyze models and set framerate + actor.anim_shoot = animfixfps(actor, '3 1 5', none); // analyze models and set framerate + actor.anim_run = animfixfps(actor, '1 1 1', none); + return true; +} +#endif +#ifdef SVQC +spawnfunc(item_health_medium); +METHOD(Spider, mr_setup, bool(Spider thismon, entity actor)) +{ + if(!actor.health) actor.health = (autocvar_g_monster_spider_health); + if(!actor.speed) { actor.speed = (autocvar_g_monster_spider_speed_walk); } + if(!actor.speed2) { actor.speed2 = (autocvar_g_monster_spider_speed_run); } + if(!actor.stopspeed) { actor.stopspeed = (autocvar_g_monster_spider_speed_stop); } + if(!actor.damageforcescale) { actor.damageforcescale = (autocvar_g_monster_spider_damageforcescale); } + + actor.monster_loot = spawnfunc_item_health_medium; + actor.monster_attackfunc = M_Spider_Attack; + + return true; +} + +METHOD(Spider, mr_precache, bool(Spider thismon)) +{ + return true; +} +#endif #endif