]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix golem's smash attack
authorMario <mario@smbclan.net>
Tue, 24 Apr 2018 08:16:03 +0000 (18:16 +1000)
committerMario <mario@smbclan.net>
Tue, 24 Apr 2018 08:16:03 +0000 (18:16 +1000)
models/monsters/golem.dpm.framegroups
monsters.cfg
qcsrc/common/monsters/monster/golem.qc

index b5cdca3d5c9fc205c418351a587218f1b17d363c..c6fa58f42bc102f52adda107d3ff6cd2c90a3c03 100644 (file)
@@ -6,10 +6,10 @@ Used by DarkPlaces to simulate frame groups in DPM models.
 1 21 5 1 // golem idle
 22 61 30 1 // golem run
 83 21 30 1 // golem runangry
-104 36 30 0 // golem melee01
-140 36 30 0 // golem melee02
-176 61 30 0 // golem melee03
-237 61 30 0 // golem melee04
+104 36 30 1 // golem melee01
+140 36 30 1 // golem melee02
+176 61 30 1 // golem melee03
+237 61 30 1 // golem melee04
 298 21 30 0 // golem hit01
 319 21 30 0 // golem hit02
 340 21 30 0 // golem hit03
index 054bd8a0cb425f5cff5ec8d54b456255fcf14d47..000bb6a70eed80a6c45e5521f483f2b8ef5179d8 100644 (file)
@@ -77,7 +77,7 @@ set g_monster_golem_attack_lightning_radius_zap 250
 set g_monster_golem_attack_lightning_speed 1000
 set g_monster_golem_attack_lightning_speed_up 150
 set g_monster_golem_attack_smash_damage 50
-set g_monster_golem_attack_smash_range 0
+set g_monster_golem_attack_smash_range 200
 set g_monster_golem_damageforcescale 0.100000001
 set g_monster_golem_health 650
 set g_monster_golem_speed_run 320
index d49bfd4e51c202d994ec4e2f0cad610093d624d3..85a1716390718b0544a34d01334c23a2fbf07352 100644 (file)
@@ -175,10 +175,13 @@ bool M_Golem_Attack(int attack_type, entity actor, entity targ, .entity weaponen
                        if(IS_ONGROUND(actor))
                        if(randomness <= 0.5 && vdist(actor.enemy.origin - actor.origin, <=, autocvar_g_monster_golem_attack_smash_range))
                        {
-                               setanim(actor, actor.anim_melee2, true, true, false);
-                               Monster_Delay(actor, 1, 0.7, M_Golem_Attack_Smash);
-                               actor.attack_finished_single[0] = time + 1.1;
-                               actor.anim_finished = time + 1.1;
+                               setanim(actor, actor.anim_melee1, true, true, false);
+                               Monster_Delay(actor, 1, 1.1, M_Golem_Attack_Smash);
+                               if(actor.animstate_endtime > time)
+                                       actor.anim_finished = actor.animstate_endtime;
+                               else
+                                       actor.anim_finished = time + 1.2;
+                               actor.attack_finished_single[0] = actor.anim_finished + 0.2;
                                actor.state = MONSTER_ATTACK_MELEE; // kinda a melee attack
                                actor.golem_lastattack = time + 3 + random() * 1.5;
                                return true;
@@ -236,10 +239,11 @@ METHOD(Golem, mr_anim, bool(Golem this, entity actor))
     actor.anim_idle = animfixfps(actor, '0 1 1', none);
     actor.anim_walk = animfixfps(actor, '1 1 1', none);
     actor.anim_run = animfixfps(actor, '2 1 1', none);
-    actor.anim_melee1 = animfixfps(actor, '3 1 5', none); // analyze models and set framerate
+    //actor.anim_melee1 = animfixfps(actor, '3 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_melee4 = animfixfps(actor, '6 1 5', none); // analyze models and set framerate
+    actor.anim_melee1 = animfixfps(actor, '6 1 5', none); // analyze models and set framerate
     actor.anim_pain1 = animfixfps(actor, '7 1 2', none); // 0.5 seconds
     actor.anim_pain2 = animfixfps(actor, '8 1 2', none); // 0.5 seconds
     //actor.anim_pain3 = animfixfps(actor, '9 1 2', none); // 0.5 seconds
@@ -247,8 +251,9 @@ METHOD(Golem, mr_anim, bool(Golem this, entity actor))
     //actor.anim_pain5 = animfixfps(actor, '11 1 2', none); // 0.5 seconds
     //actor.anim_sight = animfixfps(actor, '12 1 5', none); // analyze models and set framerate
     actor.anim_die1 = animfixfps(actor, '13 1 0.5', none); // 2 seconds
-    actor.anim_die2 = animfixfps(actor, '14 1 0.5', none); // 2 seconds
-    //actor.anim_dead = animfixfps(actor, '15 1 0.5', none); // 2 seconds
+    //actor.anim_dead = animfixfps(actor, '14 1 0.5', none); // 2 seconds
+    actor.anim_die2 = animfixfps(actor, '15 1 0.5', none); // 2 seconds
+    // dead2 16
     //actor.anim_dieback = animfixfps(actor, '16 1 0.5', none); // 2 seconds
     //actor.anim_deadback = animfixfps(actor, '17 1 0.5', none); // 2 seconds
     //actor.anim_dead2 = animfixfps(actor, '18 1 0.5', none); // 2 seconds