]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Set the entity's origin to the trace position before moving it out of solid
authorMario <mario.mario@y7mail.com>
Wed, 23 Nov 2022 00:41:18 +0000 (10:41 +1000)
committerMario <mario.mario@y7mail.com>
Wed, 23 Nov 2022 00:41:18 +0000 (10:41 +1000)
qcsrc/server/world.qc

index 4cba5f10287f0c93b7382a671d714b102b580130..fd3b5b08dc13ab0e0e07a3ebf28cefbf73856dbb 100644 (file)
@@ -2279,9 +2279,9 @@ void DropToFloor_Handler(entity this)
                else if(trace_fraction < 1)
                {
                        LOG_DEBUGF("DropToFloor_Handler: %v fixed badly placed entity", this.origin);
+                       setorigin(this, trace_endpos);
                        if(autocvar_sv_gameplayfix_droptofloorstartsolid_nudgetocorrect)
                                move_out_of_solid(this);
-                       setorigin(this, trace_endpos);
                        SET_ONGROUND(this);
                        this.groundentity = trace_ent;
                        // if support is destroyed, keep suspended (gross hack for floating items in various maps)