float autocvar_g_monster_mage_speed_run;
float autocvar_g_monster_mage_speed_walk;
+//For a new model, it will work wrong with old model, there are more animations for it. Probably, the unused animations will be used in the future
/*
const float mage_anim_idle = 0;
const float mage_anim_walk = 1;
-const float mage_anim_attack = 2;
-const float mage_anim_pain = 3;
-const float mage_anim_death = 4;
-const float mage_anim_run = 5;
+const float mage_anim_attack1 = 2;
+const float mage_anim_spawn = 3; // Or attack4
+const float mage_anim_attack2 = 4;
+const float mage_anim_attack3 = 5;
+const float mage_anim_pain = 6;
+const float mage_anim_pain = 7;
+const float mage_anim_pain = 8;
+const float mage_anim_death = 9;
+const float mage_anim_death2 = 10;
+const float mage_anim_run = 1;
*/
void M_Mage_Defend_Heal(entity this);
METHOD(Mage, mr_pain, float(Mage this, entity actor, float damage_take, entity attacker, float deathtype))
{
TC(Mage, this);
+ actor.pain_finished = time + 0.34;
+ setanim(actor, ((random() > 0.5) ? actor.anim_pain1 : actor.anim_pain2), true, true, false);
return damage_take;
}
METHOD(Mage, mr_death, bool(Mage this, entity actor))
{
TC(Mage, this);
- setanim(actor, actor.anim_die1, false, true, true);
+ setanim(actor, ((random() > 0.5) ? actor.anim_die1 : actor.anim_die2), false, true, true);
return true;
}
{
TC(Mage, this);
vector none = '0 0 0';
- actor.anim_die1 = animfixfps(actor, '4 1 0.5', none); // 2 seconds
+ actor.anim_die1 = animfixfps(actor, '9 1 0.5', none); // 2 seconds
+ actor.anim_die2 = animfixfps(actor, '10 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_spawn = animfixfps(actor, '3 1 2', none); // 0.5 seconds
+ actor.anim_pain1 = animfixfps(actor, '6 1 2', none); // 0.5 seconds
+ actor.anim_pain2 = animfixfps(actor, '7 1 2', none); // 0.5 seconds
+ //actor.anim_pain3 = animfixfps(actor, '8 1 2', none); // 0.5 seconds, removed to make it compilable
actor.anim_shoot = animfixfps(actor, '2 1 5', none); // analyze models and set framerate
- actor.anim_run = animfixfps(actor, '5 1 1', none);
+ actor.anim_run = animfixfps(actor, '1 1 1', none);
return true;
}
#endif
actor.monster_loot = ITEM_HealthBig;
actor.monster_attackfunc = M_Mage_Attack;
+ setanim(actor, actor.anim_spawn, false, true, true);
+ actor.spawn_time = actor.animstate_endtime;
+
return true;
}
#endif
float autocvar_g_monster_shambler_speed_run;
float autocvar_g_monster_shambler_speed_walk;
+//For a new model
/*
const float shambler_anim_stand = 0;
const float shambler_anim_walk = 1;
const float shambler_anim_run = 2;
-const float shambler_anim_smash = 3;
+const float shambler_anim_smash = 6;
+const float shambler_anim_smash2 = 5;
const float shambler_anim_swingr = 4;
-const float shambler_anim_swingl = 5;
-const float shambler_anim_magic = 6;
+const float shambler_anim_swingl = 3;
+const float shambler_anim_magic = 4;
const float shambler_anim_pain = 7;
-const float shambler_anim_death = 8;
+const float shambler_anim_pain2 = 8;
+const float shambler_anim_pain3 = 9;
+const float shambler_anim_pain4 = 10;
+const float shambler_anim_pain5 = 11;
+const float shambler_anim_spawn = 12;
+const float shambler_anim_death = 13;
+const float shambler_anim_death2 = 15;
+const float shambler_anim_death3 = 17;
*/
.float shambler_lastattack; // delay attacks separately
{
TC(Shambler, this);
actor.pain_finished = time + 0.5;
- setanim(actor, actor.anim_pain1, true, true, false);
+ setanim(actor, ((random() > 0.5) ? actor.anim_pain1 : actor.anim_pain2), true, true, false);
+ //setanim(actor, ((random() > 0.5) ? actor.anim_pain1 : actor.anim_pain2 : actor.anim_pain3 : actor.anim_pain4 : actor.anim_pain5), true, true, false);
return damage_take;
}
METHOD(Shambler, mr_death, bool(Shambler this, entity actor))
{
TC(Shambler, this);
- setanim(actor, actor.anim_die1, false, true, true);
+ setanim(actor, ((random() > 0.5) ? actor.anim_die1 : actor.anim_die2), false, true, true);
+ //setanim(actor, ((random() > 0.5) ? actor.anim_die1 : actor.anim_die2 : actor.anim_die3), false, true, true);
return true;
}
#endif
{
TC(Shambler, this);
vector none = '0 0 0';
- actor.anim_die1 = animfixfps(actor, '8 1 0.5', none); // 2 seconds
+ actor.anim_die1 = animfixfps(actor, '13 1 0.5', none); // 2 seconds
+ actor.anim_die2 = animfixfps(actor, '15 1 0.5', none); // 2 seconds
+ //actor.anim_die3 = animfixfps(actor, '17 1 0.5', none); // 2 seconds, brokes compiling
actor.anim_walk = animfixfps(actor, '1 1 1', none);
actor.anim_idle = animfixfps(actor, '0 1 1', none);
actor.anim_pain1 = animfixfps(actor, '7 1 2', none); // 0.5 seconds
- actor.anim_melee1 = animfixfps(actor, '3 1 5', none); // analyze models and set framerate
+ actor.anim_pain2 = animfixfps(actor, '8 1 2', none); // 0.5 seconds
+ //actor.anim_pain3 = animfixfps(actor, '9 1 2', none); // 0.5 seconds, brokes compiling
+ //actor.anim_pain4 = animfixfps(actor, '10 1 2', none); // 0.5 seconds, brokes compiling
+ //actor.anim_pain5 = animfixfps(actor, '11 1 2', none); // 0.5 seconds, brokes compiling
+ actor.anim_spawn = animfixfps(actor, '12 1 0.5', none); // 2 seconds, brokes compiling
+ actor.anim_melee1 = animfixfps(actor, '6 1 5', none); // analyze models and set framerate
actor.anim_melee2 = animfixfps(actor, '4 1 5', none); // analyze models and set framerate
- actor.anim_melee3 = animfixfps(actor, '5 1 5', none); // analyze models and set framerate
- actor.anim_shoot = animfixfps(actor, '6 1 5', none); // analyze models and set framerate
+ actor.anim_melee3 = animfixfps(actor, '3 1 5', none); // analyze models and set framerate
+ actor.anim_shoot = animfixfps(actor, '4 1 5', none); // analyze models and set framerate
actor.anim_run = animfixfps(actor, '2 1 1', none);
return true;
}
actor.monster_loot = ITEM_HealthMega;
actor.weapon = WEP_ELECTRO.m_id; // matches attacks better than WEP_VORTEX
- setanim(actor, actor.anim_shoot, false, true, true);
+ setanim(actor, actor.anim_spawn, false, true, true);
actor.spawn_time = actor.animstate_endtime;
StatusEffects_apply(STATUSEFFECT_SpawnShield, actor, actor.spawn_time, 0);
actor.monster_attackfunc = M_Shambler_Attack;
float autocvar_g_monster_spider_speed_run;
float autocvar_g_monster_spider_speed_walk;
+//For a new model
/*
-const float spider_anim_idle = 0;
-const float spider_anim_walk = 1;
-const float spider_anim_attack = 2;
-const float spider_anim_attack2 = 3;
+const float spider_anim_melee = 0;
+const float spider_anim_death = 1;
+const float spider_anim_death2 = 2;
+const float spider_anim_shoot1 = 3;
+const float spider_anim_ultrashoot = 4;
+const float spider_anim_idle = 5;
+const float spider_anim_spawn = 6;
+const float spider_anim_pain = 7;
+const float spider_anim_pain2 = 8;
+const float spider_anim_pain3 = 9;
+const float spider_anim_moveforward = 10;
+const float spider_anim_moveforwardright = 11;
+const float spider_anim_movebackright = 12;
+const float spider_anim_movebackward = 13;
+const float spider_anim_movebackleft = 14;
+const float spider_anim_moveleft = 15;
+const float spider_anim_moveforwardleft = 16;
+const float spider_anim_movebackleft = 17;
*/
void M_Spider_Attack_Web_Explode(entity this)
METHOD(Spider, mr_pain, float(Spider this, entity actor, float damage_take, entity attacker, float deathtype))
{
TC(Spider, this);
+ actor.pain_finished = time + 0.34;
+ setanim(actor, ((random() > 0.5) ? actor.anim_pain1 : actor.anim_pain2), true, true, false);
+ //setanim(actor, ((random() > 0.5) ? actor.anim_pain1 : actor.anim_pain2 : actor.anim_pain3), true, true, false);
return damage_take;
}
METHOD(Spider, mr_death, bool(Spider this, entity actor))
{
TC(Spider, this);
- setanim(actor, actor.anim_melee, false, true, true);
- actor.angles_x = 180;
+ setanim(actor, ((random() > 0.5) ? actor.anim_die1 : actor.anim_die2), false, true, true);
+ actor.angles_x = 0;
return true;
}
#endif
{
TC(Spider, this);
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);
+ actor.anim_walk = animfixfps(actor, '10 1 1', none);
+ actor.anim_die1 = animfixfps(actor, '1 1 1', none);
+ actor.anim_die2 = animfixfps(actor, '2 1 1', none);
+ actor.anim_pain1 = animfixfps(actor, '7 1 1', none);
+ //actor.anim_pain3 = animfixfps(actor, '8 1 1', none); //brokes compiling
+ actor.anim_pain2 = animfixfps(actor, '9 1 1', none);
+ actor.anim_idle = animfixfps(actor, '5 1 1', none);
+ actor.anim_spawn = animfixfps(actor, '6 1 1', none);
+ actor.anim_melee = animfixfps(actor, '0 1 5', none); // analyze models and set framerate
+ actor.anim_shoot = animfixfps(actor, '4 1 5', none); // analyze models and set framerate
+ actor.anim_run = animfixfps(actor, '10 1 1', none);
return true;
}
#endif
actor.monster_loot = ITEM_HealthMedium;
actor.monster_attackfunc = M_Spider_Attack;
+
+ setanim(actor, actor.anim_spawn, false, true, true);
+ actor.spawn_time = actor.animstate_endtime;
return true;
}
/*
const float wyvern_anim_hover = 0;
-const float wyvern_anim_fly = 1;
-const float wyvern_anim_magic = 2;
+const float wyvern_anim_flyrun = 1;
+const float wyvern_anim_fly = 2;
const float wyvern_anim_pain = 3;
-const float wyvern_anim_death = 4;
+const float wyvern_anim_pain2 = 4;
+const float wyvern_anim_melee = 5;
+const float wyvern_anim_magic = 6;
+const float wyvern_anim_flyfast = 7;
+const float wyvern_anim_death = 8;
*/
void M_Wyvern_Attack_Fireball_Explode(entity this)
{
TC(Wyvern, this);
actor.pain_finished = time + 0.5;
- setanim(actor, actor.anim_pain1, true, true, false);
+ setanim(actor, ((random() > 0.5) ? actor.anim_pain1 : actor.anim_pain2), true, true, false);
return damage_take;
}
{
TC(Wyvern, 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_die1 = animfixfps(actor, '8 1 0.5', none); // 2 seconds
+ actor.anim_walk = animfixfps(actor, '2 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, '1 1 1', none);
+ actor.anim_pain2 = animfixfps(actor, '4 1 2', none); // 0.5 seconds
+ actor.anim_shoot = animfixfps(actor, '6 1 5', none); // analyze models and set framerate
+ actor.anim_run = animfixfps(actor, '1 1 1', none); // or 7? They just look with the same process
return true;
}
#endif