From: bones_was_here Date: Tue, 6 Aug 2024 10:19:40 +0000 (+1000) Subject: Q1BSP: improve droptofloor compatibility with Quake progs X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b69d88ef2cf20ccbe0043107e3ee9aa361145a2f;p=xonotic%2Fxonotic-data.pk3dir.git Q1BSP: improve droptofloor compatibility with Quake progs Signed-off-by: bones_was_here --- diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index effc4d51d..930a3040c 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -2391,6 +2391,13 @@ void DropToFloor_QC(entity this) else if (nudgeresult > 0) LOG_WARNF("DropToFloor_QC at \"%v\": FIXED badly placed entity \"%s\" before drop", this.origin, this.classname); } + else if (!autocvar_sv_mapformat_is_quake3 && !autocvar_sv_mapformat_is_quake2) // Quake + { + if (this.flags & FL_ITEM) + this.origin.z += 6; + else + this.origin.z += 1; // monsters 1, misc_explobox 2 but we don't support those currently + } vector end = this.origin; if (autocvar_sv_mapformat_is_quake3) @@ -2403,10 +2410,15 @@ void DropToFloor_QC(entity this) if (!autocvar_sv_mapformat_is_quake3 && !autocvar_sv_mapformat_is_quake2 && (trace_allsolid || trace_fraction == 1)) // Quake { - // Quake games just delete badly placed entities... - LOG_WARNF("DropToFloor_QC at \"%v\" (Quake compat): DELETING badly placed entity \"%s\"", this.origin, this.classname); - delete(this); - return; + // Quake games just delete badly placed items (and misc_explobox)... + if (this.flags & FL_ITEM) + { + LOG_WARNF("DropToFloor_QC at \"%v\" (Quake compat): DELETING badly placed item \"%s\"", this.origin, this.classname); + delete(this); + return; + } + // ...not monsters though... + LOG_WARNF("DropToFloor_QC at \"%v\" (Quake compat): badly placed entity \"%s\"", this.origin, this.classname); } else if ((Q3COMPAT_COMMON || autocvar_sv_mapformat_is_quake2) && trace_startsolid) // Q3, Q2 {