From: Mario Date: Sat, 27 Jan 2018 15:31:23 +0000 (+1000) Subject: Don't allow free movement while on ladders X-Git-Tag: xonotic-v0.8.5~2367 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ba630ee9734db82b74efe7df772e76276d9e0d12;p=xonotic%2Fxonotic-data.pk3dir.git Don't allow free movement while on ladders --- diff --git a/qcsrc/common/viewloc.qc b/qcsrc/common/viewloc.qc index 50565c95a..e4e5ba991 100644 --- a/qcsrc/common/viewloc.qc +++ b/qcsrc/common/viewloc.qc @@ -19,7 +19,7 @@ void viewloc_PlayerPhysics(entity this) vector old_movement = PHYS_CS(this).movement; PHYS_CS(this).movement_x = old_movement_y; - if(this.viewloc.spawnflags & VIEWLOC_FREEMOVE) + if((this.viewloc.spawnflags & VIEWLOC_FREEMOVE) && !(time < this.ladder_time)) PHYS_CS(this).movement_y = old_movement_x; else PHYS_CS(this).movement_y = 0; @@ -30,7 +30,7 @@ void viewloc_PlayerPhysics(entity this) vector forward = vectoangles(normalize(level_end - level_start)); vector backward = vectoangles(normalize(level_start - level_end)); - if((this.viewloc.spawnflags & VIEWLOC_FREEMOVE) && this.angles_y < 0) + if((this.viewloc.spawnflags & VIEWLOC_FREEMOVE) && this.angles_y < 0 && !(time < this.ladder_time)) PHYS_CS(this).movement_y = -PHYS_CS(this).movement_y; if(this.viewloc.spawnflags & VIEWLOC_FREEAIM)