From: Freddy Date: Sat, 6 Oct 2018 19:56:05 +0000 (+0000) Subject: func_door: Calculate pos2 after initialising this.lip X-Git-Tag: xonotic-v0.8.5~1791^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F609%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git func_door: Calculate pos2 after initialising this.lip --- 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;