From: bones_was_here Date: Thu, 18 May 2023 13:13:20 +0000 (+1000) Subject: Remove legacy Quake bbox expansion: map entities X-Git-Tag: xonotic-v0.8.6~93^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5f32ac7b184434178f0b2c501ade8c86574e6c48;p=xonotic%2Fxonotic-data.pk3dir.git Remove legacy Quake bbox expansion: map entities This gives QC full control of bboxes and makes SVQC and CSQC behaviour consistent. Adds a Small item bbox which is the size most items had previously if expansion wasn't counted. Changes powerup, buff and mega pickups to have the same height. This will make it cheaper to network that information to clients. Groups all the sv_gameplayfix cvars together in xonotic-server.cfg. Removes duplication of the item mins/maxs definition and box + '1 1 1' code. --- diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 18e4e6100..e3be1e1d0 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -72,7 +72,7 @@ const int FL_INWATER = 16; /* BIT(3) */ // for enter / leave water splash const int FL_MONSTER = 32; /* BIT(4) */ const int FL_GODMODE = 64; /* BIT(5) */ // player cheat const int FL_NOTARGET = 128; /* BIT(6) */ // player cheat -const int FL_ITEM = 256; /* BIT(7) */ // extra wide size for bonus items +const int FL_ITEM = 256; /* BIT(7) */ // extra wide size for bonus items IF sv_legacy_bbox_expand is 1 const int FL_ONGROUND = 512; /* BIT(8) */ // standing on something const int FL_PARTIALGROUND = 1024; /* BIT(9) */ // not all corners are valid const int FL_WATERJUMP = 2048; /* BIT(10) */ // player jumping out of water diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh index adb061809..577dbf3c5 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh @@ -6,8 +6,8 @@ #include CLASS(Flag, Pickup) - ATTRIB(Flag, m_mins, vector, (PL_MIN_CONST + '0 0 -13') * 1.4); // scaling be damned - ATTRIB(Flag, m_maxs, vector, (PL_MAX_CONST + '0 0 -13') * 1.4); + ATTRIB(Flag, m_mins, vector, (PL_MIN_CONST + '-10 -10 -13') * 1.4); // scaling be damned + ATTRIB(Flag, m_maxs, vector, (PL_MAX_CONST + '10 10 -13') * 1.4); // 0.8.5 used '0 0 -13' with sv_legacy_bbox_expand 1 ENDCLASS(Flag) Flag CTF_FLAG; void ctf_Initialize(); diff --git a/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc b/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc index a82be5a3c..af17a1498 100644 --- a/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc +++ b/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc @@ -297,7 +297,7 @@ void dom_controlpoint_setup(entity this) if(!this.flags & FL_ITEM) IL_PUSH(g_items, this); this.flags = FL_ITEM; - setsize(this, '-32 -32 -32', '32 32 32'); + setsize(this, '-48 -48 -32', '48 48 32'); // 0.8.5 used '-32 -32 -32', '32 32 32' with sv_legacy_bbox_expand 1 setorigin(this, this.origin + '0 0 20'); droptofloor(this); diff --git a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc index 8396c1e61..ac0e40774 100644 --- a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc +++ b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc @@ -45,8 +45,8 @@ const float KH_KEY_XYSPEED = 45; #endif const float KH_KEY_WP_ZSHIFT = 20; -const vector KH_KEY_MIN = '-10 -10 -46'; -const vector KH_KEY_MAX = '10 10 3'; +const vector KH_KEY_MIN = '-25 -25 -46'; // 0.8.5 used '-10 -10 -46' with sv_legacy_bbox_expand 1 +const vector KH_KEY_MAX = '25 25 3'; // 0.8.5 used '10 10 3' with sv_legacy_bbox_expand 1 const float KH_KEY_BRIGHTNESS = 2; bool kh_no_radar_circles; diff --git a/qcsrc/common/items/item.qh b/qcsrc/common/items/item.qh index 350421465..a4fea71ad 100644 --- a/qcsrc/common/items/item.qh +++ b/qcsrc/common/items/item.qh @@ -58,6 +58,14 @@ const int ITS_ALLOWFB = BIT(4); const int ITS_ALLOWSI = BIT(5); const int ITS_GLOW = BIT(6); +// item bboxes for sv_legacy_bbox_expand 0 +// Small, Default and Large (large maxs are used with default mins) +const vector ITEM_S_MINS = '-16 -16 0'; // smaller items now get the same "unexpanded" bbox that normal items +const vector ITEM_S_MAXS = '16 16 48'; // had during MoveOutOfSolid and DropToFloor (before expansion) in 0.8.5 +const vector ITEM_D_MINS = '-30 -30 0'; // 0.8.5 set '-16 -16 0' then DP subtracted '15 15 1' but NetRadiant used '-30 -30 0' +const vector ITEM_D_MAXS = '30 30 48'; // 0.8.5 set '16 16 48' then DP added '15 15 1' but NetRadiant used '30 30 32' +const vector ITEM_L_MAXS = '30 30 70'; // 0.8.5 set '16 16 80' for powerups, '16 16 70' for megas, '16 16 60' for buffs + .float fade_start; .float fade_end; diff --git a/qcsrc/common/items/item/armor.qh b/qcsrc/common/items/item/armor.qh index f8cabaa05..d487d1e12 100644 --- a/qcsrc/common/items/item/armor.qh +++ b/qcsrc/common/items/item/armor.qh @@ -3,8 +3,6 @@ #include "pickup.qh" CLASS(Armor, Pickup) #ifdef SVQC - ATTRIB(Armor, m_mins, vector, '-16 -16 0'); - ATTRIB(Armor, m_maxs, vector, '16 16 48'); ATTRIB(Armor, m_pickupevalfunc, float(entity player, entity item), healtharmor_pickupevalfunc); ATTRIB(Armor, m_botvalue, int, 5000); #endif @@ -46,6 +44,8 @@ REGISTER_ITEM(ArmorSmall, Armor) { this.m_icon = "armor"; // compatible with Xonotic v0.8.2 or lower #endif #ifdef SVQC + this.m_mins = ITEM_S_MINS; + this.m_maxs = ITEM_S_MAXS; this.m_itemid = IT_RESOURCE; this.m_respawntime = GET(g_pickup_respawntime_short); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short); @@ -88,6 +88,8 @@ REGISTER_ITEM(ArmorMedium, Armor) { this.m_icon = "armor"; // compatible with Xonotic v0.8.2 or lower #endif #ifdef SVQC + this.m_mins = ITEM_S_MINS; + this.m_maxs = ITEM_S_MAXS; this.m_itemid = IT_RESOURCE; this.m_respawntime = GET(g_pickup_respawntime_medium); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_medium); @@ -177,7 +179,7 @@ REGISTER_ITEM(ArmorMega, Armor) { this.m_waypoint = _("Mega armor"); this.m_waypointblink = 2; #ifdef SVQC - this.m_maxs = '16 16 70'; + this.m_maxs = ITEM_L_MAXS; this.m_itemid = IT_RESOURCE; this.m_respawntime = GET(g_pickup_respawntime_long); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long); diff --git a/qcsrc/common/items/item/health.qh b/qcsrc/common/items/item/health.qh index ca94651aa..2ac1f8e13 100644 --- a/qcsrc/common/items/item/health.qh +++ b/qcsrc/common/items/item/health.qh @@ -3,8 +3,6 @@ #include "pickup.qh" CLASS(Health, Pickup) #ifdef SVQC - ATTRIB(Health, m_mins, vector, '-16 -16 0'); - ATTRIB(Health, m_maxs, vector, '16 16 48'); ATTRIB(Health, m_pickupevalfunc, float(entity player, entity item), healtharmor_pickupevalfunc); ATTRIB(Health, m_botvalue, int, 5000); #endif @@ -46,6 +44,8 @@ REGISTER_ITEM(HealthSmall, Health) { this.m_icon = "health"; // compatible with Xonotic v0.8.2 or lower #endif #ifdef SVQC + this.m_mins = ITEM_S_MINS; + this.m_maxs = ITEM_S_MAXS; this.m_itemid = IT_RESOURCE; this.m_respawntime = GET(g_pickup_respawntime_short); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short); @@ -88,6 +88,8 @@ REGISTER_ITEM(HealthMedium, Health) { this.m_icon = "health"; // compatible with Xonotic v0.8.2 or lower #endif #ifdef SVQC + this.m_mins = ITEM_S_MINS; + this.m_maxs = ITEM_S_MAXS; this.m_itemid = IT_RESOURCE; this.m_respawntime = GET(g_pickup_respawntime_short); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short); @@ -177,7 +179,7 @@ REGISTER_ITEM(HealthMega, Health) { this.m_waypoint = _("Mega health"); this.m_waypointblink = 2; #ifdef SVQC - this.m_maxs = '16 16 70'; + this.m_maxs = ITEM_L_MAXS; this.m_itemid = IT_RESOURCE; this.m_respawntime = GET(g_pickup_respawntime_long); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long); diff --git a/qcsrc/common/items/item/pickup.qh b/qcsrc/common/items/item/pickup.qh index d21923e25..b42e18aea 100644 --- a/qcsrc/common/items/item/pickup.qh +++ b/qcsrc/common/items/item/pickup.qh @@ -35,8 +35,8 @@ CLASS(Pickup, GameItem) } ATTRIB(Pickup, m_itemid, int, 0); #ifdef SVQC - ATTRIB(Pickup, m_mins, vector, '-16 -16 0'); - ATTRIB(Pickup, m_maxs, vector, '16 16 48'); + ATTRIB(Pickup, m_mins, vector, ITEM_D_MINS); + ATTRIB(Pickup, m_maxs, vector, ITEM_D_MAXS); ATTRIB(Pickup, m_botvalue, int, 0); ATTRIB(Pickup, m_itemflags, int, 0); float generic_pickupevalfunc(entity player, entity item); diff --git a/qcsrc/common/mapobjects/func/conveyor.qc b/qcsrc/common/mapobjects/func/conveyor.qc index 3666dd337..724fb9290 100644 --- a/qcsrc/common/mapobjects/func/conveyor.qc +++ b/qcsrc/common/mapobjects/func/conveyor.qc @@ -21,20 +21,12 @@ void conveyor_think(entity this) { FOREACH_ENTITY_RADIUS((this.absmin + this.absmax) * 0.5, vlen(this.absmax - this.absmin) * 0.5 + 1, it.conveyor.active == ACTIVE_NOT && isPushable(it), { - vector emin = it.absmin; - vector emax = it.absmax; - if(this.solid == SOLID_BSP) + if (WarpZoneLib_ExactTrigger_Touch(this, it, false)) { - emin -= '1 1 1'; - emax += '1 1 1'; + if(!it.conveyor) + IL_PUSH(g_conveyed, it); + it.conveyor = this; } - if(boxesoverlap(emin, emax, this.absmin, this.absmax)) // quick - if(WarpZoneLib_BoxTouchesBrush(emin, emax, this, it)) // accurate - { - if(!it.conveyor) - IL_PUSH(g_conveyed, it); - it.conveyor = this; - } }); IL_EACH(g_conveyed, it.conveyor == this, diff --git a/qcsrc/common/mapobjects/func/ladder.qc b/qcsrc/common/mapobjects/func/ladder.qc index 0d4e253f0..d60c28abc 100644 --- a/qcsrc/common/mapobjects/func/ladder.qc +++ b/qcsrc/common/mapobjects/func/ladder.qc @@ -3,6 +3,7 @@ REGISTER_NET_LINKED(ENT_CLIENT_LADDER) void func_ladder_think(entity this) { + #ifdef CSQC // TODO: check if this is what is causing the glitchiness when switching between them float dt = time - this.move_time; @@ -19,21 +20,11 @@ void func_ladder_think(entity this) FOREACH_ENTITY_RADIUS((this.absmin + this.absmax) * 0.5, vlen(this.absmax - this.absmin) * 0.5 + 1, !it.ladder_entity && IS_PLAYER(it) && it.move_movetype != MOVETYPE_NOCLIP && !IS_DEAD(it), { - vector emin = it.absmin; - vector emax = it.absmax; - if(this.solid == SOLID_BSP || (IS_CSQC && this.solid == SOLID_TRIGGER)) // CSQC doesn't expand properly - { - emin -= '1 1 1'; - emax += '1 1 1'; - } - if(boxesoverlap(emin, emax, this.absmin, this.absmax)) // quick + if (WarpZoneLib_ExactTrigger_Touch(this, it, false)) { - if(WarpZoneLib_BoxTouchesBrush(emin, emax, this, it)) // accurate - { - if(!it.ladder_entity) - IL_PUSH(g_ladderents, it); - it.ladder_entity = this; - } + if(!it.ladder_entity) + IL_PUSH(g_ladderents, it); + it.ladder_entity = this; } }); @@ -178,10 +169,6 @@ NET_HANDLE(ENT_CLIENT_LADDER, bool isnew) this.move_time = time; this.entremove = func_ladder_remove; - // NOTE: CSQC's version of setorigin doesn't expand - this.absmin -= '1 1 1'; - this.absmax += '1 1 1'; - return true; } #endif diff --git a/qcsrc/common/mapobjects/trigger/swamp.qc b/qcsrc/common/mapobjects/trigger/swamp.qc index a54665962..061c62131 100644 --- a/qcsrc/common/mapobjects/trigger/swamp.qc +++ b/qcsrc/common/mapobjects/trigger/swamp.qc @@ -31,20 +31,12 @@ void swamp_think(entity this) { FOREACH_ENTITY_RADIUS((this.absmin + this.absmax) * 0.5, vlen(this.absmax - this.absmin) * 0.5 + 1, it.swampslug.active == ACTIVE_NOT && IS_PLAYER(it) && !IS_DEAD(it), { - vector emin = it.absmin; - vector emax = it.absmax; - if(this.solid == SOLID_BSP) + if (WarpZoneLib_ExactTrigger_Touch(this, it, false)) { - emin -= '1 1 1'; - emax += '1 1 1'; + if(!it.swampslug) + IL_PUSH(g_swamped, it); + it.swampslug = this; } - if(boxesoverlap(emin, emax, this.absmin, this.absmax)) // quick - if(WarpZoneLib_BoxTouchesBrush(emin, emax, this, it)) // accurate - { - if(!it.swampslug) - IL_PUSH(g_swamped, it); - it.swampslug = this; - } }); IL_EACH(g_swamped, it.swampslug == this, diff --git a/qcsrc/common/mapobjects/trigger/viewloc.qc b/qcsrc/common/mapobjects/trigger/viewloc.qc index 4679e75f7..ddfd5a1f1 100644 --- a/qcsrc/common/mapobjects/trigger/viewloc.qc +++ b/qcsrc/common/mapobjects/trigger/viewloc.qc @@ -32,37 +32,16 @@ void viewloc_think(entity this) #if 1 FOREACH_CLIENT(!it.viewloc && IS_PLAYER(it), { - vector emin = it.absmin; - vector emax = it.absmax; - if(this.solid == SOLID_BSP) - { - emin -= '1 1 1'; - emax += '1 1 1'; - } - if(boxesoverlap(emin, emax, this.absmin, this.absmax)) // quick - { - if(WarpZoneLib_BoxTouchesBrush(emin, emax, this, it)) // accurate - it.viewloc = this; - } + if (WarpZoneLib_ExactTrigger_Touch(this, it, false)) + it.viewloc = this; }); #else - - for(e = findradius((this.absmin + this.absmax) * 0.5, vlen(this.absmax - this.absmin) * 0.5 + 1); e; e = e.chain) - if(!e.viewloc) - if(IS_PLAYER(e)) // should we support non-player entities with this? - //if(!IS_DEAD(e)) // death view is handled separately, we can't override this just yet - { - vector emin = e.absmin; - vector emax = e.absmax; - if(this.solid == SOLID_BSP) - { - emin -= '1 1 1'; - emax += '1 1 1'; - } - if(boxesoverlap(emin, emax, this.absmin, this.absmax)) // quick - if(WarpZoneLib_BoxTouchesBrush(emin, emax, this, e)) // accurate - e.viewloc = this; - } + for(e = findradius((this.absmin + this.absmax) * 0.5, vlen(this.absmax - this.absmin) * 0.5 + 1); e; e = e.chain) + if(!e.viewloc) + if(IS_PLAYER(e)) // should we support non-player entities with this? + //if(!IS_DEAD(e)) // death view is handled separately, we can't override this just yet + if (WarpZoneLib_ExactTrigger_Touch(this, it, false)) + e.viewloc = this; #endif this.nextthink = time; diff --git a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc index 367277e7f..7ed7ca45f 100644 --- a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc @@ -314,7 +314,7 @@ void buff_Think(entity this) this.skin = buff.m_skin; setmodel(this, MDL_BUFF); - setsize(this, BUFF_MIN, BUFF_MAX); + setsize(this, ITEM_D_MINS, ITEM_L_MAXS); if(this.buff_waypoint) { @@ -440,7 +440,7 @@ void buff_Init(entity this) setthink(this, buff_Think); settouch(this, buff_Touch); setmodel(this, MDL_BUFF); - setsize(this, BUFF_MIN, BUFF_MAX); + setsize(this, ITEM_D_MINS, ITEM_L_MAXS); this.reset = buff_Reset; this.nextthink = time + 0.1; this.gravity = 1; diff --git a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qh b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qh index c8b2b363d..c8281a003 100644 --- a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qh +++ b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qh @@ -74,9 +74,6 @@ float autocvar_g_buffs_luck_damagemultiplier = 3; .float buff_shield; // delay for players to keep them from spamming buff pickups .entity buff_model; // controls effects (TODO: make csqc) -const vector BUFF_MIN = ('-16 -16 0'); -const vector BUFF_MAX = ('16 16 60'); - float buff_Available(entity buff); void buff_RemoveAll(entity actor, int removal_type); diff --git a/qcsrc/common/mutators/mutator/powerups/powerups.qh b/qcsrc/common/mutators/mutator/powerups/powerups.qh index 3a614e388..ecd754672 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerups.qh +++ b/qcsrc/common/mutators/mutator/powerups/powerups.qh @@ -3,8 +3,7 @@ #include CLASS(Powerup, Pickup) #ifdef SVQC - ATTRIB(Powerup, m_mins, vector, '-16 -16 0'); - ATTRIB(Powerup, m_maxs, vector, '16 16 80'); + ATTRIB(Powerup, m_maxs, vector, ITEM_L_MAXS); ATTRIB(Powerup, m_botvalue, int, 11000); ATTRIB(Powerup, m_itemflags, int, FL_POWERUP); ATTRIB(Powerup, m_respawntime, float(), GET(g_pickup_respawntime_powerup)); diff --git a/qcsrc/common/physics/movetypes/movetypes.qc b/qcsrc/common/physics/movetypes/movetypes.qc index 651b6f3d6..c913970c4 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qc +++ b/qcsrc/common/physics/movetypes/movetypes.qc @@ -515,44 +515,11 @@ void _Movetype_LinkEdict(entity this, bool touch_triggers) // SV_LinkEdict { if(autocvar__movetype_debug) { - vector mi, ma; - if(this.solid == SOLID_BSP) - { - // TODO set the absolute bbox - mi = this.mins; - ma = this.maxs; - } - else - { - mi = this.mins; - ma = this.maxs; - } - mi += this.origin; - ma += this.origin; - - if(this.flags & FL_ITEM) - { - mi -= '15 15 1'; - ma += '15 15 1'; - } - else - { - mi -= '1 1 1'; - ma += '1 1 1'; - } - - this.absmin = mi; - this.absmax = ma; + this.absmin = this.origin + this.mins; + this.absmax = this.origin + this.maxs; } else - { setorigin(this, this.origin); // calls SV_LinkEdict - #ifdef CSQC - // NOTE: CSQC's version of setorigin doesn't expand - this.absmin -= '1 1 1'; - this.absmax += '1 1 1'; - #endif - } if(touch_triggers) _Movetype_LinkEdict_TouchAreaGrid(this); diff --git a/qcsrc/common/weapons/weapon/porto.qc b/qcsrc/common/weapons/weapon/porto.qc index 7ee416215..b681078c2 100644 --- a/qcsrc/common/weapons/weapon/porto.qc +++ b/qcsrc/common/weapons/weapon/porto.qc @@ -118,7 +118,8 @@ void W_Porto_Fail(entity this, float failhard) if(this.cnt < 0 && !failhard && this.realowner.playerid == this.playerid && !IS_DEAD(this.realowner) && !(STAT(WEAPONS, this.realowner) & WEPSET(PORTO))) { - setsize(this, '-16 -16 0', '16 16 48'); + // FIXME: item properties should be obtained from the registry + setsize(this, ITEM_D_MINS, ITEM_D_MAXS); setorigin(this, this.origin + trace_plane_normal); if(move_out_of_solid(this)) { diff --git a/qcsrc/lib/warpzone/common.qc b/qcsrc/lib/warpzone/common.qc index d9a12517d..2103b87c7 100644 --- a/qcsrc/lib/warpzone/common.qc +++ b/qcsrc/lib/warpzone/common.qc @@ -811,12 +811,12 @@ entity WarpZone_RefSys_SpawnSameRefSys(entity me) bool WarpZoneLib_ExactTrigger_Touch(entity this, entity toucher, bool touchfunc) { vector emin = toucher.absmin, emax = toucher.absmax; - if(STAT(Q3COMPAT)) + if (!Q3COMPAT_COMMON) { - // DP's tracebox enlarges absolute bounding boxes by a single quake unit - // we must undo that here to allow accurate touching - emin += '1 1 1'; - emax -= '1 1 1'; + // Xonotic and Nexuiz maps assume triggers will be activated by adjacent players + // prior to sv_legacy_bbox_expand 0 DP always did this for SVQC and never for CSQC + emin -= '1 1 1'; + emax += '1 1 1'; } // if called from a touch func, we can assume the boxes do overlap @@ -826,7 +826,6 @@ bool WarpZoneLib_ExactTrigger_Touch(entity this, entity toucher, bool touchfunc) return WarpZoneLib_BoxTouchesBrush(emin, emax, this, toucher); // accurate } - void WarpZoneLib_MoveOutOfSolid_Expand(entity e, vector by) { const float eps = 0.0625; diff --git a/qcsrc/lib/warpzone/util_server.qc b/qcsrc/lib/warpzone/util_server.qc index 5f1aebf49..888112ce5 100644 --- a/qcsrc/lib/warpzone/util_server.qc +++ b/qcsrc/lib/warpzone/util_server.qc @@ -47,4 +47,10 @@ void WarpZoneLib_ExactTrigger_Init(entity this) setsize(this, this.mins, this.maxs); set_movetype(this, MOVETYPE_NONE); this.model = ""; + + // Xonotic and Nexuiz maps assume triggers will be activated by adjacent players + // this causes the touch func to be called in that case + // prior to sv_legacy_bbox_expand 0 DP always did this for SVQC and never for CSQC + if (!Q3COMPAT_COMMON) + setsize(this, this.mins - '1 1 1', this.maxs + '1 1 1'); } diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 87bb5c0cd..6a1dc962b 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -225,8 +225,8 @@ bool navigation_checkladders(entity e, vector org, vector m1, vector m2, vector IL_EACH(g_ladders, true, { if(it.bot_pickup) - if(boxesoverlap(org + m1 + '-1 -1 -1', org + m2 + '1 1 1', it.absmin, it.absmax)) - if(boxesoverlap(end, end2, it.absmin + vec2(m1) + '-1 -1 0', it.absmax + vec2(m2) + '1 1 0')) + if(boxesoverlap(org + m1, org + m2, it.absmin, it.absmax)) + if(boxesoverlap(end, end2, it.absmin + vec2(m1), it.absmax + vec2(m2))) { vector top = org; top.z = it.absmax.z + (PL_MAX_CONST.z - PL_MIN_CONST.z); diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc index 88ea34de2..b2597ebd0 100644 --- a/qcsrc/server/bot/default/waypoints.qc +++ b/qcsrc/server/bot/default/waypoints.qc @@ -647,7 +647,7 @@ void waypoint_spawn_fromeditor(entity pl, bool at_crosshair, bool is_jump_wp, bo e = it; break; }); if (!e) - e = waypoint_spawn(jp.absmin - PL_MAX_CONST + '1 1 1', jp.absmax - PL_MIN_CONST + '-1 -1 -1', WAYPOINTFLAG_TELEPORT); + e = waypoint_spawn(jp.absmin - PL_MAX_CONST, jp.absmax - PL_MIN_CONST, WAYPOINTFLAG_TELEPORT); if (!pl.wp_locked) pl.wp_locked = e; } @@ -2062,7 +2062,7 @@ void waypoint_spawnforteleporter_wz(entity e, entity tracetest_ent) void waypoint_spawnforteleporter(entity e, vector destination, float timetaken, entity tracetest_ent) { destination = waypoint_fixorigin(destination, tracetest_ent); - waypoint_spawnforteleporter_boxes(e, WAYPOINTFLAG_TELEPORT, e.absmin - PL_MAX_CONST + '1 1 1', e.absmax - PL_MIN_CONST + '-1 -1 -1', destination, destination, timetaken); + waypoint_spawnforteleporter_boxes(e, WAYPOINTFLAG_TELEPORT, e.absmin - PL_MAX_CONST, e.absmax - PL_MIN_CONST, destination, destination, timetaken); } entity waypoint_spawnpersonal(entity this, vector position) diff --git a/xonotic-server.cfg b/xonotic-server.cfg index 03404ebf4..c05f052ec 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -403,20 +403,10 @@ set timelimit_decrement 5 "number of minutes removed from the timer when voting set timelimit_min 5 "shortest match time achieveable with reducematchtime and timelimit votes" set timelimit_max 60 "maximum match time achieveable with extendmatchtime and timelimit votes" -sv_gameplayfix_delayprojectiles 0 -sv_gameplayfix_q2airaccelerate 1 -sv_gameplayfix_stepmultipletimes 1 -sv_gameplayfix_stepdown 2 -// only available in qc physics -set sv_gameplayfix_stepdown_maxspeed 0 "maximum speed walking entities can be moving for stepping down to apply" - // delay for "kill" to prevent abuse set g_balance_kill_delay 2 "timer before death when using the kill command" set g_balance_kill_antispam 5 "additional time added to the kill delay if used repeatedly" -// this feature is currently buggy in the engine (it appears to PREVENT any dropping in lots of maps, leading to weirdly aligned entities, and in some cases even CAUSES them to drop through solid, like in facing worlds nex) -sv_gameplayfix_droptofloorstartsolid 0 - set sv_foginterval 1 "force enable fog in regular intervals" set sv_maxidle 0 "kick players idle for more than this amount of time in seconds" @@ -497,6 +487,17 @@ set debug_text_3d_default_align 0 "Default text alignment for debug_text_3d()" set debug_text_3d_default_duration 10 "Default duration for debug_text_3d()" set debug_text_3d_default_velocity "0 -10 0" "Default velocity for debug_text_3d() in screen coords (X and Y from top left)" +sv_gameplayfix_delayprojectiles 0 +sv_gameplayfix_q2airaccelerate 1 +sv_gameplayfix_stepmultipletimes 1 +sv_gameplayfix_stepdown 2 + +// only available in qc physics +set sv_gameplayfix_stepdown_maxspeed 0 "maximum speed walking entities can be moving for stepping down to apply" + +// this feature is currently buggy in the engine (it appears to PREVENT any dropping in lots of maps, leading to weirdly aligned entities, and in some cases even CAUSES them to drop through solid, like in facing worlds nex) +sv_gameplayfix_droptofloorstartsolid 0 + // otherwise, antilag breaks sv_gameplayfix_consistentplayerprethink 1 @@ -504,6 +505,9 @@ sv_gameplayfix_consistentplayerprethink 1 sv_gameplayfix_gravityunaffectedbyticrate 1 sv_gameplayfix_nogravityonground 1 +// avoid needing to work around Quake bbox expansion in many places +sv_legacy_bbox_expand 0 + set sv_q3compat_changehitbox 0 "use Q3 player hitbox dimensions and camera height on Q3 maps (maps with an entry in a .arena or .defi file)" set g_movement_highspeed 1 "multiplier scale for movement speed (applies to sv_maxspeed and sv_maxairspeed, also applies to air acceleration when g_movement_highspeed_q3_compat is set to 0)"