From: Mario Date: Thu, 2 Jun 2022 01:32:31 +0000 (+1000) Subject: Prevent monsters from attacking when the match is stopped, rename shambler sounds... X-Git-Tag: xonotic-v0.8.5~7^2~1^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e4512f71c1f84e16a1c630a4067225016fad8fe9;p=xonotic%2Fxonotic-data.pk3dir.git Prevent monsters from attacking when the match is stopped, rename shambler sounds to golem, allow customising the maximum range a mage can teleport to players from --- diff --git a/models/monsters/golem.dpm_0.sounds b/models/monsters/golem.dpm_0.sounds index 7e16968e2..6486da7ee 100644 --- a/models/monsters/golem.dpm_0.sounds +++ b/models/monsters/golem.dpm_0.sounds @@ -1,8 +1,8 @@ -//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 +//TAG: golem +//death sound/monsters/golem/death 0 +sight sound/monsters/golem/sight 0 +//ranged sound/monsters/golem/ranged 0 +//melee sound/monsters/golem/melee 0 +//pain sound/monsters/golem/pain 0 +//spawn sound/monsters/golem/spawn 0 +idle sound/monsters/golem/idle 2 diff --git a/qcsrc/common/monsters/monster/mage.qc b/qcsrc/common/monsters/monster/mage.qc index ccdc0223f..22cb9fef9 100644 --- a/qcsrc/common/monsters/monster/mage.qc +++ b/qcsrc/common/monsters/monster/mage.qc @@ -142,7 +142,7 @@ void M_Mage_Attack_Spike_Touch(entity this, entity toucher) // copied from W_Seeker_Think void M_Mage_Attack_Spike_Think(entity this) { - if (time > this.ltime || (this.enemy && GetResource(this.enemy, RES_HEALTH) <= 0) || GetResource(this.owner, RES_HEALTH) <= 0) { + if (time > this.ltime || (this.enemy && GetResource(this.enemy, RES_HEALTH) <= 0) || !this.owner || GetResource(this.owner, RES_HEALTH) <= 0) { this.projectiledeathtype |= HITTYPE_SPLASH; M_Mage_Attack_Spike_Explode(this, NULL); } @@ -298,7 +298,7 @@ void M_Mage_Attack_Push(entity this) void M_Mage_Attack_Teleport(entity this, entity targ) { if(!targ) return; - if(vdist(targ.origin - this.origin, >, 1500)) return; + if(vdist(targ.origin - this.origin, >, autocvar_g_monster_mage_attack_teleport_random_range)) return; if(autocvar_g_monster_mage_attack_teleport_random && random() <= autocvar_g_monster_mage_attack_teleport_random) { diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 244652ef9..483f6a1ac 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -452,6 +452,7 @@ void Monster_Attack_Check(entity this, entity targ, .entity weaponentity) if((!this || !targ) || (!this.monster_attackfunc) + || (game_stopped) || (time < this.attack_finished_single[slot]) || ((autocvar_g_monsters_target_infront || (this.spawnflags & MONSTERFLAG_INFRONT)) && !monster_facing(this, targ)) ) { return; } diff --git a/sound/monsters/golem/idle1.wav b/sound/monsters/golem/idle1.wav new file mode 100644 index 000000000..bc0f25609 Binary files /dev/null and b/sound/monsters/golem/idle1.wav differ diff --git a/sound/monsters/golem/idle2.wav b/sound/monsters/golem/idle2.wav new file mode 100644 index 000000000..58842b87a Binary files /dev/null and b/sound/monsters/golem/idle2.wav differ diff --git a/sound/monsters/golem/sight.wav b/sound/monsters/golem/sight.wav new file mode 100644 index 000000000..8b75efd23 Binary files /dev/null and b/sound/monsters/golem/sight.wav differ diff --git a/sound/monsters/shambler/idle1.wav b/sound/monsters/shambler/idle1.wav deleted file mode 100644 index bc0f25609..000000000 Binary files a/sound/monsters/shambler/idle1.wav and /dev/null differ diff --git a/sound/monsters/shambler/idle2.wav b/sound/monsters/shambler/idle2.wav deleted file mode 100644 index 58842b87a..000000000 Binary files a/sound/monsters/shambler/idle2.wav and /dev/null differ diff --git a/sound/monsters/shambler/sight.wav b/sound/monsters/shambler/sight.wav deleted file mode 100644 index 8b75efd23..000000000 Binary files a/sound/monsters/shambler/sight.wav and /dev/null differ diff --git a/sound/monsters/troll/death1.wav b/sound/monsters/troll/death1.wav deleted file mode 100644 index 211656ad8..000000000 Binary files a/sound/monsters/troll/death1.wav and /dev/null differ diff --git a/sound/monsters/troll/death2.wav b/sound/monsters/troll/death2.wav deleted file mode 100644 index bd6882637..000000000 Binary files a/sound/monsters/troll/death2.wav and /dev/null differ diff --git a/sound/monsters/troll/death3.wav b/sound/monsters/troll/death3.wav deleted file mode 100644 index 09608f53f..000000000 Binary files a/sound/monsters/troll/death3.wav and /dev/null differ diff --git a/sound/monsters/troll/idle1.wav b/sound/monsters/troll/idle1.wav deleted file mode 100644 index cc67c222f..000000000 Binary files a/sound/monsters/troll/idle1.wav and /dev/null differ diff --git a/sound/monsters/troll/idle2.wav b/sound/monsters/troll/idle2.wav deleted file mode 100644 index 478913d6a..000000000 Binary files a/sound/monsters/troll/idle2.wav and /dev/null differ diff --git a/sound/monsters/troll/melee.wav b/sound/monsters/troll/melee.wav deleted file mode 100644 index cc67c222f..000000000 Binary files a/sound/monsters/troll/melee.wav and /dev/null differ diff --git a/sound/monsters/troll/pain1.wav b/sound/monsters/troll/pain1.wav deleted file mode 100644 index 328dafc55..000000000 Binary files a/sound/monsters/troll/pain1.wav and /dev/null differ diff --git a/sound/monsters/troll/pain2.wav b/sound/monsters/troll/pain2.wav deleted file mode 100644 index 2c056bdcf..000000000 Binary files a/sound/monsters/troll/pain2.wav and /dev/null differ diff --git a/sound/monsters/troll/sight.wav b/sound/monsters/troll/sight.wav deleted file mode 100644 index 85e5682fc..000000000 Binary files a/sound/monsters/troll/sight.wav and /dev/null differ