{
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;
+ }
}
}
const int PUSH_SILENT = BIT(1); // not used?
const int PUSH_STATIC = BIT(12);
-const int PUSH_VELOCITY_PLAYERDIR_XY = BIT(0);
-const int PUSH_VELOCITY_ADD_XY = BIT(1);
-const int PUSH_VELOCITY_PLAYERDIR_Z = BIT(2);
-const int PUSH_VELOCITY_ADD_Z = BIT(3);
-const int PUSH_VELOCITY_BIDIRECTIONAL_XY = BIT(4);
-const int PUSH_VELOCITY_BIDIRECTIONAL_Z = BIT(5);
-const int PUSH_VELOCITY_CLAMP_NEGATIVE_ADDS = BIT(6);
+#define PUSH_VELOCITY_PLAYERDIR_XY BIT(0)
+#define PUSH_VELOCITY_ADD_XY BIT(1)
+#define PUSH_VELOCITY_PLAYERDIR_Z BIT(2)
+#define PUSH_VELOCITY_ADD_Z BIT(3)
+#define PUSH_VELOCITY_BIDIRECTIONAL_XY BIT(4)
+#define PUSH_VELOCITY_BIDIRECTIONAL_Z BIT(5)
+#define PUSH_VELOCITY_CLAMP_NEGATIVE_ADDS BIT(6)
IntrusiveList g_jumppads;
STATIC_INIT(g_jumppads) { g_jumppads = IL_NEW(); }
.bool istypefrag;
.float height;
-const int MAX_PUSHED = 16; // maximum amount of jump pads which are allowed to push simultaneously
+// maximum amount of jump pads which are allowed to push simultaneously
+#define MAX_PUSHED 16
+
.entity has_pushed[MAX_PUSHED];
IntrusiveList are_pushed;
STATIC_INIT(are_pushed) { are_pushed = IL_NEW(); }