+ /* Prior to sv_legacy_bbox_expand 0, both droptofloor and nudgeoutofsolid were done for items
+ * using box '-16 -16 0' '16 16 48' (without the FL_ITEM expansion applied),
+ * which often resulted in bboxes partially in solids once expansion was applied.
+ * We don't want bboxes in solids (bad for gameplay and culling),
+ * but we also don't want items to land on a "skirting board" or the base of a sloping wall.
+ * For initial nudgeoutofsolid and droptofloor stages we use a small box
+ * so they fall as far and in the same place as they traditionally would,
+ * then we nudge the full size box out of solid, in a direction appropriate for the plane(s).
+ */
+ vector saved_mins = this.mins; // gmqcc's used-uninitialized check doesn't handle
+ vector saved_maxs = this.maxs; // making these assignments FL_ITEM conditional.
+ if (this.flags & FL_ITEM)
+ {
+ // Using the Q3 bbox for best compatibility with all maps, except...
+ this.mins.x = -15;
+ this.mins.y = -15;
+ this.maxs.x = 15;
+ this.maxs.y = 15;
+ this.maxs.z = this.mins.z + 30; // ...Nex, Xon and Quake use a different vertical offset, see also: StartItem()
+ }
+
+ /* NOTE: sv_gameplayfix_droptofloorstartsolid_nudgetocorrect isn't checked, so it won't need to be networked to CSQC.
+ * It was enabled by default in all Xonotic releases and in Nexuiz, so now certain maps depend on it.
+ * Example: on erbium 0.8.6 the shards @ crylink are too low (in collision with the floor),
+ * so without this those fall through the floor.
+ * Q3, Q2 and Quake don't try to move items out of solid.
+ */
+ if(!Q3COMPAT_COMMON && autocvar_sv_mapformat_is_quake3) // Xonotic, Nexuiz
+ {
+ nudgeresult = nudgeoutofsolid(this);
+ if (!nudgeresult)
+ LOG_WARNF("DropToFloor_QC at \"%v\": COULD NOT FIX badly placed entity \"%s\" before drop", this.origin, this.classname);
+ else if (nudgeresult > 0)
+ LOG_WARNF("DropToFloor_QC at \"%v\": FIXED badly placed entity \"%s\" before drop", this.origin, this.classname);
+ }
+