]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
If the entity cannot be unstuck when dropping it to the floor, mark it as on ground...
authorMario <mario.mario@y7mail.com>
Mon, 28 Nov 2022 02:59:56 +0000 (12:59 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 28 Nov 2022 02:59:56 +0000 (12:59 +1000)
qcsrc/server/world.qc

index fd3b5b08dc13ab0e0e07a3ebf28cefbf73856dbb..c61147842155d59359d566e08981a424cd01f4e9 100644 (file)
@@ -2298,6 +2298,12 @@ void DropToFloor_Handler(entity this)
                        // if support is destroyed, keep suspended (gross hack for floating items in various maps)
                        this.move_suspendedinair = true;
                }
+               else
+               {
+                       // if we can't get the entity out of solid, mark it as on ground so physics doesn't attempt to drop it
+                       // hacky workaround for #2774
+                       SET_ONGROUND(this);
+               }
        }
        this.dropped_origin = this.origin;
 }