]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
check if already in list before pushing entities into the trigger_push_velocity track...
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Wed, 8 Feb 2023 23:20:08 +0000 (00:20 +0100)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Wed, 8 Feb 2023 23:20:08 +0000 (00:20 +0100)
qcsrc/common/mapobjects/trigger/jumppads.qc

index fca91832d2c68f6f71ca994b74a8c2d3dd7ed11d..afbe34504827b773582ed201b37f86758a9e15cc 100644 (file)
@@ -301,8 +301,11 @@ bool jumppad_push(entity this, entity targ, bool is_velocity_pad)
                        {
                                return false; // too many overlapping jump pads
                        }
-                       IL_PUSH(are_pushed, targ);
-                       this.nextthink = time;
+                       if(!IL_CONTAINS(are_pushed, targ))
+                       {
+                               IL_PUSH(are_pushed, targ);
+                               this.nextthink = time;
+                       }
                }
        }