From 6c4c29a8b5d598426a8b0bded18364163ce6810c Mon Sep 17 00:00:00 2001 From: Freddy Date: Sat, 6 Oct 2018 19:56:05 +0000 Subject: [PATCH] func_door: Calculate pos2 after initialising this.lip --- qcsrc/common/mapobjects/func/door.qc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/mapobjects/func/door.qc b/qcsrc/common/mapobjects/func/door.qc index b7418298c..88997a471 100644 --- a/qcsrc/common/mapobjects/func/door.qc +++ b/qcsrc/common/mapobjects/func/door.qc @@ -715,9 +715,6 @@ spawnfunc(func_door) setblocked(this, door_blocked); this.use = door_use; - this.pos1 = this.origin; - this.pos2 = this.pos1 + this.movedir*(fabs(this.movedir*this.size) - this.lip); - if(this.spawnflags & DOOR_NONSOLID) this.solid = SOLID_NOT; @@ -728,6 +725,9 @@ spawnfunc(func_door) door_init_shared(this); + this.pos1 = this.origin; + this.pos2 = this.pos1 + this.movedir*(fabs(this.movedir*this.size) - this.lip); + if (!this.speed) { this.speed = 100; -- 2.39.2