From: bones_was_here Date: Tue, 17 Jan 2023 05:09:04 +0000 (+1000) Subject: Use correct droptofloor distance for each Quake map format X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eb4b5704b95c3c5184afead9925be8c1602f870b;p=xonotic%2Fdarkplaces.git Use correct droptofloor distance for each Quake map format Signed-off-by: bones_was_here --- diff --git a/clvm_cmds.c b/clvm_cmds.c index 2a2cefa6..1f394845 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -547,7 +547,12 @@ static void VM_CL_droptofloor (prvm_prog_t *prog) VectorCopy(PRVM_clientedictvector(ent, mins), mins); VectorCopy(PRVM_clientedictvector(ent, maxs), maxs); VectorCopy(PRVM_clientedictvector(ent, origin), end); - end[2] -= 256; + if (cl.worldmodel->brush.isq3bsp) + end[2] -= 4096; + else if (cl.worldmodel->brush.isq2bsp) + end[2] -= 128; + else + end[2] -= 256; // Quake, QuakeWorld trace = CL_TraceBox(start, mins, maxs, end, MOVE_NORMAL, ent, CL_GenericHitSuperContentsMask(ent), 0, 0, collision_extendmovelength.value, true, true, NULL, true); diff --git a/sv_main.c b/sv_main.c index 891e8023..1c3c6f81 100644 --- a/sv_main.c +++ b/sv_main.c @@ -205,7 +205,7 @@ cvar_t sv_autodemo_perclient_discardable = {CF_SERVER | CF_ARCHIVE, "sv_autodemo cvar_t halflifebsp = {CF_SERVER, "halflifebsp", "0", "indicates the current map is hlbsp format (useful to know because of different bounding box sizes)"}; cvar_t sv_mapformat_is_quake2 = {CF_SERVER, "sv_mapformat_is_quake2", "0", "indicates the current map is q2bsp format (useful to know because of different entity behaviors, .frame on submodels and other things)"}; -cvar_t sv_mapformat_is_quake3 = {CF_SERVER, "sv_mapformat_is_quake3", "0", "indicates the current map is q2bsp format (useful to know because of different entity behaviors)"}; +cvar_t sv_mapformat_is_quake3 = {CF_SERVER, "sv_mapformat_is_quake3", "0", "indicates the current map is q3bsp format (useful to know because of different entity behaviors)"}; cvar_t sv_writepicture_quality = {CF_SERVER | CF_ARCHIVE, "sv_writepicture_quality", "10", "WritePicture quality offset (higher means better quality, but slower)"}; diff --git a/svvm_cmds.c b/svvm_cmds.c index 672ff70d..a884d0f1 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -1158,7 +1158,12 @@ static void VM_SV_droptofloor(prvm_prog_t *prog) } VectorCopy (PRVM_serveredictvector(ent, origin), end); - end[2] -= 256; + if (sv.worldmodel->brush.isq3bsp) + end[2] -= 4096; + else if (sv.worldmodel->brush.isq2bsp) + end[2] -= 128; + else + end[2] -= 256; // Quake, QuakeWorld if (sv_gameplayfix_droptofloorstartsolid_nudgetocorrect.integer) SV_NudgeOutOfSolid(ent);