]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/ecs/systems/physics.qc
Partially re-implement the .teleport_time field in player physics to prevent getting...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / ecs / systems / physics.qc
index 38d35d4b37a9b95bd56de2f516bced5ad4f05e91..c7fc88dc93593159e524a4e9920b32481362fdf2 100644 (file)
@@ -90,8 +90,9 @@ void sys_phys_update(entity this, float dt)
        if (this.flags & FL_WATERJUMP) {
                this.velocity_x = this.movedir.x;
                this.velocity_y = this.movedir.y;
-               if (this.waterlevel == WATERLEVEL_NONE) {
+               if (time > this.teleport_time || this.waterlevel == WATERLEVEL_NONE) {
                        this.flags &= ~FL_WATERJUMP;
+                       this.teleport_time = 0;
                }
        } else if (MUTATOR_CALLHOOK(PM_Physics, this, maxspeed_mod, dt)) {
                // handled