From 4b6ab484da23438ad2afb0fc75a739400907cbb8 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 13 Sep 2009 23:52:48 +0000 Subject: [PATCH] added cvar sv_gameplayfix_noairborncorpse_allowsuspendeditems git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9190 d7cf8633-e32d-0410-b094-e92efae38249 --- server.h | 1 + sv_main.c | 4 +++- sv_phys.c | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server.h b/server.h index 15bff56c..e2f02618 100644 --- a/server.h +++ b/server.h @@ -417,6 +417,7 @@ extern cvar_t sv_gameplayfix_grenadebouncedownslopes; extern cvar_t sv_gameplayfix_multiplethinksperframe; extern cvar_t sv_gameplayfix_slidemoveprojectiles; extern cvar_t sv_gameplayfix_noairborncorpse; +extern cvar_t sv_gameplayfix_noairborncorpse_allowsuspendeditems; extern cvar_t sv_gameplayfix_setmodelrealbox; extern cvar_t sv_gameplayfix_stepdown; extern cvar_t sv_gameplayfix_stepwhilejumping; diff --git a/sv_main.c b/sv_main.c index fc226e97..ada40db7 100644 --- a/sv_main.c +++ b/sv_main.c @@ -92,7 +92,8 @@ cvar_t sv_gameplayfix_findradiusdistancetobox = {0, "sv_gameplayfix_findradiusdi cvar_t sv_gameplayfix_grenadebouncedownslopes = {0, "sv_gameplayfix_grenadebouncedownslopes", "1", "prevents MOVETYPE_BOUNCE (grenades) from getting stuck when fired down a downward sloping surface"}; cvar_t sv_gameplayfix_multiplethinksperframe = {0, "sv_gameplayfix_multiplethinksperframe", "1", "allows entities to think more often than the server framerate, primarily useful for very high fire rate weapons"}; cvar_t sv_gameplayfix_slidemoveprojectiles = {0, "sv_gameplayfix_slidemoveprojectiles", "1", "allows MOVETYPE_FLY/FLYMISSILE/TOSS/BOUNCE/BOUNCEMISSILE entities to finish their move in a frame even if they hit something, fixes 'gravity accumulation' bug for grenades on steep slopes"}; -cvar_t sv_gameplayfix_noairborncorpse = {0, "sv_gameplayfix_noairborncorpse", "1", "causes entities (corpses) sitting ontop of moving entities (players) to fall when the moving entity (player) is no longer supporting them"}; +cvar_t sv_gameplayfix_noairborncorpse = {0, "sv_gameplayfix_noairborncorpse", "1", "causes entities (corpses, items, etc) sitting ontop of moving entities (players) to fall when the moving entity (player) is no longer supporting them"}; +cvar_t sv_gameplayfix_noairborncorpse_allowsuspendeditems = {0, "sv_gameplayfix_noairborncorpse_allowsuspendeditems", "1", "causes entities sitting ontop of objects that are instantaneously remove to float in midair (special hack to allow a common level design trick for floating items)"}; cvar_t sv_gameplayfix_setmodelrealbox = {0, "sv_gameplayfix_setmodelrealbox", "1", "fixes a bug in Quake that made setmodel always set the entity box to ('-16 -16 -16', '16 16 16') rather than properly checking the model box, breaks some poorly coded mods"}; cvar_t sv_gameplayfix_stepdown = {0, "sv_gameplayfix_stepdown", "0", "attempts to step down stairs, not just up them (prevents the familiar thud..thud..thud.. when running down stairs and slopes)"}; cvar_t sv_gameplayfix_stepwhilejumping = {0, "sv_gameplayfix_stepwhilejumping", "1", "applies step-up onto a ledge even while airborn, useful if you would otherwise just-miss the floor when running across small areas with gaps (for instance running across the moving platforms in dm2, or jumping to the megahealth and red armor in dm2 rather than using the bridge)"}; @@ -380,6 +381,7 @@ void SV_Init (void) Cvar_RegisterVariable (&sv_gameplayfix_multiplethinksperframe); Cvar_RegisterVariable (&sv_gameplayfix_slidemoveprojectiles); Cvar_RegisterVariable (&sv_gameplayfix_noairborncorpse); + Cvar_RegisterVariable (&sv_gameplayfix_noairborncorpse_allowsuspendeditems); Cvar_RegisterVariable (&sv_gameplayfix_setmodelrealbox); Cvar_RegisterVariable (&sv_gameplayfix_stepdown); Cvar_RegisterVariable (&sv_gameplayfix_stepwhilejumping); diff --git a/sv_phys.c b/sv_phys.c index d46cef45..24b17ef7 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -2035,7 +2035,8 @@ void SV_Physics_Toss (prvm_edict_t *ent) // and groundentity is now freed, set groundentity to 0 (world) // which leaves it suspended in the air ent->fields.server->groundentity = 0; - return; + if (sv_gameplayfix_noairborncorpse_allowsuspendeditems.integer) + return; } } ent->priv.server->suspendedinairflag = false; -- 2.39.2