func_door: Calculate pos2 after initialising this.lip 609/head
authorFreddy <schro.sb@gmail.com>
Sat, 6 Oct 2018 19:56:05 +0000 (19:56 +0000)
committerFreddy <schro.sb@gmail.com>
Sat, 6 Oct 2018 19:56:05 +0000 (19:56 +0000)
qcsrc/common/mapobjects/func/door.qc

index b741829..88997a4 100644 (file)
@@ -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;