From: bones_was_here Date: Tue, 17 Jan 2023 04:42:11 +0000 (+1000) Subject: Use correct droptofloor distance for each Quake map format X-Git-Tag: xonotic-v0.8.6~216 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4225b1769a3a1328f9564719a6f363700d6fcbfc;p=xonotic%2Fxonotic-data.pk3dir.git Use correct droptofloor distance for each Quake map format Fixes #2800 --- diff --git a/qcsrc/server/compat/quake3.qc b/qcsrc/server/compat/quake3.qc index 911ab0f81..9333ebfed 100644 --- a/qcsrc/server/compat/quake3.qc +++ b/qcsrc/server/compat/quake3.qc @@ -66,7 +66,7 @@ SPAWNFUNC_Q3(weapon_chaingun, ammo_belt, WEP_HLAC) SPAWNFUNC_Q3(weapon_hmg, ammo_hmg, WEP_HLAC) // Team Arena Nailgun -> Crylink || Quake Nailgun -> Electro -SPAWNFUNC_Q3_COND(weapon_nailgun, ammo_nails, cvar("sv_mapformat_is_quake3"), WEP_CRYLINK, WEP_ELECTRO) +SPAWNFUNC_Q3_COND(weapon_nailgun, ammo_nails, autocvar_sv_mapformat_is_quake3, WEP_CRYLINK, WEP_ELECTRO) // LG -> Electro SPAWNFUNC_Q3(weapon_lightning, ammo_lightning, WEP_ELECTRO) diff --git a/qcsrc/server/items/spawning.qc b/qcsrc/server/items/spawning.qc index bc780da55..a1789e9dc 100644 --- a/qcsrc/server/items/spawning.qc +++ b/qcsrc/server/items/spawning.qc @@ -146,7 +146,7 @@ void Item_SetExpiring(entity item, bool expiring) // Compatibility spawn functions // in Quake this is green armor, in Xonotic maps it is an armor shard -SPAWNFUNC_ITEM_COND(item_armor1, cvar("sv_mapformat_is_quake3"), ITEM_ArmorSmall, ITEM_ArmorMedium) +SPAWNFUNC_ITEM_COND(item_armor1, autocvar_sv_mapformat_is_quake3, ITEM_ArmorSmall, ITEM_ArmorMedium) SPAWNFUNC_ITEM(item_armor25, ITEM_ArmorMega) diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index 18d41827b..cfaec58e3 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -2263,7 +2263,13 @@ void DropToFloor_Handler(entity this) return; } - vector end = this.origin - '0 0 256'; + vector end = this.origin; + if (autocvar_sv_mapformat_is_quake3) + end.z -= 4096; + else if (autocvar_sv_mapformat_is_quake2) + end.z -= 128; + else + end.z -= 256; // Quake, QuakeWorld // NOTE: SV_NudgeOutOfSolid is used in the engine here if(autocvar_sv_gameplayfix_droptofloorstartsolid_nudgetocorrect) diff --git a/qcsrc/server/world.qh b/qcsrc/server/world.qh index 271f394ad..06c5f5a2b 100644 --- a/qcsrc/server/world.qh +++ b/qcsrc/server/world.qh @@ -30,6 +30,9 @@ float autocvar_timelimit_suddendeath; bool autocvar_sv_gameplayfix_droptofloorstartsolid; bool autocvar_sv_gameplayfix_droptofloorstartsolid_nudgetocorrect; +bool autocvar_sv_mapformat_is_quake3; +bool autocvar_sv_mapformat_is_quake2; + float checkrules_equality; float checkrules_suddendeathwarning; float checkrules_suddendeathend;