]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
items: remove blind nudging of items during spawn
authorbones_was_here <bones_was_here@xonotic.au>
Sat, 15 Jul 2023 11:29:40 +0000 (21:29 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 14 Mar 2024 22:14:46 +0000 (08:14 +1000)
In some cases this isn't enough to fix a bad placement, in rare cases it
can cause a bad placement because it doesn't consider the brushwork
near the item.

It's replaced by smart nudging (DP_QC_NUDGEOUTOFSOLID).

qcsrc/server/items/items.qc

index fe83afbda38e6b03b5bdbadeaf14a0e913f5fe41..f4853c5c7203c9d36c57ebcce6d2520c1b80a310 100644 (file)
@@ -1110,8 +1110,6 @@ void StartItem(entity this, entity def)
                // do item filtering according to game mode and other things
                if (this.noalign <= 0)
                {
-                       // first nudge it off the floor a little bit to avoid math errors
-                       setorigin(this, this.origin + '0 0 1');
                        // note droptofloor returns false if stuck/or would fall too far
                        if (!this.noalign)
                                droptofloor(this);