]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix captureshield texture, also make entrap affect monsters
authorMario <mario@smbclan.net>
Sun, 12 Jun 2016 18:29:24 +0000 (04:29 +1000)
committerMario <mario@smbclan.net>
Sun, 12 Jun 2016 18:29:24 +0000 (04:29 +1000)
models/ctf/shield.md3_0.skin
qcsrc/common/mutators/mutator/nades/nades.qc

index 754fce734a39272af4803d0a375dc0a814fe36ea..113f275d4bc320c2b6c66ff1819358623577c09b 100644 (file)
@@ -1 +1 @@
-shield,shield
+shield,ons_shield
index 65387f5adc9bd0bafc8e5aee181f786aa4897e17..e3fb4b68bc5b9cac250fc181b9f37b5a3063044b 100644 (file)
@@ -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);