]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 b7418298cbe7f05d45392770e5e2b3a9ed7bb4b9..88997a4715d84a93389435c8a9c420ed03cb1bab 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;