]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/monsters
authorMario <mario@smbclan.net>
Wed, 22 Nov 2017 10:32:38 +0000 (20:32 +1000)
committerMario <mario@smbclan.net>
Wed, 22 Nov 2017 10:32:38 +0000 (20:32 +1000)
# Conflicts:
# qcsrc/common/monsters/monster/shambler.qc

91 files changed:
models/monsters/dragon.dpm [new file with mode: 0644]
models/monsters/dragon.dpm.framegroups [new file with mode: 0644]
models/monsters/golem.dpm [new file with mode: 0644]
models/monsters/golem.dpm.framegroups [new file with mode: 0644]
models/monsters/mage.dpm [deleted file]
models/monsters/mage.dpm.framegroups [deleted file]
models/monsters/nanomage.dpm [new file with mode: 0644]
models/monsters/nanomage.dpm.framegroups [new file with mode: 0644]
models/monsters/shambler.mdl [deleted file]
models/monsters/shambler.mdl.framegroups [deleted file]
models/monsters/shambler.mdl_0.sounds [deleted file]
models/monsters/spider.dpm
models/monsters/spider.dpm.framegroups
models/monsters/troll.dpm [new file with mode: 0644]
models/monsters/troll.dpm.framegroups [new file with mode: 0644]
models/monsters/troll.dpm_0.sounds [new file with mode: 0644]
models/monsters/wizard.mdl [deleted file]
models/monsters/wizard.mdl.framegroups [deleted file]
monsters.cfg
qcsrc/client/weapons/projectile.qc
qcsrc/common/deathtypes/all.inc
qcsrc/common/models/all.inc
qcsrc/common/monsters/monster.qh
qcsrc/common/monsters/monster/_mod.inc
qcsrc/common/monsters/monster/_mod.qh
qcsrc/common/monsters/monster/golem.qc [new file with mode: 0644]
qcsrc/common/monsters/monster/golem.qh [new file with mode: 0644]
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/monster/mage.qh
qcsrc/common/monsters/monster/shambler.qc [deleted file]
qcsrc/common/monsters/monster/shambler.qh [deleted file]
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/spider.qh
qcsrc/common/monsters/monster/troll.qc [new file with mode: 0644]
qcsrc/common/monsters/monster/troll.qh [new file with mode: 0644]
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/monsters/monster/wyvern.qh
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/notifications/all.inc
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/weapons/projectiles.qh
qcsrc/menu/xonotic/dialog_monstertools.qc
qcsrc/menu/xonotic/util.qc
scripts/golem.shader [new file with mode: 0644]
scripts/nanomage.shader [new file with mode: 0644]
scripts/spider.shader [new file with mode: 0644]
sound/monsters/troll/death1.wav [new file with mode: 0644]
sound/monsters/troll/death2.wav [new file with mode: 0644]
sound/monsters/troll/death3.wav [new file with mode: 0644]
sound/monsters/troll/idle1.wav [new file with mode: 0644]
sound/monsters/troll/idle2.wav [new file with mode: 0644]
sound/monsters/troll/melee.wav [new file with mode: 0644]
sound/monsters/troll/pain1.wav [new file with mode: 0644]
sound/monsters/troll/pain2.wav [new file with mode: 0644]
sound/monsters/troll/sight.wav [new file with mode: 0644]
textures/forest-monster-skin1.jpg [new file with mode: 0644]
textures/forest-monster-skin1_norm.jpg [new file with mode: 0644]
textures/forest-monster-skin1_pants.jpg [new file with mode: 0644]
textures/forest-monster-skin1_spec.jpg [new file with mode: 0644]
textures/glow_reflect.tga [new file with mode: 0644]
textures/golem.tga [new file with mode: 0644]
textures/golem_gloss.tga [new file with mode: 0644]
textures/golem_glow.tga [new file with mode: 0644]
textures/golem_norm.tga [new file with mode: 0644]
textures/golem_reflect.tga [new file with mode: 0644]
textures/golem_shirt.tga [new file with mode: 0644]
textures/mage.tga [deleted file]
textures/mage_glow.tga [deleted file]
textures/mage_pants.tga [deleted file]
textures/monsters/Dragon.tga [new file with mode: 0644]
textures/monsters/Dragon_Norm.tga [new file with mode: 0644]
textures/monsters/Dragon_Shirt.tga [new file with mode: 0644]
textures/monsters/Dragon_Spec.tga [new file with mode: 0644]
textures/nanomage.tga [new file with mode: 0644]
textures/nanomage_gloss.tga [new file with mode: 0644]
textures/nanomage_glow.tga [new file with mode: 0644]
textures/nanomage_norm.tga [new file with mode: 0644]
textures/nanomage_reflect.tga [new file with mode: 0644]
textures/nanomage_shirt.tga [new file with mode: 0644]
textures/spider.tga [new file with mode: 0644]
textures/spider_gloss.tga [new file with mode: 0644]
textures/spider_glow.tga [new file with mode: 0644]
textures/spider_norm.tga [new file with mode: 0644]
textures/spider_reflect.tga [new file with mode: 0644]
textures/spider_shirt.tga [new file with mode: 0644]
textures/spidertex.tga [deleted file]
textures/spidertex_glow.tga [deleted file]
textures/spidertex_pants.tga [deleted file]
textures/tree.tga [new file with mode: 0644]
textures/tree_norm.tga [new file with mode: 0644]
textures/tree_spec.tga [new file with mode: 0644]

diff --git a/models/monsters/dragon.dpm b/models/monsters/dragon.dpm
new file mode 100644 (file)
index 0000000..bbab196
Binary files /dev/null and b/models/monsters/dragon.dpm differ
diff --git a/models/monsters/dragon.dpm.framegroups b/models/monsters/dragon.dpm.framegroups
new file mode 100644 (file)
index 0000000..016c89e
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+Generated framegroups file for Dragon
+Used by DarkPlaces to simulate frame groups in DPM models.
+*/
+
+1 101 30 1 // dragon idle
+102 101 30 1 // dragon glide
+203 101 30 1 // dragon fly
+304 26 30 0 // dragon pain1
+330 26 30 0 // dragon pain2
+356 51 30 0 // dragon melee
+407 51 30 0 // dragon fireball
+458 101 30 1 // dragon dying
+559 26 30 0 // dragon dead
diff --git a/models/monsters/golem.dpm b/models/monsters/golem.dpm
new file mode 100644 (file)
index 0000000..8a3bf37
Binary files /dev/null and b/models/monsters/golem.dpm differ
diff --git a/models/monsters/golem.dpm.framegroups b/models/monsters/golem.dpm.framegroups
new file mode 100644 (file)
index 0000000..b5cdca3
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+Generated framegroups file for golem
+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
+298 21 30 0 // golem hit01
+319 21 30 0 // golem hit02
+340 21 30 0 // golem hit03
+361 21 30 0 // golem hit04
+382 61 30 0 // golem hithard
+443 101 30 0 // golem enrage
+544 61 30 0 // golem death01
+605 2 30 0 // golem dead01
+607 36 30 0 // golem death02
+643 2 30 0 // golem dead01
+645 46 30 0 // golem deathback
+691 2 30 0 // golem deadback
+693 2 30 0 // golem dead01
+695 2 30 0 // golem dead01
+697 2 30 0 // golem dead01
+699 2 30 0 // golem dead01
+701 2 30 0 // golem dead01
diff --git a/models/monsters/mage.dpm b/models/monsters/mage.dpm
deleted file mode 100644 (file)
index 2e50fb5..0000000
Binary files a/models/monsters/mage.dpm and /dev/null differ
diff --git a/models/monsters/mage.dpm.framegroups b/models/monsters/mage.dpm.framegroups
deleted file mode 100644 (file)
index 4a72c65..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
-Generated framegroups file for mage
-Used by DarkPlaces to simulate frame groups in DPM models.
-*/
-
-1 31 30 1 // mage idle
-32 31 30 1 // mage walk
-63 16 30 1 // mage attack
-79 16 30 1 // mage hit
-95 31 30 0 // mage die
-126 31 60 1 // mage walk
diff --git a/models/monsters/nanomage.dpm b/models/monsters/nanomage.dpm
new file mode 100644 (file)
index 0000000..b7c44dd
Binary files /dev/null and b/models/monsters/nanomage.dpm differ
diff --git a/models/monsters/nanomage.dpm.framegroups b/models/monsters/nanomage.dpm.framegroups
new file mode 100644 (file)
index 0000000..9042da1
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+Generated framegroups file for nanomage
+Used by DarkPlaces to simulate frame groups in DPM models.
+*/
+
+1 61 12 1 // nanomage idle
+62 9 10 1 // nanomage run
+71 71 30 0 // nanomage attack01
+142 43 30 0 // nanomage attack02
+185 61 30 0 // nanomage attack03
+246 101 30 0 // nanomage attack04
+347 11 30 0 // nanomage pain01
+358 16 30 0 // nanomage pain02
+374 31 30 0 // nanomage pain03
+405 86 30 0 // nanomage death01
+491 56 30 0 // nanomage death02
+547 2 1 0 // nanomage dead01
+549 2 1 0 // nanomage dead02
diff --git a/models/monsters/shambler.mdl b/models/monsters/shambler.mdl
deleted file mode 100644 (file)
index 2e23dfa..0000000
Binary files a/models/monsters/shambler.mdl and /dev/null differ
diff --git a/models/monsters/shambler.mdl.framegroups b/models/monsters/shambler.mdl.framegroups
deleted file mode 100644 (file)
index b003d56..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1 16 10 1 // shambler stand\r18 11 10 1 // shambler walk\r31 5 10 1 // shambler run\r37 11 10 1 // shambler smash\r49 8 10 1 // shambler swing right\r58 8 10 1 // shambler swing left\r67 11 10 1 // shambler magic\r79 5 10 0 // shambler pain\r85 10 10 0 // shambler death
\ No newline at end of file
diff --git a/models/monsters/shambler.mdl_0.sounds b/models/monsters/shambler.mdl_0.sounds
deleted file mode 100644 (file)
index 7e16968..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-//TAG: shambler
-//death sound/monsters/shambler/death 0
-sight sound/monsters/shambler/sight 0
-//ranged sound/monsters/shambler/ranged 0
-//melee sound/monsters/shambler/melee 0
-//pain sound/monsters/shambler/pain 0
-//spawn sound/monsters/shambler/spawn 0
-idle sound/monsters/shambler/idle 2
index d0bc9ce5f27497de9dc3b1b4dfb9a04ea0e2daa6..b1e8d11e514e003e9b97f815785cd1603c6def11 100644 (file)
Binary files a/models/monsters/spider.dpm and b/models/monsters/spider.dpm differ
index 039a7c3caf466aa2be7e25d36106fec9329c4cd6..73d92e01fc664b399d6a59e613fee4d1533e89a0 100644 (file)
@@ -3,7 +3,21 @@ Generated framegroups file for spider
 Used by DarkPlaces to simulate frame groups in DPM models.
 */
 
-1 60 60 1 // spider idle
-61 41 120 1 // spider walk
-102 24 60 1 // spider attack
-125 10 60 1 // spider attack2
\ No newline at end of file
+1 51 30 0 // spider spiderbite
+52 51 30 0 // spider spiderdeath01
+103 51 30 0 // spider spiderdeath02
+154 11 30 0 // spider spiderfire01
+165 31 30 0 // spider spiderfire02
+196 51 5 1 // spider spideridle
+247 51 30 0 // spider spiderintimidate
+298 11 25 0 // spider spiderpain01
+309 11 25 0 // spider spiderpain02
+320 11 15 0 // spider spiderpain03
+331 101 30 1 // spider spiderwalkforward
+432 101 30 1 // spider spiderwalkforwardright
+533 101 30 1 // spider spiderwalkright
+634 101 30 1 // spider spiderwalkbackright
+735 101 30 1 // spider spiderwalkback
+836 101 30 1 // spider spiderwalkbackleft
+937 101 30 1 // spider spiderwalkleft
+1038 101 30 1 // spider spiderwalkforwardleft
diff --git a/models/monsters/troll.dpm b/models/monsters/troll.dpm
new file mode 100644 (file)
index 0000000..53bd7ac
Binary files /dev/null and b/models/monsters/troll.dpm differ
diff --git a/models/monsters/troll.dpm.framegroups b/models/monsters/troll.dpm.framegroups
new file mode 100644 (file)
index 0000000..90b5819
--- /dev/null
@@ -0,0 +1,11 @@
+/*
+Generated framegroups file for troll
+Used by DarkPlaces to simulate frame groups in DPM models.
+*/
+
+1 38 30 1 // troll attack
+39 63 30 1 // troll melee_hold
+102 51 30 1 // troll walk
+153 45 30 0 // troll death
+198 2 30 0 // troll dead
+102 51 60 1 // troll run
diff --git a/models/monsters/troll.dpm_0.sounds b/models/monsters/troll.dpm_0.sounds
new file mode 100644 (file)
index 0000000..5749216
--- /dev/null
@@ -0,0 +1,8 @@
+//TAG: troll
+death sound/monsters/troll/death 0
+sight sound/monsters/troll/sight 0
+//ranged sound/monsters/troll/ranged 0
+melee sound/monsters/troll/melee 0
+pain sound/monsters/troll/pain 2
+//spawn sound/monsters/troll/spawn 0
+idle sound/monsters/troll/idle 2
diff --git a/models/monsters/wizard.mdl b/models/monsters/wizard.mdl
deleted file mode 100644 (file)
index b130ba0..0000000
Binary files a/models/monsters/wizard.mdl and /dev/null differ
diff --git a/models/monsters/wizard.mdl.framegroups b/models/monsters/wizard.mdl.framegroups
deleted file mode 100644 (file)
index c51109a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1 14 10 1 // wizard hover\r16 13 10 1 // wizard fly\r30 12 10 1 // wizard magic attack\r43 3 10 0 // wizard pain\r47 7 10 0 // wizard death
\ No newline at end of file
index ac6039041f5f3e98f492f8263ce48b6a490b901e..cafefbed7963014243d1b07ab3085b436968cdef 100644 (file)
@@ -68,21 +68,21 @@ set g_monster_wyvern_speed_stop 300
 set g_monster_wyvern_speed_walk 120
 // }}}
 // {{{ #5: Shambler
-set g_monster_shambler_attack_claw_damage 60
-set g_monster_shambler_attack_lightning_damage 25
-set g_monster_shambler_attack_lightning_damage_zap 15
-set g_monster_shambler_attack_lightning_force 100
-set g_monster_shambler_attack_lightning_radius 50
-set g_monster_shambler_attack_lightning_radius_zap 250
-set g_monster_shambler_attack_lightning_speed 1000
-set g_monster_shambler_attack_lightning_speed_up 150
-set g_monster_shambler_attack_smash_damage 50
-set g_monster_shambler_attack_smash_range 0
-set g_monster_shambler_damageforcescale 0.100000001
-set g_monster_shambler_health 650
-set g_monster_shambler_speed_run 320
-set g_monster_shambler_speed_stop 300
-set g_monster_shambler_speed_walk 150
+set g_monster_golem_attack_claw_damage 60
+set g_monster_golem_attack_lightning_damage 25
+set g_monster_golem_attack_lightning_damage_zap 15
+set g_monster_golem_attack_lightning_force 100
+set g_monster_golem_attack_lightning_radius 50
+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_damageforcescale 0.100000001
+set g_monster_golem_health 650
+set g_monster_golem_speed_run 320
+set g_monster_golem_speed_stop 300
+set g_monster_golem_speed_walk 150
 // }}}
 
 // {{{ Misc
index 3d2d32d9af16bff4eeb0c6ca89d1e7951c71e1c5..09a8e5cb1293cbc55dc805c19ad6fba568d41795 100644 (file)
@@ -326,7 +326,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                        HANDLE(SEEKER)             this.traileffect = EFFECT_SEEKER_TRAIL.m_id; break;
 
                        HANDLE(MAGE_SPIKE)         this.traileffect = EFFECT_TR_VORESPIKE.m_id; break;
-                       HANDLE(SHAMBLER_LIGHTNING) this.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break;
+                       HANDLE(GOLEM_LIGHTNING) this.traileffect = EFFECT_TR_NEXUIZPLASMA.m_id; break;
 
                        HANDLE(RAPTORBOMB)         this.gravity = 1; this.avelocity = '0 0 180'; this.traileffect = EFFECT_Null.m_id; break;
                        HANDLE(RAPTORBOMBLET)      this.gravity = 1; this.avelocity = '0 0 180'; this.traileffect = EFFECT_Null.m_id; break;
@@ -388,7 +388,7 @@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool isnew)
                                this.bouncefactor = WEP_CVAR(mortar, bouncefactor);
                                this.bouncestop = WEP_CVAR(mortar, bouncestop);
                                break;
-                       case PROJECTILE_SHAMBLER_LIGHTNING:
+                       case PROJECTILE_GOLEM_LIGHTNING:
                                this.mins = '-8 -8 -8';
                                this.maxs = '8 8 8';
                                this.scale = 2.5;
index c11e5fedf0091dad5db74ea5772f3eed14f47c5e..aefb3e0653e273332fc9ae4989d56ac01c14ceb8 100644 (file)
@@ -12,9 +12,9 @@ REGISTER_DEATHTYPE(KILL,                    DEATH_SELF_SUICIDE,             NULL
 REGISTER_DEATHTYPE(LAVA,                    DEATH_SELF_LAVA,                DEATH_MURDER_LAVA,              "")
 REGISTER_DEATHTYPE(MIRRORDAMAGE,            DEATH_SELF_BETRAYAL,            NULL,                           "")
 REGISTER_DEATHTYPE(MONSTER_MAGE,            DEATH_SELF_MON_MAGE,            DEATH_MURDER_MONSTER,           "monster")
-REGISTER_DEATHTYPE(MONSTER_SHAMBLER_CLAW,   DEATH_SELF_MON_SHAMBLER_CLAW,   DEATH_MURDER_MONSTER,           "monster")
-REGISTER_DEATHTYPE(MONSTER_SHAMBLER_SMASH,  DEATH_SELF_MON_SHAMBLER_SMASH,  DEATH_MURDER_MONSTER,           "monster")
-REGISTER_DEATHTYPE(MONSTER_SHAMBLER_ZAP,    DEATH_SELF_MON_SHAMBLER_ZAP,    DEATH_MURDER_MONSTER,           "monster")
+REGISTER_DEATHTYPE(MONSTER_GOLEM_CLAW,         DEATH_SELF_MON_GOLEM_CLAW,      DEATH_MURDER_MONSTER,           "monster")
+REGISTER_DEATHTYPE(MONSTER_GOLEM_SMASH,        DEATH_SELF_MON_GOLEM_SMASH,     DEATH_MURDER_MONSTER,           "monster")
+REGISTER_DEATHTYPE(MONSTER_GOLEM_ZAP,          DEATH_SELF_MON_GOLEM_ZAP,       DEATH_MURDER_MONSTER,           "monster")
 REGISTER_DEATHTYPE(MONSTER_SPIDER,          DEATH_SELF_MON_SPIDER,          DEATH_MURDER_MONSTER,           "monster")
 REGISTER_DEATHTYPE(MONSTER_WYVERN,          DEATH_SELF_MON_WYVERN,          DEATH_MURDER_MONSTER,           "monster")
 REGISTER_DEATHTYPE(MONSTER_ZOMBIE_JUMP,     DEATH_SELF_MON_ZOMBIE_JUMP,     DEATH_MURDER_MONSTER,           "monster")
index eb95d7c28260d2a81ad306a1a37b00c97b4802ca..cfe7a010fe9ebbbf44b2181fbdf5e1aed5998777 100644 (file)
@@ -104,7 +104,7 @@ MODEL(PROJECTILE_FLAC,                  "models/hagarmissile.mdl");
 MODEL(PROJECTILE_SEEKER,                "models/tagrocket.md3");
 
 MODEL(PROJECTILE_MAGE_SPIKE,            "models/ebomb.mdl");
-MODEL(PROJECTILE_SHAMBLER_LIGHTNING,    "models/ebomb.mdl");
+MODEL(PROJECTILE_GOLEM_LIGHTNING,      "models/ebomb.mdl");
 
 MODEL(PROJECTILE_RAPTORBOMB,            "models/vehicles/clusterbomb.md3");
 MODEL(PROJECTILE_RAPTORBOMBLET,         "models/vehicles/bomblet.md3");
index aba9c9aa9b66713607aa3f2c4d02412744b82e51..632d9b65ded53312e87ed2085bdc9c769193ed57 100644 (file)
@@ -4,7 +4,7 @@
 const int MONSTER_RESPAWN_DEATHPOINT = BIT(4); // re-spawn where we died
 const int MONSTER_TYPE_FLY = BIT(5);
 const int MONSTER_TYPE_SWIM = BIT(6);
-const int MONSTER_SIZE_BROKEN = BIT(7); // TODO: remove when bad models are replaced
+// bit 7 now unused
 const int MON_FLAG_SUPERMONSTER = BIT(8); // incredibly powerful monster
 const int MON_FLAG_RANGED = BIT(9); // monster shoots projectiles
 const int MON_FLAG_MELEE = BIT(10);
index 23e649ab875810fd2cee74738d10a18c2146d5ed..796e8d4bd079f0e747215a486578d73c0a02e108 100644 (file)
@@ -1,6 +1,7 @@
 // generated file; do not modify
+#include <common/monsters/monster/golem.qc>
 #include <common/monsters/monster/mage.qc>
-#include <common/monsters/monster/shambler.qc>
 #include <common/monsters/monster/spider.qc>
+#include <common/monsters/monster/troll.qc>
 #include <common/monsters/monster/wyvern.qc>
 #include <common/monsters/monster/zombie.qc>
index a1c048d0f4c9fdbb1bfd8ca1aabe86f9fd136904..07cb2e48c9735046579d0516fc34cadd46fe6f9b 100644 (file)
@@ -1,6 +1,7 @@
 // generated file; do not modify
+#include <common/monsters/monster/golem.qh>
 #include <common/monsters/monster/mage.qh>
-#include <common/monsters/monster/shambler.qh>
 #include <common/monsters/monster/spider.qh>
+#include <common/monsters/monster/troll.qh>
 #include <common/monsters/monster/wyvern.qh>
 #include <common/monsters/monster/zombie.qh>
diff --git a/qcsrc/common/monsters/monster/golem.qc b/qcsrc/common/monsters/monster/golem.qc
new file mode 100644 (file)
index 0000000..5b0df4a
--- /dev/null
@@ -0,0 +1,282 @@
+#include "golem.qh"
+
+#ifdef SVQC
+float autocvar_g_monster_golem_health;
+float autocvar_g_monster_golem_damageforcescale = 0.1;
+float autocvar_g_monster_golem_attack_smash_damage;
+float autocvar_g_monster_golem_attack_smash_range;
+float autocvar_g_monster_golem_attack_claw_damage;
+float autocvar_g_monster_golem_attack_lightning_damage;
+float autocvar_g_monster_golem_attack_lightning_damage_zap = 15;
+float autocvar_g_monster_golem_attack_lightning_force;
+float autocvar_g_monster_golem_attack_lightning_radius;
+float autocvar_g_monster_golem_attack_lightning_radius_zap;
+float autocvar_g_monster_golem_attack_lightning_speed;
+float autocvar_g_monster_golem_attack_lightning_speed_up;
+float autocvar_g_monster_golem_speed_stop;
+float autocvar_g_monster_golem_speed_run;
+float autocvar_g_monster_golem_speed_walk;
+
+/*
+const float golem_anim_stand           = 0;
+const float golem_anim_walk            = 1;
+const float golem_anim_run             = 2;
+const float golem_anim_smash           = 3;
+const float golem_anim_swingr  = 4;
+const float golem_anim_swingl  = 5;
+const float golem_anim_magic           = 6;
+const float golem_anim_pain            = 7;
+const float golem_anim_death           = 8;
+*/
+
+.float golem_lastattack; // delay attacks separately
+
+void M_Golem_Attack_Smash(entity this)
+{
+       makevectors(this.angles);
+       Send_Effect(EFFECT_EXPLOSION_MEDIUM, (this.origin + (v_forward * 150)) - ('0 0 1' * this.maxs.z), '0 0 0', 1);
+       sound(this, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
+
+       // RadiusDamage does NOT support custom starting location, which means we must use this hack...
+
+       tracebox(this.origin + v_forward * 50, this.mins * 0.5, this.maxs * 0.5, this.origin + v_forward * autocvar_g_monster_golem_attack_smash_range, MOVE_NORMAL, this);
+
+       if(trace_ent.takedamage)
+               Damage(trace_ent, this, this, (autocvar_g_monster_golem_attack_smash_damage) * MONSTER_SKILLMOD(this), DEATH_MONSTER_GOLEM_SMASH.m_id, trace_ent.origin, normalize(trace_ent.origin - this.origin));
+}
+
+void M_Golem_Attack_Swing(entity this)
+{
+       Monster_Attack_Melee(this, this.enemy, (autocvar_g_monster_golem_attack_claw_damage), ((random() >= 0.5) ? this.anim_melee2 : this.anim_melee3), this.attack_range, 0.8, DEATH_MONSTER_GOLEM_CLAW.m_id, true);
+}
+
+void M_Golem_Attack_Lightning_Explode(entity this, entity directhitentity)
+{
+       sound(this, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_NORM);
+       Send_Effect(EFFECT_ELECTRO_IMPACT, this.origin, '0 0 0', 1);
+
+       this.event_damage = func_null;
+       this.takedamage = DAMAGE_NO;
+       set_movetype(this, MOVETYPE_NONE);
+       this.velocity = '0 0 0';
+
+       if(this.move_movetype == MOVETYPE_NONE)
+               this.velocity = this.oldvelocity;
+
+       RadiusDamage (this, this.realowner, (autocvar_g_monster_golem_attack_lightning_damage), (autocvar_g_monster_golem_attack_lightning_damage), (autocvar_g_monster_golem_attack_lightning_radius),
+                                       NULL, NULL, (autocvar_g_monster_golem_attack_lightning_force), this.projectiledeathtype, directhitentity);
+
+       FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_monster_golem_attack_lightning_radius_zap, it != this.realowner && it.takedamage,
+       {
+               te_csqc_lightningarc(this.origin, it.origin);
+               Damage(it, this, this.realowner, (autocvar_g_monster_golem_attack_lightning_damage_zap) * MONSTER_SKILLMOD(this), DEATH_MONSTER_GOLEM_ZAP.m_id, it.origin, '0 0 0');
+       });
+
+       setthink(this, SUB_Remove);
+       this.nextthink = time + 0.2;
+}
+
+void M_Golem_Attack_Lightning_Explode_use(entity this, entity actor, entity trigger)
+{
+       M_Golem_Attack_Lightning_Explode(this, trigger);
+}
+
+void M_Golem_Attack_Lightning_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
+{
+       if (this.health <= 0)
+               return;
+
+       if (!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
+               return; // g_projectiles_damage says to halt
+
+       this.health = this.health - damage;
+
+       if (this.health <= 0)
+               W_PrepareExplosionByDamage(this, attacker, adaptor_think2use);
+}
+
+void M_Golem_Attack_Lightning_Touch(entity this, entity toucher)
+{
+       PROJECTILE_TOUCH(this, toucher);
+
+       this.use(this, NULL, toucher);
+}
+
+void M_Golem_Attack_Lightning_Think(entity this)
+{
+       this.nextthink = time;
+       if (time > this.cnt)
+       {
+               M_Golem_Attack_Lightning_Explode(this, NULL);
+               return;
+       }
+}
+
+void M_Golem_Attack_Lightning(entity this)
+{
+       entity gren;
+
+       monster_makevectors(this, this.enemy);
+
+       gren = new(grenade);
+       gren.owner = gren.realowner = this;
+       gren.bot_dodge = true;
+       gren.bot_dodgerating = (autocvar_g_monster_golem_attack_lightning_damage);
+       set_movetype(gren, MOVETYPE_BOUNCE);
+       PROJECTILE_MAKETRIGGER(gren);
+       gren.projectiledeathtype = DEATH_MONSTER_GOLEM_ZAP.m_id;
+       setorigin(gren, CENTER_OR_VIEWOFS(this));
+       setsize(gren, '-8 -8 -8', '8 8 8');
+       gren.scale = 2.5;
+
+       gren.cnt = time + 5;
+       gren.nextthink = time;
+       setthink(gren, M_Golem_Attack_Lightning_Think);
+       gren.use = M_Golem_Attack_Lightning_Explode_use;
+       settouch(gren, M_Golem_Attack_Lightning_Touch);
+
+       gren.takedamage = DAMAGE_YES;
+       gren.health = 50;
+       gren.damageforcescale = 0;
+       gren.event_damage = M_Golem_Attack_Lightning_Damage;
+       gren.damagedbycontents = true;
+       IL_PUSH(g_damagedbycontents, gren);
+       gren.missile_flags = MIF_SPLASH | MIF_ARC;
+       W_SetupProjVelocity_Explicit(gren, v_forward, v_up, (autocvar_g_monster_golem_attack_lightning_speed), (autocvar_g_monster_golem_attack_lightning_speed_up), 0, 0, false);
+
+       gren.angles = vectoangles (gren.velocity);
+       gren.flags = FL_PROJECTILE;
+       IL_PUSH(g_projectiles, gren);
+       IL_PUSH(g_bot_dodge, gren);
+
+       CSQCProjectile(gren, true, PROJECTILE_GOLEM_LIGHTNING, true);
+}
+
+.int state;
+
+bool M_Golem_Attack(int attack_type, entity actor, entity targ, .entity weaponentity)
+{
+       switch(attack_type)
+       {
+               case MONSTER_ATTACK_MELEE:
+               {
+                       int swing_cnt = bound(1, floor(random() * 4), 3);
+                       Monster_Delay(actor, swing_cnt, 0.5, M_Golem_Attack_Swing);
+                       actor.anim_finished = actor.attack_finished_single[0] = time + (0.5 * swing_cnt); // set this for the delay
+                       return true;
+               }
+               case MONSTER_ATTACK_RANGED:
+               {
+                       float randomness = random();
+
+                       if(time >= actor.golem_lastattack) // golem doesn't attack much
+                       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;
+                               actor.state = MONSTER_ATTACK_MELEE; // kinda a melee attack
+                               actor.golem_lastattack = time + 3 + random() * 1.5;
+                               return true;
+                       }
+                       else if(randomness <= 0.1 && vdist(actor.enemy.origin - actor.origin, >=, autocvar_g_monster_golem_attack_smash_range * 1.5)) // small chance, don't want this spammed
+                       {
+                               setanim(actor, actor.anim_shoot, true, true, false);
+                               actor.state = MONSTER_ATTACK_MELEE; // maybe we should rename this to something more general
+                               actor.attack_finished_single[0] = time + 1.1;
+                               actor.anim_finished = 1.1;
+                               actor.golem_lastattack = time + 3 + random() * 1.5;
+                               Monster_Delay(actor, 1, 0.6, M_Golem_Attack_Lightning);
+                               return true;
+                       }
+
+                       return false;
+               }
+       }
+
+       return false;
+}
+
+spawnfunc(monster_golem) { Monster_Spawn(this, true, MON_GOLEM.monsterid); }
+// compatibility
+spawnfunc(monster_shambler) { spawnfunc_monster_golem(this); }
+#endif // SVQC
+
+#ifdef SVQC
+METHOD(Golem, mr_think, bool(Golem this, entity actor))
+{
+    TC(Golem, this);
+    return true;
+}
+
+METHOD(Golem, mr_pain, float(Golem this, entity actor, float damage_take, entity attacker, float deathtype))
+{
+    TC(Golem, this);
+    actor.pain_finished = time + 0.5;
+    setanim(actor, actor.anim_pain1, true, true, false);
+    return damage_take;
+}
+
+METHOD(Golem, mr_death, bool(Golem this, entity actor))
+{
+    TC(Golem, this);
+    setanim(actor, actor.anim_die1, false, true, true);
+    return true;
+}
+#endif
+#ifdef GAMEQC
+METHOD(Golem, mr_anim, bool(Golem this, entity actor))
+{
+    TC(Golem, this);
+    vector none = '0 0 0';
+    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_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_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
+    //actor.anim_pain4 = animfixfps(actor, '10 1 2', none); // 0.5 seconds
+    //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_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
+    //actor.anim_dead3 = animfixfps(actor, '19 1 0.5', none); // 2 seconds
+    //actor.anim_dead4 = animfixfps(actor, '20 1 0.5', none); // 2 seconds
+    //actor.anim_dead5 = animfixfps(actor, '21 1 0.5', none); // 2 seconds
+    //actor.anim_dead6 = animfixfps(actor, '22 1 0.5', none); // 2 seconds
+    return true;
+}
+#endif
+#ifdef SVQC
+.float animstate_endtime;
+METHOD(Golem, mr_setup, bool(Golem this, entity actor))
+{
+    TC(Golem, this);
+    if(!actor.health) actor.health = (autocvar_g_monster_golem_health);
+    if(!actor.attack_range) actor.attack_range = 150;
+    if(!actor.speed) { actor.speed = (autocvar_g_monster_golem_speed_walk); }
+    if(!actor.speed2) { actor.speed2 = (autocvar_g_monster_golem_speed_run); }
+    if(!actor.stopspeed) { actor.stopspeed = (autocvar_g_monster_golem_speed_stop); }
+    if(!actor.damageforcescale) { actor.damageforcescale = (autocvar_g_monster_golem_damageforcescale); }
+
+    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);
+    actor.spawn_time = actor.animstate_endtime;
+    actor.spawnshieldtime = actor.spawn_time;
+    actor.monster_attackfunc = M_Golem_Attack;
+
+    return true;
+}
+#endif
diff --git a/qcsrc/common/monsters/monster/golem.qh b/qcsrc/common/monsters/monster/golem.qh
new file mode 100644 (file)
index 0000000..8cebd86
--- /dev/null
@@ -0,0 +1,20 @@
+#pragma once
+
+#include "../all.qh"
+
+#ifdef GAMEQC
+MODEL(MON_GOLEM, M_Model("golem.dpm"));
+#endif
+
+CLASS(Golem, Monster)
+    ATTRIB(Golem, spawnflags, int, MON_FLAG_SUPERMONSTER | MON_FLAG_MELEE | MON_FLAG_RANGED);
+    ATTRIB(Golem, m_mins, vector, '-24 -24 -20');
+    ATTRIB(Golem, m_maxs, vector, '24 24 88');
+#ifdef GAMEQC
+    ATTRIB(Golem, m_model, Model, MDL_MON_GOLEM);
+#endif
+    ATTRIB(Golem, netname, string, "golem");
+    ATTRIB(Golem, monster_name, string, _("Golem"));
+ENDCLASS(Golem)
+
+REGISTER_MONSTER(GOLEM, NEW(Golem));
index 32383af5718e78fa530de6d2e44b620d0e7603ac..7e8b1828a0828d487d916bf881e778f1a9a55764 100644 (file)
@@ -264,6 +264,7 @@ void M_Mage_Defend_Heal(entity this)
        {
                setanim(this, this.anim_shoot, true, true, true);
                this.attack_finished_single[0] = time + (autocvar_g_monster_mage_heal_delay);
+               this.state = MONSTER_ATTACK_MELEE;
                this.anim_finished = time + 1.5;
        }
 }
@@ -439,12 +440,20 @@ 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_walk = animfixfps(actor, '1 1 1', none);
+    actor.anim_run = animfixfps(actor, '1 1 1', none);
     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_fire1 = animfixfps(actor, '3 1 5', none); // analyze models and set framerate
+    //actor.anim_fire2 = animfixfps(actor, '4 1 5', none); // analyze models and set framerate
+    //actor.anim_fire3 = animfixfps(actor, '5 1 5', none); // analyze models and set framerate
+    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
+    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_dead1 = animfixfps(actor, '11 1 0.5', none); // 2 seconds
+    //actor.anim_dead2 = animfixfps(actor, '12 1 0.5', none); // 2 seconds
     return true;
 }
 #endif
index 98fb7667341dc6e13a5cfc168e2d43e76258de6e..402e6948e2604ae4419ae2330507afd9b06705e5 100644 (file)
@@ -3,13 +3,13 @@
 #include "../all.qh"
 
 #ifdef GAMEQC
-MODEL(MON_MAGE, M_Model("mage.dpm"));
+MODEL(MON_MAGE, M_Model("nanomage.dpm"));
 #endif
 
 CLASS(Mage, Monster)
     ATTRIB(Mage, spawnflags, int, MON_FLAG_MELEE | MON_FLAG_RANGED);
-    ATTRIB(Mage, m_mins, vector, '-36 -36 -24');
-    ATTRIB(Mage, m_maxs, vector, '36 36 50');
+    ATTRIB(Mage, m_mins, vector, '-16 -16 -24');
+    ATTRIB(Mage, m_maxs, vector, '16 16 55');
 #ifdef GAMEQC
     ATTRIB(Mage, m_model, Model, MDL_MON_MAGE);
 #endif
diff --git a/qcsrc/common/monsters/monster/shambler.qc b/qcsrc/common/monsters/monster/shambler.qc
deleted file mode 100644 (file)
index 338acac..0000000
+++ /dev/null
@@ -1,266 +0,0 @@
-#include "shambler.qh"
-
-#ifdef SVQC
-float autocvar_g_monster_shambler_health;
-float autocvar_g_monster_shambler_damageforcescale = 0.1;
-float autocvar_g_monster_shambler_attack_smash_damage;
-float autocvar_g_monster_shambler_attack_smash_range;
-float autocvar_g_monster_shambler_attack_claw_damage;
-float autocvar_g_monster_shambler_attack_lightning_damage;
-float autocvar_g_monster_shambler_attack_lightning_damage_zap = 15;
-float autocvar_g_monster_shambler_attack_lightning_force;
-float autocvar_g_monster_shambler_attack_lightning_radius;
-float autocvar_g_monster_shambler_attack_lightning_radius_zap;
-float autocvar_g_monster_shambler_attack_lightning_speed;
-float autocvar_g_monster_shambler_attack_lightning_speed_up;
-float autocvar_g_monster_shambler_speed_stop;
-float autocvar_g_monster_shambler_speed_run;
-float autocvar_g_monster_shambler_speed_walk;
-
-/*
-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_swingr       = 4;
-const float shambler_anim_swingl       = 5;
-const float shambler_anim_magic                = 6;
-const float shambler_anim_pain         = 7;
-const float shambler_anim_death                = 8;
-*/
-
-.float shambler_lastattack; // delay attacks separately
-
-void M_Shambler_Attack_Smash(entity this)
-{
-       makevectors(this.angles);
-       Send_Effect(EFFECT_EXPLOSION_MEDIUM, (this.origin + (v_forward * 150)) - ('0 0 1' * this.maxs.z), '0 0 0', 1);
-       sound(this, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
-
-       // RadiusDamage does NOT support custom starting location, which means we must use this hack...
-
-       tracebox(this.origin + v_forward * 50, this.mins * 0.5, this.maxs * 0.5, this.origin + v_forward * autocvar_g_monster_shambler_attack_smash_range, MOVE_NORMAL, this);
-
-       if(trace_ent.takedamage)
-               Damage(trace_ent, this, this, (autocvar_g_monster_shambler_attack_smash_damage) * MONSTER_SKILLMOD(this), DEATH_MONSTER_SHAMBLER_SMASH.m_id, trace_ent.origin, normalize(trace_ent.origin - this.origin));
-}
-
-void M_Shambler_Attack_Swing(entity this)
-{
-       Monster_Attack_Melee(this, this.enemy, (autocvar_g_monster_shambler_attack_claw_damage), ((random() >= 0.5) ? this.anim_melee2 : this.anim_melee3), this.attack_range, 0.8, DEATH_MONSTER_SHAMBLER_CLAW.m_id, true);
-}
-
-#include <common/effects/qc/_mod.qh>
-
-void M_Shambler_Attack_Lightning_Explode(entity this, entity directhitentity)
-{
-       sound(this, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_NORM);
-       Send_Effect(EFFECT_ELECTRO_IMPACT, this.origin, '0 0 0', 1);
-
-       this.event_damage = func_null;
-       this.takedamage = DAMAGE_NO;
-       set_movetype(this, MOVETYPE_NONE);
-       this.velocity = '0 0 0';
-
-       if(this.move_movetype == MOVETYPE_NONE)
-               this.velocity = this.oldvelocity;
-
-       RadiusDamage (this, this.realowner, (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_radius),
-                                       NULL, NULL, (autocvar_g_monster_shambler_attack_lightning_force), this.projectiledeathtype, directhitentity);
-
-       FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_monster_shambler_attack_lightning_radius_zap, it != this.realowner && it.takedamage,
-       {
-               te_csqc_lightningarc(this.origin, it.origin);
-               Damage(it, this, this.realowner, (autocvar_g_monster_shambler_attack_lightning_damage_zap) * MONSTER_SKILLMOD(this), DEATH_MONSTER_SHAMBLER_ZAP.m_id, it.origin, '0 0 0');
-       });
-
-       setthink(this, SUB_Remove);
-       this.nextthink = time + 0.2;
-}
-
-void M_Shambler_Attack_Lightning_Explode_use(entity this, entity actor, entity trigger)
-{
-       M_Shambler_Attack_Lightning_Explode(this, trigger);
-}
-
-void M_Shambler_Attack_Lightning_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
-{
-       if (this.health <= 0)
-               return;
-
-       if (!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
-               return; // g_projectiles_damage says to halt
-
-       this.health = this.health - damage;
-
-       if (this.health <= 0)
-               W_PrepareExplosionByDamage(this, attacker, adaptor_think2use);
-}
-
-void M_Shambler_Attack_Lightning_Touch(entity this, entity toucher)
-{
-       PROJECTILE_TOUCH(this, toucher);
-
-       this.use(this, NULL, toucher);
-}
-
-void M_Shambler_Attack_Lightning_Think(entity this)
-{
-       this.nextthink = time;
-       if (time > this.cnt)
-       {
-               M_Shambler_Attack_Lightning_Explode(this, NULL);
-               return;
-       }
-}
-
-void M_Shambler_Attack_Lightning(entity this)
-{
-       monster_makevectors(this, this.enemy);
-
-       entity gren = new(grenade);
-       gren.owner = gren.realowner = this;
-       gren.bot_dodge = true;
-       gren.bot_dodgerating = (autocvar_g_monster_shambler_attack_lightning_damage);
-       set_movetype(gren, MOVETYPE_BOUNCE);
-       PROJECTILE_MAKETRIGGER(gren);
-       gren.projectiledeathtype = DEATH_MONSTER_SHAMBLER_ZAP.m_id;
-       setorigin(gren, CENTER_OR_VIEWOFS(this));
-       setsize(gren, '-8 -8 -8', '8 8 8');
-       gren.scale = 2.5;
-
-       gren.cnt = time + 5;
-       gren.nextthink = time;
-       setthink(gren, M_Shambler_Attack_Lightning_Think);
-       gren.use = M_Shambler_Attack_Lightning_Explode_use;
-       settouch(gren, M_Shambler_Attack_Lightning_Touch);
-
-       gren.takedamage = DAMAGE_YES;
-       gren.health = 50;
-       gren.damageforcescale = 0;
-       gren.event_damage = M_Shambler_Attack_Lightning_Damage;
-       gren.damagedbycontents = true;
-       IL_PUSH(g_damagedbycontents, gren);
-       gren.missile_flags = MIF_SPLASH | MIF_ARC;
-       W_SetupProjVelocity_Explicit(gren, v_forward, v_up, (autocvar_g_monster_shambler_attack_lightning_speed), (autocvar_g_monster_shambler_attack_lightning_speed_up), 0, 0, false);
-
-       gren.angles = vectoangles (gren.velocity);
-       gren.flags = FL_PROJECTILE;
-       IL_PUSH(g_projectiles, gren);
-       IL_PUSH(g_bot_dodge, gren);
-
-       CSQCProjectile(gren, true, PROJECTILE_SHAMBLER_LIGHTNING, true);
-}
-
-.int state;
-
-bool M_Shambler_Attack(int attack_type, entity actor, entity targ, .entity weaponentity)
-{
-       switch(attack_type)
-       {
-               case MONSTER_ATTACK_MELEE:
-               {
-                       int swing_cnt = bound(1, floor(random() * 4), 3);
-                       Monster_Delay(actor, swing_cnt, 0.5, M_Shambler_Attack_Swing);
-                       actor.anim_finished = actor.attack_finished_single[0] = time + (0.5 * swing_cnt); // set this for the delay
-                       return true;
-               }
-               case MONSTER_ATTACK_RANGED:
-               {
-                       float randomness = random();
-
-                       if(time >= actor.shambler_lastattack) // shambler doesn't attack much
-                       if(IS_ONGROUND(actor))
-                       if(randomness <= 0.5 && vdist(actor.enemy.origin - actor.origin, <=, autocvar_g_monster_shambler_attack_smash_range))
-                       {
-                               setanim(actor, actor.anim_melee2, true, true, false);
-                               Monster_Delay(actor, 1, 0.7, M_Shambler_Attack_Smash);
-                               actor.attack_finished_single[0] = time + 1.1;
-                               actor.anim_finished = time + 1.1;
-                               actor.state = MONSTER_ATTACK_MELEE; // kinda a melee attack
-                               actor.shambler_lastattack = time + 3 + random() * 1.5;
-                               return true;
-                       }
-                       else if(randomness <= 0.1 && vdist(actor.enemy.origin - actor.origin, >=, autocvar_g_monster_shambler_attack_smash_range * 1.5)) // small chance, don't want this spammed
-                       {
-                               setanim(actor, actor.anim_shoot, true, true, false);
-                               actor.state = MONSTER_ATTACK_MELEE; // maybe we should rename this to something more general
-                               actor.attack_finished_single[0] = time + 1.1;
-                               actor.anim_finished = 1.1;
-                               actor.shambler_lastattack = time + 3 + random() * 1.5;
-                               Monster_Delay(actor, 1, 0.6, M_Shambler_Attack_Lightning);
-                               return true;
-                       }
-
-                       return false;
-               }
-       }
-
-       return false;
-}
-
-spawnfunc(monster_shambler) { Monster_Spawn(this, true, MON_SHAMBLER.monsterid); }
-#endif // SVQC
-
-#ifdef SVQC
-METHOD(Shambler, mr_think, bool(Shambler this, entity actor))
-{
-    TC(Shambler, this);
-    return true;
-}
-
-METHOD(Shambler, mr_pain, float(Shambler this, entity actor, float damage_take, entity attacker, float deathtype))
-{
-    TC(Shambler, this);
-    actor.pain_finished = time + 0.5;
-    setanim(actor, actor.anim_pain1, 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);
-    return true;
-}
-#endif
-#ifdef GAMEQC
-METHOD(Shambler, mr_anim, bool(Shambler this, entity actor))
-{
-    TC(Shambler, this);
-    vector none = '0 0 0';
-    actor.anim_die1 = animfixfps(actor, '8 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, '7 1 2', none); // 0.5 seconds
-    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_shoot = animfixfps(actor, '6 1 5', none); // analyze models and set framerate
-    actor.anim_run = animfixfps(actor, '2 1 1', none);
-    return true;
-}
-#endif
-#ifdef SVQC
-.float animstate_endtime;
-METHOD(Shambler, mr_setup, bool(Shambler this, entity actor))
-{
-    TC(Shambler, this);
-    if(!actor.health) actor.health = (autocvar_g_monster_shambler_health);
-    if(!actor.attack_range) actor.attack_range = 150;
-    if(!actor.speed) { actor.speed = (autocvar_g_monster_shambler_speed_walk); }
-    if(!actor.speed2) { actor.speed2 = (autocvar_g_monster_shambler_speed_run); }
-    if(!actor.stopspeed) { actor.stopspeed = (autocvar_g_monster_shambler_speed_stop); }
-    if(!actor.damageforcescale) { actor.damageforcescale = (autocvar_g_monster_shambler_damageforcescale); }
-
-    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);
-    actor.spawn_time = actor.animstate_endtime;
-    actor.spawnshieldtime = actor.spawn_time;
-    actor.monster_attackfunc = M_Shambler_Attack;
-
-    return true;
-}
-#endif
diff --git a/qcsrc/common/monsters/monster/shambler.qh b/qcsrc/common/monsters/monster/shambler.qh
deleted file mode 100644 (file)
index 554fe5f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#pragma once
-
-#include "../all.qh"
-
-#ifdef GAMEQC
-MODEL(MON_SHAMBLER, M_Model("shambler.mdl"));
-#endif
-
-CLASS(Shambler, Monster)
-    ATTRIB(Shambler, spawnflags, int, MONSTER_SIZE_BROKEN | MON_FLAG_SUPERMONSTER | MON_FLAG_MELEE | MON_FLAG_RANGED);
-    ATTRIB(Shambler, m_mins, vector, '-41 -41 -31');
-    ATTRIB(Shambler, m_maxs, vector, '41 41 65');
-#ifdef GAMEQC
-    ATTRIB(Shambler, m_model, Model, MDL_MON_SHAMBLER);
-#endif
-    ATTRIB(Shambler, netname, string, "shambler");
-    ATTRIB(Shambler, monster_name, string, _("Shambler"));
-ENDCLASS(Shambler)
-
-REGISTER_MONSTER(SHAMBLER, NEW(Shambler));
index a6551392075891911a85a9893a8e8c2cdf0dc62c..77a528cab0d41b6d260dadb19099c8172fa3be1a 100644 (file)
@@ -199,14 +199,15 @@ METHOD(Spider, mr_think, bool(Spider this, entity actor))
 METHOD(Spider, mr_pain, float(Spider this, entity actor, float damage_take, entity attacker, float deathtype))
 {
     TC(Spider, this);
+    setanim(actor, ((random() > 0.5) ? actor.anim_pain2 : actor.anim_pain1), true, true, false);
+    actor.pain_finished = actor.animstate_endtime;
     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_die2 : actor.anim_die1), false, true, true);
     return true;
 }
 #endif
@@ -215,11 +216,25 @@ METHOD(Spider, mr_anim, bool(Spider this, entity actor))
 {
     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_melee = animfixfps(actor, '0 1 5', none); // analyze models and set framerate
+    actor.anim_die1 = animfixfps(actor, '1 1 1', none);
+    actor.anim_die2 = animfixfps(actor, '2 1 1', none);
+    actor.anim_shoot = animfixfps(actor, '3 1 1', none);
+    //actor.anim_fire2 = animfixfps(actor, '4 1 1', none);
+    actor.anim_idle = animfixfps(actor, '5 1 1', none);
+    //actor.anim_sight = animfixfps(actor, '6 1 1', none);
+    actor.anim_pain1 = animfixfps(actor, '7 1 1', none);
+    actor.anim_pain2 = animfixfps(actor, '8 1 1', none);
+    //actor.anim_pain3 = animfixfps(actor, '9 1 1', none);
+    actor.anim_walk = animfixfps(actor, '10 1 1', none);
+    actor.anim_run = animfixfps(actor, '10 1 1', none); // temp?
+    //actor.anim_forwardright = animfixfps(actor, '11 1 1', none);
+    //actor.anim_walkright = animfixfps(actor, '12 1 1', none);
+    //actor.anim_walkbackright = animfixfps(actor, '13 1 1', none);
+    //actor.anim_walkback = animfixfps(actor, '14 1 1', none);
+    //actor.anim_walkbackleft = animfixfps(actor, '15 1 1', none);
+    //actor.anim_walkleft = animfixfps(actor, '16 1 1', none);
+    //actor.anim_forwardleft = animfixfps(actor, '17 1 1', none);
     return true;
 }
 #endif
index 3a688de32efce0e1282543bd3e85a55d4563c26b..2ab26d9662cb63f07bfdbb8a172275ee10710a3a 100644 (file)
@@ -8,8 +8,8 @@ MODEL(MON_SPIDER, M_Model("spider.dpm"));
 
 CLASS(Spider, Monster)
     ATTRIB(Spider, spawnflags, int, MON_FLAG_MELEE | MON_FLAG_RANGED | MON_FLAG_RIDE);
-    ATTRIB(Spider, m_mins, vector, '-18 -18 -25');
-    ATTRIB(Spider, m_maxs, vector, '18 18 30');
+    ATTRIB(Spider, m_mins, vector, '-30 -30 -25');
+    ATTRIB(Spider, m_maxs, vector, '30 30 30');
 #ifdef GAMEQC
     ATTRIB(Spider, m_model, Model, MDL_MON_SPIDER);
 #endif
diff --git a/qcsrc/common/monsters/monster/troll.qc b/qcsrc/common/monsters/monster/troll.qc
new file mode 100644 (file)
index 0000000..3127458
--- /dev/null
@@ -0,0 +1,110 @@
+#include "troll.qh"
+
+#ifdef SVQC
+float autocvar_g_monster_troll_health = 900;
+float autocvar_g_monster_troll_damageforcescale = 0.1;
+float autocvar_g_monster_troll_attack_claw_damage = 90;
+float autocvar_g_monster_troll_speed_stop = 300;
+float autocvar_g_monster_troll_speed_run = 300;
+float autocvar_g_monster_troll_speed_walk = 190;
+
+/*
+const float troll_anim_attack          = 0;
+const float troll_anim_idle                    = 1;
+const float troll_anim_walk                    = 2;
+const float troll_anim_death           = 3;
+const float troll_anim_dead         = 4;
+const float troll_anim_run                     = 5;
+*/
+
+void M_Troll_Attack_Swing(entity this)
+{
+    Monster_Attack_Melee(this, this.enemy, (autocvar_g_monster_troll_attack_claw_damage), this.anim_melee1, this.attack_range, 0.5, DEATH_MONSTER_TROLL_MELEE.m_id, true);
+}
+
+bool M_Troll_Attack(int attack_type, entity actor, entity targ, .entity weaponentity)
+{
+       switch(attack_type)
+       {
+               case MONSTER_ATTACK_MELEE:
+               {
+            actor.state = MONSTER_ATTACK_MELEE; // freeze monster
+            setanim(actor, actor.anim_melee1, false, true, true);
+                       Monster_Delay(actor, 1, 0.6, M_Troll_Attack_Swing);
+            actor.anim_finished = actor.attack_finished_single[0] = time + 0.6; // set this for the delay
+                       return true;
+               }
+               case MONSTER_ATTACK_RANGED:
+               {
+                       // troll has no ranged attack
+                       return false;
+               }
+       }
+
+       return false;
+}
+
+spawnfunc(monster_troll) { Monster_Spawn(this, true, MON_TROLL.monsterid); }
+#endif // SVQC
+
+#ifdef SVQC
+METHOD(Troll, mr_think, bool(Troll this, entity actor))
+{
+    TC(Troll, this);
+    return true;
+}
+
+METHOD(Troll, mr_pain, float(Troll this, entity actor, float damage_take, entity attacker, float deathtype))
+{
+    TC(Troll, this);
+    actor.pain_finished = time + 0.5;
+    // no pain animation yet
+    //setanim(actor, actor.anim_pain1, true, true, false);
+    return damage_take;
+}
+
+METHOD(Troll, mr_death, bool(Troll this, entity actor))
+{
+    TC(Troll, this);
+    setanim(actor, actor.anim_die1, false, true, true);
+    return true;
+}
+#endif
+#ifdef GAMEQC
+METHOD(Troll, mr_anim, bool(Troll this, entity actor))
+{
+    TC(Troll, this);
+    vector none = '0 0 0';
+    actor.anim_die1 = animfixfps(actor, '3 1 1', none); // 2 seconds
+    actor.anim_walk = animfixfps(actor, '2 1 1', none);
+    actor.anim_idle = animfixfps(actor, '1 1 1', none);
+    actor.anim_melee1 = animfixfps(actor, '0 1 1', none); // analyze models and set framerate
+    actor.anim_run = animfixfps(actor, '5 1 1', none);
+    return true;
+}
+#endif
+#ifdef SVQC
+.float animstate_endtime;
+METHOD(Troll, mr_setup, bool(Troll this, entity actor))
+{
+    TC(Troll, this);
+    if(!actor.health) actor.health = (autocvar_g_monster_troll_health);
+    if(!actor.attack_range) actor.attack_range = 150;
+    if(!actor.speed) { actor.speed = (autocvar_g_monster_troll_speed_walk); }
+    if(!actor.speed2) { actor.speed2 = (autocvar_g_monster_troll_speed_run); }
+    if(!actor.stopspeed) { actor.stopspeed = (autocvar_g_monster_troll_speed_stop); }
+    if(!actor.damageforcescale) { actor.damageforcescale = (autocvar_g_monster_troll_damageforcescale); }
+
+    actor.view_ofs = '0 0 35'; // we swing at a lower height than our eyes
+
+    actor.monster_loot = ITEM_ArmorBig;
+    actor.weapon = WEP_MORTAR.m_id;
+
+    setanim(actor, actor.anim_idle, false, true, true);
+    actor.spawn_time = actor.animstate_endtime;
+    actor.spawnshieldtime = actor.spawn_time;
+    actor.monster_attackfunc = M_Troll_Attack;
+
+    return true;
+}
+#endif
diff --git a/qcsrc/common/monsters/monster/troll.qh b/qcsrc/common/monsters/monster/troll.qh
new file mode 100644 (file)
index 0000000..d5cc1f3
--- /dev/null
@@ -0,0 +1,24 @@
+#pragma once
+
+#ifdef GAMEQC
+MSG_INFO_NOTIF(DEATH_SELF_MON_TROLL_MELEE,             1, 2, 1, "s1 s2loc spree_lost", "s1",    "notify_death",         "^BG%s^K1 was ripped apart by a Troll%s%s", "")
+MSG_MULTI_NOTIF(DEATH_SELF_MON_TROLL_MELEE,                1,  NULL,           INFO_DEATH_SELF_MON_TROLL_MELEE,               CENTER_DEATH_SELF_MONSTER)
+REGISTER_DEATHTYPE(MONSTER_TROLL_MELEE,                        DEATH_SELF_MON_TROLL_MELEE,        DEATH_MURDER_MONSTER,                       "monster")
+#endif
+
+#ifdef GAMEQC
+MODEL(MON_TROLL, M_Model("troll.dpm"));
+#endif
+
+CLASS(Troll, Monster)
+    ATTRIB(Troll, spawnflags, int, MON_FLAG_SUPERMONSTER | MON_FLAG_MELEE);
+    ATTRIB(Troll, m_mins, vector, '-45 -45 -24');
+    ATTRIB(Troll, m_maxs, vector, '45 45 160');
+#ifdef GAMEQC
+    ATTRIB(Troll, m_model, Model, MDL_MON_TROLL);
+#endif
+    ATTRIB(Troll, netname, string, "troll");
+    ATTRIB(Troll, monster_name, string, _("Troll"));
+ENDCLASS(Troll)
+
+REGISTER_MONSTER(TROLL, NEW(Troll));
index 38df673dd1c161d267a4ceeee9b5c63edbf43ae5..6205c72da839e0268c05f930bb0bc2dc488873a6 100644 (file)
@@ -20,8 +20,13 @@ METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, .entity
     if (time > actor.attack_finished_single[0] || weapon_prepareattack(thiswep, actor, weaponentity, false, 1.2)) {
         if (IS_PLAYER(actor)) W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_WyvernAttack_FIRE, CH_WEAPON_B, 0);
                if (IS_MONSTER(actor)) {
-                       actor.attack_finished_single[0] = time + 1.2;
-                       actor.anim_finished = time + 1.2;
+                       //actor.anim_finished = time + 1.2;
+                       setanim(actor, actor.anim_shoot, false, true, true);
+                       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;
                        monster_makevectors(actor, actor.enemy);
                }
 
@@ -138,12 +143,15 @@ METHOD(Wyvern, mr_anim, bool(Wyvern this, entity actor))
 {
     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_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_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_melee = 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_die1 = animfixfps(actor, '7 1 0.5', none); // 2 seconds
+    //actor.anim_dead = animfixfps(actor, '8 1 0.5', none); // 2 seconds
     return true;
 }
 #endif
index 2326b0dd1157c27a8cb39e0ee5610dad9e0eb25d..0f569f6b2cc8bbd45703af1db0e0cf9e61dd71a9 100644 (file)
@@ -3,13 +3,13 @@
 #include "../all.qh"
 
 #ifdef GAMEQC
-MODEL(MON_WYVERN, M_Model("wizard.mdl"));
+MODEL(MON_WYVERN, M_Model("dragon.dpm"));
 #endif
 
 CLASS(Wyvern, Monster)
-    ATTRIB(Wyvern, spawnflags, int, MONSTER_TYPE_FLY | MONSTER_SIZE_BROKEN | MON_FLAG_RANGED | MON_FLAG_RIDE);
-    ATTRIB(Wyvern, m_mins, vector, '-20 -20 -58');
-    ATTRIB(Wyvern, m_maxs, vector, '20 20 20');
+    ATTRIB(Wyvern, spawnflags, int, MONSTER_TYPE_FLY | MON_FLAG_RANGED | MON_FLAG_RIDE);
+    ATTRIB(Wyvern, m_mins, vector, '-30 -30 -24');
+    ATTRIB(Wyvern, m_maxs, vector, '30 30 30');
 #ifdef GAMEQC
     ATTRIB(Wyvern, m_model, Model, MDL_MON_WYVERN);
 #endif
index 80cd21b481b41474dcf860d2d42178c95428f228..20e7b26a1cc993513b07b7f91ad06bf8de763986 100644 (file)
@@ -125,21 +125,27 @@ entity Monster_FindTarget(entity this)
        vector my_center = CENTER_OR_VIEWOFS(this);
 
        // find the closest acceptable target to pass to
-       IL_EACH(g_monster_targets, it.monster_attack && vdist(it.origin - this.origin, <, this.target_range),
+       IL_EACH(g_monster_targets, it.monster_attack,
        {
-               if(Monster_ValidTarget(this, it))
-               {
-                       // if it's a player, use the view origin as reference (stolen from RadiusDamage functions in g_damage.qc)
-                       vector targ_center = CENTER_OR_VIEWOFS(it);
+               float trange = this.target_range;
+               if(PHYS_INPUT_BUTTON_CROUCH(it))
+                       trange *= 0.75; // TODO cvar this
+               vector theirmid = (it.absmin + it.absmax) * 0.5;
+               if(vdist(theirmid - this.origin, >, trange))
+                       continue;
+               if(!Monster_ValidTarget(this, it))
+                       continue;
 
-                       if(closest_target)
-                       {
-                               vector closest_target_center = CENTER_OR_VIEWOFS(closest_target);
-                               if(vlen2(my_center - targ_center) < vlen2(my_center - closest_target_center))
-                                       { closest_target = it; }
-                       }
-                       else { closest_target = it; }
+               // if it's a player, use the view origin as reference (stolen from RadiusDamage functions in g_damage.qc)
+               vector targ_center = CENTER_OR_VIEWOFS(it);
+
+               if(closest_target)
+               {
+                       vector closest_target_center = CENTER_OR_VIEWOFS(closest_target);
+                       if(vlen2(my_center - targ_center) < vlen2(my_center - closest_target_center))
+                               { closest_target = it; }
                }
+               else { closest_target = it; }
        });
 
        return closest_target;
@@ -166,6 +172,11 @@ void monster_setupcolors(entity this)
                else
                        this.colormap = 1024;
        }
+
+       if(this.colormap > 0)
+               this.glowmod = colormapPaletteColor(this.colormap & 0x0F, false);
+       else
+               this.glowmod = '1 1 1';
 }
 
 void monster_changeteam(entity this, int newteam)
@@ -1393,15 +1404,8 @@ bool Monster_Spawn(entity this, bool check_appear, int mon_id)
                set_movetype(this, MOVETYPE_FLY);
        }
 
-       if(!(this.spawnflags & MONSTERFLAG_RESPAWNED))
-       {
-               if(mon.spawnflags & MONSTER_SIZE_BROKEN)
-                       this.scale *= 1.3;
-
-               if(mon.spawnflags & MONSTER_SIZE_QUAKE)
-               if(autocvar_g_monsters_quake_resize)
-                       this.scale *= 1.3;
-       }
+       if((mon.spawnflags & MONSTER_SIZE_QUAKE) && autocvar_g_monsters_quake_resize && !(this.spawnflags & MONSTERFLAG_RESPAWNED))
+               this.scale *= 1.3;
 
        setsize(this, mon.m_mins * this.scale, mon.m_maxs * this.scale);
 
index 3b5492ac2d0adab12235d3512c13177e179b412b..2b79f39bb069ed090adbfb3bdc015ea5772c4156 100644 (file)
     MSG_INFO_NOTIF(DEATH_SELF_GENERIC,                      N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_selfkill",      _("^BG%s^K1 died%s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_LAVA,                         N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_lava",          _("^BG%s^K1 turned into hot slag%s%s"), _("^BG%s^K1 found a hot place%s%s"))
     MSG_INFO_NOTIF(DEATH_SELF_MON_MAGE,                     N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 was exploded by a Mage%s%s"), "")
-    MSG_INFO_NOTIF(DEATH_SELF_MON_SHAMBLER_CLAW,            N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1's innards became outwards by a Shambler%s%s"), "")
-    MSG_INFO_NOTIF(DEATH_SELF_MON_SHAMBLER_SMASH,           N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 was smashed by a Shambler%s%s"), "")
-    MSG_INFO_NOTIF(DEATH_SELF_MON_SHAMBLER_ZAP,             N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 was zapped to death by a Shambler%s%s"), "")
+    MSG_INFO_NOTIF(DEATH_SELF_MON_GOLEM_CLAW,               N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1's innards became outwards by a Golem%s%s"), "")
+    MSG_INFO_NOTIF(DEATH_SELF_MON_GOLEM_SMASH,              N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 was smashed by a Golem%s%s"), "")
+    MSG_INFO_NOTIF(DEATH_SELF_MON_GOLEM_ZAP,                N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 was zapped to death by a Golem%s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_MON_SPIDER,                   N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 was bitten by a Spider%s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_MON_WYVERN,                   N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 was fireballed by a Wyvern%s%s"), "")
     MSG_INFO_NOTIF(DEATH_SELF_MON_ZOMBIE_JUMP,              N_CONSOLE,  2, 1, "s1 s2loc spree_lost", "s1",      "notify_death",         _("^BG%s^K1 joins the Zombies%s%s"), "")
     MSG_MULTI_NOTIF(DEATH_SELF_GENERIC,                 N_ENABLE,  NULL,           INFO_DEATH_SELF_GENERIC,                CENTER_DEATH_SELF_GENERIC)
     MSG_MULTI_NOTIF(DEATH_SELF_LAVA,                    N_ENABLE,  NULL,           INFO_DEATH_SELF_LAVA,                   CENTER_DEATH_SELF_LAVA)
     MSG_MULTI_NOTIF(DEATH_SELF_MON_MAGE,                N_ENABLE,  NULL,           INFO_DEATH_SELF_MON_MAGE,               CENTER_DEATH_SELF_MONSTER)
-    MSG_MULTI_NOTIF(DEATH_SELF_MON_SHAMBLER_CLAW,       N_ENABLE,  NULL,           INFO_DEATH_SELF_MON_SHAMBLER_CLAW,      CENTER_DEATH_SELF_MONSTER)
-    MSG_MULTI_NOTIF(DEATH_SELF_MON_SHAMBLER_SMASH,      N_ENABLE,  NULL,           INFO_DEATH_SELF_MON_SHAMBLER_SMASH,     CENTER_DEATH_SELF_MONSTER)
-    MSG_MULTI_NOTIF(DEATH_SELF_MON_SHAMBLER_ZAP,        N_ENABLE,  NULL,           INFO_DEATH_SELF_MON_SHAMBLER_ZAP,       CENTER_DEATH_SELF_MONSTER)
+    MSG_MULTI_NOTIF(DEATH_SELF_MON_GOLEM_CLAW,          N_ENABLE,  NULL,           INFO_DEATH_SELF_MON_GOLEM_CLAW,         CENTER_DEATH_SELF_MONSTER)
+    MSG_MULTI_NOTIF(DEATH_SELF_MON_GOLEM_SMASH,         N_ENABLE,  NULL,           INFO_DEATH_SELF_MON_GOLEM_SMASH,        CENTER_DEATH_SELF_MONSTER)
+    MSG_MULTI_NOTIF(DEATH_SELF_MON_GOLEM_ZAP,           N_ENABLE,  NULL,           INFO_DEATH_SELF_MON_GOLEM_ZAP,          CENTER_DEATH_SELF_MONSTER)
     MSG_MULTI_NOTIF(DEATH_SELF_MON_SPIDER,              N_ENABLE,  NULL,           INFO_DEATH_SELF_MON_SPIDER,             CENTER_DEATH_SELF_MONSTER)
     MSG_MULTI_NOTIF(DEATH_SELF_MON_WYVERN,              N_ENABLE,  NULL,           INFO_DEATH_SELF_MON_WYVERN,             CENTER_DEATH_SELF_MONSTER)
     MSG_MULTI_NOTIF(DEATH_SELF_MON_ZOMBIE_JUMP,         N_ENABLE,  NULL,           INFO_DEATH_SELF_MON_ZOMBIE_JUMP,        CENTER_DEATH_SELF_MONSTER)
index 6e0c2b3a3119fd690aa4bc54ef3f2a2009883a47..195fed22c1cb58f7f25f9f76454993471667b52a 100644 (file)
@@ -339,6 +339,7 @@ spawnfunc(func_breakable)
                this.takedamage = DAMAGE_NO;
                this.event_damage = func_null;
                this.bot_attack = false;
+               this.monster_attack = false;
        }
 
        // precache all the models
@@ -359,6 +360,9 @@ spawnfunc(func_breakable)
        this.reset = func_breakable_reset;
        this.reset(this);
 
+       if(this.monster_attack)
+               IL_PUSH(g_monster_targets, this);
+
        IL_PUSH(g_initforplayer, this);
        this.init_for_player = func_breakable_init_for_player;
 
index 5a782b98f9e462210ae5de73ec15102b340507b5..594c142494f4ea13305996c257d2745712e78727 100644 (file)
@@ -32,7 +32,7 @@ const int PROJECTILE_BUMBLE_GUN = 30;
 const int PROJECTILE_BUMBLE_BEAM = 31;
 
 const int PROJECTILE_MAGE_SPIKE = 32;
-const int PROJECTILE_SHAMBLER_LIGHTNING = 33;
+const int PROJECTILE_GOLEM_LIGHTNING = 33;
 
 const int PROJECTILE_ROCKETMINSTA_LASER = 34;
 
index 2a21242ef8ec677bfbe2975527cdf38233ce17bf..582a64ee48b2279c7dfb9e50748c078d2ec6f826 100644 (file)
@@ -14,7 +14,7 @@ void XonoticMonsterToolsDialog_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "zombie", _("Zombie")));
                me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "spider", _("Spider")));
-               me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "shambler", _("Shambler")));
+               me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "golem", _("Golem")));
                me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "mage", _("Mage")));
                me.TD(me, 1, 0.4, e = makeXonoticRadioButton(2, "menu_monsters_edit_spawn", "wyvern", _("Wyvern")));
        me.TR(me);
index 7b381b544588ae4d9049d972ad0d74d44c7c9a23..d72f64b727c9a1c9565aa9121f76885618702ba2 100644 (file)
@@ -693,13 +693,13 @@ float updateCompression()
        GAMETYPE(MAPINFO_TYPE_NEXBALL) \
        GAMETYPE(MAPINFO_TYPE_ONSLAUGHT) \
        GAMETYPE(MAPINFO_TYPE_ASSAULT) \
-       /* GAMETYPE(MAPINFO_TYPE_INVASION) */ \
        /**/
 
 // hidden gametypes come last so indexing always works correctly
 #define HIDDEN_GAMETYPES \
        GAMETYPE(MAPINFO_TYPE_RACE) \
        GAMETYPE(MAPINFO_TYPE_CTS) \
+       GAMETYPE(MAPINFO_TYPE_INVASION) \
        /**/
 
 Gametype GameType_GetID(int cnt)
diff --git a/scripts/golem.shader b/scripts/golem.shader
new file mode 100644 (file)
index 0000000..5ccfd24
--- /dev/null
@@ -0,0 +1,8 @@
+golem
+{
+       dpreflectcube cubemaps/default/sky
+       {
+               map textures/golem.tga
+               rgbgen lightingDiffuse
+       }
+}
\ No newline at end of file
diff --git a/scripts/nanomage.shader b/scripts/nanomage.shader
new file mode 100644 (file)
index 0000000..c0bd334
--- /dev/null
@@ -0,0 +1,8 @@
+nanomage
+{
+       dpreflectcube cubemaps/default/sky
+       {
+               map textures/nanomage.tga
+               rgbgen lightingDiffuse
+       }
+}
\ No newline at end of file
diff --git a/scripts/spider.shader b/scripts/spider.shader
new file mode 100644 (file)
index 0000000..ed47960
--- /dev/null
@@ -0,0 +1,8 @@
+spider
+{
+       dpreflectcube cubemaps/default/sky
+       {
+               map textures/spider.tga
+               rgbgen lightingDiffuse
+       }
+}
\ No newline at end of file
diff --git a/sound/monsters/troll/death1.wav b/sound/monsters/troll/death1.wav
new file mode 100644 (file)
index 0000000..211656a
Binary files /dev/null and b/sound/monsters/troll/death1.wav differ
diff --git a/sound/monsters/troll/death2.wav b/sound/monsters/troll/death2.wav
new file mode 100644 (file)
index 0000000..bd68826
Binary files /dev/null and b/sound/monsters/troll/death2.wav differ
diff --git a/sound/monsters/troll/death3.wav b/sound/monsters/troll/death3.wav
new file mode 100644 (file)
index 0000000..09608f5
Binary files /dev/null and b/sound/monsters/troll/death3.wav differ
diff --git a/sound/monsters/troll/idle1.wav b/sound/monsters/troll/idle1.wav
new file mode 100644 (file)
index 0000000..cc67c22
Binary files /dev/null and b/sound/monsters/troll/idle1.wav differ
diff --git a/sound/monsters/troll/idle2.wav b/sound/monsters/troll/idle2.wav
new file mode 100644 (file)
index 0000000..478913d
Binary files /dev/null and b/sound/monsters/troll/idle2.wav differ
diff --git a/sound/monsters/troll/melee.wav b/sound/monsters/troll/melee.wav
new file mode 100644 (file)
index 0000000..cc67c22
Binary files /dev/null and b/sound/monsters/troll/melee.wav differ
diff --git a/sound/monsters/troll/pain1.wav b/sound/monsters/troll/pain1.wav
new file mode 100644 (file)
index 0000000..328dafc
Binary files /dev/null and b/sound/monsters/troll/pain1.wav differ
diff --git a/sound/monsters/troll/pain2.wav b/sound/monsters/troll/pain2.wav
new file mode 100644 (file)
index 0000000..2c056bd
Binary files /dev/null and b/sound/monsters/troll/pain2.wav differ
diff --git a/sound/monsters/troll/sight.wav b/sound/monsters/troll/sight.wav
new file mode 100644 (file)
index 0000000..85e5682
Binary files /dev/null and b/sound/monsters/troll/sight.wav differ
diff --git a/textures/forest-monster-skin1.jpg b/textures/forest-monster-skin1.jpg
new file mode 100644 (file)
index 0000000..6a227d0
Binary files /dev/null and b/textures/forest-monster-skin1.jpg differ
diff --git a/textures/forest-monster-skin1_norm.jpg b/textures/forest-monster-skin1_norm.jpg
new file mode 100644 (file)
index 0000000..142823e
Binary files /dev/null and b/textures/forest-monster-skin1_norm.jpg differ
diff --git a/textures/forest-monster-skin1_pants.jpg b/textures/forest-monster-skin1_pants.jpg
new file mode 100644 (file)
index 0000000..61f6667
Binary files /dev/null and b/textures/forest-monster-skin1_pants.jpg differ
diff --git a/textures/forest-monster-skin1_spec.jpg b/textures/forest-monster-skin1_spec.jpg
new file mode 100644 (file)
index 0000000..14e57c5
Binary files /dev/null and b/textures/forest-monster-skin1_spec.jpg differ
diff --git a/textures/glow_reflect.tga b/textures/glow_reflect.tga
new file mode 100644 (file)
index 0000000..6615d49
Binary files /dev/null and b/textures/glow_reflect.tga differ
diff --git a/textures/golem.tga b/textures/golem.tga
new file mode 100644 (file)
index 0000000..83456ae
Binary files /dev/null and b/textures/golem.tga differ
diff --git a/textures/golem_gloss.tga b/textures/golem_gloss.tga
new file mode 100644 (file)
index 0000000..b6a110f
Binary files /dev/null and b/textures/golem_gloss.tga differ
diff --git a/textures/golem_glow.tga b/textures/golem_glow.tga
new file mode 100644 (file)
index 0000000..4ab4a36
Binary files /dev/null and b/textures/golem_glow.tga differ
diff --git a/textures/golem_norm.tga b/textures/golem_norm.tga
new file mode 100644 (file)
index 0000000..cbd6844
Binary files /dev/null and b/textures/golem_norm.tga differ
diff --git a/textures/golem_reflect.tga b/textures/golem_reflect.tga
new file mode 100644 (file)
index 0000000..fc26699
Binary files /dev/null and b/textures/golem_reflect.tga differ
diff --git a/textures/golem_shirt.tga b/textures/golem_shirt.tga
new file mode 100644 (file)
index 0000000..82c232a
Binary files /dev/null and b/textures/golem_shirt.tga differ
diff --git a/textures/mage.tga b/textures/mage.tga
deleted file mode 100644 (file)
index 55aadba..0000000
Binary files a/textures/mage.tga and /dev/null differ
diff --git a/textures/mage_glow.tga b/textures/mage_glow.tga
deleted file mode 100644 (file)
index 8498c46..0000000
Binary files a/textures/mage_glow.tga and /dev/null differ
diff --git a/textures/mage_pants.tga b/textures/mage_pants.tga
deleted file mode 100644 (file)
index a3d2e13..0000000
Binary files a/textures/mage_pants.tga and /dev/null differ
diff --git a/textures/monsters/Dragon.tga b/textures/monsters/Dragon.tga
new file mode 100644 (file)
index 0000000..69bc82f
Binary files /dev/null and b/textures/monsters/Dragon.tga differ
diff --git a/textures/monsters/Dragon_Norm.tga b/textures/monsters/Dragon_Norm.tga
new file mode 100644 (file)
index 0000000..3f749b1
Binary files /dev/null and b/textures/monsters/Dragon_Norm.tga differ
diff --git a/textures/monsters/Dragon_Shirt.tga b/textures/monsters/Dragon_Shirt.tga
new file mode 100644 (file)
index 0000000..5cdb81b
Binary files /dev/null and b/textures/monsters/Dragon_Shirt.tga differ
diff --git a/textures/monsters/Dragon_Spec.tga b/textures/monsters/Dragon_Spec.tga
new file mode 100644 (file)
index 0000000..60cafa4
Binary files /dev/null and b/textures/monsters/Dragon_Spec.tga differ
diff --git a/textures/nanomage.tga b/textures/nanomage.tga
new file mode 100644 (file)
index 0000000..151ee1f
Binary files /dev/null and b/textures/nanomage.tga differ
diff --git a/textures/nanomage_gloss.tga b/textures/nanomage_gloss.tga
new file mode 100644 (file)
index 0000000..1a717a2
Binary files /dev/null and b/textures/nanomage_gloss.tga differ
diff --git a/textures/nanomage_glow.tga b/textures/nanomage_glow.tga
new file mode 100644 (file)
index 0000000..e380ce8
Binary files /dev/null and b/textures/nanomage_glow.tga differ
diff --git a/textures/nanomage_norm.tga b/textures/nanomage_norm.tga
new file mode 100644 (file)
index 0000000..06aae48
Binary files /dev/null and b/textures/nanomage_norm.tga differ
diff --git a/textures/nanomage_reflect.tga b/textures/nanomage_reflect.tga
new file mode 100644 (file)
index 0000000..0baed7e
Binary files /dev/null and b/textures/nanomage_reflect.tga differ
diff --git a/textures/nanomage_shirt.tga b/textures/nanomage_shirt.tga
new file mode 100644 (file)
index 0000000..1665ca5
Binary files /dev/null and b/textures/nanomage_shirt.tga differ
diff --git a/textures/spider.tga b/textures/spider.tga
new file mode 100644 (file)
index 0000000..61215a8
Binary files /dev/null and b/textures/spider.tga differ
diff --git a/textures/spider_gloss.tga b/textures/spider_gloss.tga
new file mode 100644 (file)
index 0000000..cf5a79d
Binary files /dev/null and b/textures/spider_gloss.tga differ
diff --git a/textures/spider_glow.tga b/textures/spider_glow.tga
new file mode 100644 (file)
index 0000000..25cfcf3
Binary files /dev/null and b/textures/spider_glow.tga differ
diff --git a/textures/spider_norm.tga b/textures/spider_norm.tga
new file mode 100644 (file)
index 0000000..0438279
Binary files /dev/null and b/textures/spider_norm.tga differ
diff --git a/textures/spider_reflect.tga b/textures/spider_reflect.tga
new file mode 100644 (file)
index 0000000..6ebe874
Binary files /dev/null and b/textures/spider_reflect.tga differ
diff --git a/textures/spider_shirt.tga b/textures/spider_shirt.tga
new file mode 100644 (file)
index 0000000..c774996
Binary files /dev/null and b/textures/spider_shirt.tga differ
diff --git a/textures/spidertex.tga b/textures/spidertex.tga
deleted file mode 100644 (file)
index c1c40c0..0000000
Binary files a/textures/spidertex.tga and /dev/null differ
diff --git a/textures/spidertex_glow.tga b/textures/spidertex_glow.tga
deleted file mode 100644 (file)
index 8c7d3dc..0000000
Binary files a/textures/spidertex_glow.tga and /dev/null differ
diff --git a/textures/spidertex_pants.tga b/textures/spidertex_pants.tga
deleted file mode 100644 (file)
index 09263af..0000000
Binary files a/textures/spidertex_pants.tga and /dev/null differ
diff --git a/textures/tree.tga b/textures/tree.tga
new file mode 100644 (file)
index 0000000..8fa7816
Binary files /dev/null and b/textures/tree.tga differ
diff --git a/textures/tree_norm.tga b/textures/tree_norm.tga
new file mode 100644 (file)
index 0000000..3bef163
Binary files /dev/null and b/textures/tree_norm.tga differ
diff --git a/textures/tree_spec.tga b/textures/tree_spec.tga
new file mode 100644 (file)
index 0000000..6a44d55
Binary files /dev/null and b/textures/tree_spec.tga differ