From ed58bc3fc0da3aeaf5421ee59bc9bd83e3838cdd Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 13 Jun 2016 04:29:24 +1000 Subject: [PATCH] Fix captureshield texture, also make entrap affect monsters --- models/ctf/shield.md3_0.skin | 2 +- qcsrc/common/mutators/mutator/nades/nades.qc | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/models/ctf/shield.md3_0.skin b/models/ctf/shield.md3_0.skin index 754fce734..113f275d4 100644 --- a/models/ctf/shield.md3_0.skin +++ b/models/ctf/shield.md3_0.skin @@ -1 +1 @@ -shield,shield +shield,ons_shield diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 65387f5ad..e3fb4b68b 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -584,7 +584,7 @@ void nade_entrap_touch(entity this) #endif } - if ( IS_REAL_CLIENT(other) || IS_VEHICLE(other) ) + if ( IS_REAL_CLIENT(other) || IS_VEHICLE(other) || IS_MONSTER(other) ) { entity show_tint = (IS_VEHICLE(other)) ? other.owner : other; STAT(ENTRAP_ORB, show_tint) = time + 0.1; @@ -1320,6 +1320,17 @@ MUTATOR_HOOKFUNCTION(nades, PlayerPhysics) } } +MUTATOR_HOOKFUNCTION(nades, MonsterMove) +{ + entity mon = M_ARGV(0, entity); + + if (STAT(ENTRAP_ORB, mon) > time) + { + M_ARGV(1, float) *= autocvar_g_nades_entrap_speed; // run speed + M_ARGV(2, float) *= autocvar_g_nades_entrap_speed; // walk speed + } +} + MUTATOR_HOOKFUNCTION(nades, PlayerSpawn) { entity player = M_ARGV(0, entity); -- 2.39.2