]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert "Remove legacy Quake bbox expansion: projectiles"
authorbones_was_here <bones_was_here@xonotic.au>
Thu, 25 May 2023 06:56:54 +0000 (16:56 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 25 May 2023 06:56:54 +0000 (16:56 +1000)
This reverts commit bf1d64ebc5c2867b079a0bfa09f448f076d6be01.

27 files changed:
.gitlab-ci.yml
qcsrc/common/gamemodes/gamemode/nexball/sv_weapon.qc
qcsrc/common/mutators/mutator/overkill/okrpc.qc
qcsrc/common/mutators/mutator/overkill/okrpc.qh
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/blaster.qc
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/devastator.qh
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/electro.qh
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hlac.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/minelayer.qh
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/mortar.qh
qcsrc/common/weapons/weapon/porto.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/seeker.qh
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vaporizer.qh
qcsrc/server/hook.qc
qcsrc/server/hook.qh
qcsrc/server/weapons/common.qh
qcsrc/server/weapons/tracing.qh

index d146b9208db69a1aafab8bb0081a9c7a38db65e8..b56f2b44d1b4b126e5b11f3be048aa75e21feaca 100644 (file)
@@ -75,7 +75,7 @@ test_sv_game:
     - wget -nv -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints\r
     - wget -nv -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache\r
 \r
-    - EXPECT=ab4f1c48fe9e823e2354ad6c029feea8\r
+    - EXPECT=f2226bf353b6ff3dd3c489a742ce4e6a\r
     - HASH=$(${ENGINE} +exec serverbench.cfg\r
       | tee /dev/stderr\r
       | grep '^:'\r
index 7ed7a4d197ea389961e1367211ed70980a2e545a..d3d3a6a9dcb30ae59eb103760e1f8cb5ca00c952 100644 (file)
@@ -165,7 +165,7 @@ void W_Nexball_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
        PROJECTILE_MAKETRIGGER(missile);
 
        //setmodel(missile, "models/elaser.mdl");  // precision set below
-       setsize(missile, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+       setsize(missile, '0 0 0', '0 0 0');
        setorigin(missile, w_shotorg);
 
        W_SetupProjVelocity_Basic(missile, autocvar_g_balance_nexball_secondary_speed, 0);
index 9a3ba973f530068ed36d6a6e846c6397f7473147..d84a6766a3bbafe5fe27fab2ecafbbdf4e433818 100644 (file)
@@ -89,7 +89,7 @@ void W_OverkillRocketPropelledChainsaw_Attack(Weapon thiswep, entity actor, .ent
        entity missile = spawn(); //WarpZone_RefSys_SpawnSameRefSys(actor);
 
        W_DecreaseAmmo(thiswep, actor, WEP_CVAR_PRI(okrpc, ammo), weaponentity);
-       W_SetupShot_ProjectileSize(actor, weaponentity, RPC_MINS, RPC_MAXS, false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(okrpc, damage), thiswep.m_id);
+       W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(okrpc, damage), thiswep.m_id);
        W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
        PROJECTILE_MAKETRIGGER(missile);
 
@@ -107,7 +107,7 @@ void W_OverkillRocketPropelledChainsaw_Attack(Weapon thiswep, entity actor, .ent
 
        missile.projectiledeathtype = thiswep.m_id;
        missile.weaponentity_fld = weaponentity;
-       setsize (missile, RPC_MINS, RPC_MAXS); // give it some size so it can be shot
+       setsize (missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
 
        setorigin(missile, w_shotorg - v_forward * 3); // move it back so it hits the wall at the right point
        W_SetupProjVelocity_Basic(missile, WEP_CVAR_PRI(okrpc, speed), 0);
index ffa489f9581b8aae65b198d0286272c947b80f5b..23421d2f542dfd4f467994ec04d34ab605c2b89e 100644 (file)
@@ -22,9 +22,6 @@ CLASS(OverkillRocketPropelledChainsaw, Weapon)
 /* wepname   */ ATTRIB(OverkillRocketPropelledChainsaw, m_name, string, _("Overkill Rocket Propelled Chainsaw"));
 /* legacy    */ ATTRIB(OverkillRocketPropelledChainsaw, m_deprecated_netname, string, "rpc");
 
-#define RPC_MINS '-4 -4 -4' // 0.8.5 used '-3 -3 -3' (before sv_legacy_bbox_expand 0)
-#define RPC_MAXS '4 4 4'    // 0.8.5 used '3 3 3'    (before sv_legacy_bbox_expand 0)
-
 #define X(BEGIN, P, END, class, prefix) \
        BEGIN(class) \
                P(class, prefix, ammo, float, PRI) \
index 5aa7bfa5254391e30d1626b9ebdd9f0c81aadf00..43d7a03a400dae69ba74e6e6858435ad9ad113fe 100644 (file)
@@ -158,11 +158,10 @@ void W_Arc_Attack_Bolt(Weapon thiswep, entity actor, .entity weaponentity, int f
        setthink(missile, adaptor_think2use_hittype_splash);
        missile.nextthink = time + WEP_CVAR(arc, bolt_lifetime);
        PROJECTILE_MAKETRIGGER(missile);
-       missile.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
        missile.projectiledeathtype = thiswep.m_id | HITTYPE_SECONDARY;
        missile.weaponentity_fld = weaponentity;
        setorigin(missile, w_shotorg);
-       setsize(missile, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+       setsize(missile, '0 0 0', '0 0 0');
 
        set_movetype(missile, MOVETYPE_BOUNCEMISSILE);
        W_SetupProjVelocity_PRE(missile, arc, bolt_);
index c4d6720c2d37c915457ed0a7453f31f5a7fb4a7c..3c134a3db37b85bb21848a322098b4ba81ba7c19 100644 (file)
@@ -57,10 +57,9 @@ void W_Blaster_Attack(
        missile.bot_dodge = true;
        missile.bot_dodgerating = atk_damage;
        PROJECTILE_MAKETRIGGER(missile);
-       missile.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
 
        setorigin(missile, w_shotorg);
-       setsize(missile, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+       setsize(missile, '0 0 0', '0 0 0');
 
        float atk_speed = WEP_CVAR_BOTH(blaster, isprimary, speed);
        float atk_spread = WEP_CVAR_BOTH(blaster, isprimary, spread);
index 1e1b8f9913b92abf658d6331a6f757fc53710e3e..6a69a7c570936f87b24e92f5666fceeb11275c74 100644 (file)
@@ -341,12 +341,11 @@ void W_Crylink_Attack(Weapon thiswep, entity actor, .entity weaponentity)
 
                set_movetype(proj, MOVETYPE_BOUNCEMISSILE);
                PROJECTILE_MAKETRIGGER(proj);
-               proj.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
                proj.projectiledeathtype = thiswep.m_id;
                //proj.gravity = 0.001;
 
                setorigin(proj, w_shotorg);
-               setsize(proj, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+               setsize(proj, '0 0 0', '0 0 0');
 
 
                s = '0 0 0';
@@ -455,12 +454,11 @@ void W_Crylink_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
 
                set_movetype(proj, MOVETYPE_BOUNCEMISSILE);
                PROJECTILE_MAKETRIGGER(proj);
-               proj.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
                proj.projectiledeathtype = thiswep.m_id | HITTYPE_SECONDARY;
                //proj.gravity = 0.001;
 
                setorigin(proj, w_shotorg);
-               setsize(proj, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+               setsize(proj, '0 0 0', '0 0 0');
 
                if(WEP_CVAR_SEC(crylink, spreadtype) == 1)
                {
index 40a2e35d459a38b335589ee7925af388d89bff1f..6f428dc6c413430cb52440659da1c3a5eac6e6b5 100644 (file)
@@ -307,7 +307,7 @@ void W_Devastator_Attack(Weapon thiswep, entity actor, .entity weaponentity, int
 {
        W_DecreaseAmmo(thiswep, actor, WEP_CVAR(devastator, ammo), weaponentity);
 
-       W_SetupShot_ProjectileSize(actor, weaponentity, ROCKET_MINS, ROCKET_MAXS, false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR(devastator, damage), thiswep.m_id);
+       W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR(devastator, damage), thiswep.m_id);
        W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
 
        entity missile = WarpZone_RefSys_SpawnSameRefSys(actor);
@@ -333,7 +333,7 @@ void W_Devastator_Attack(Weapon thiswep, entity actor, .entity weaponentity, int
        set_movetype(missile, MOVETYPE_FLY);
        PROJECTILE_MAKETRIGGER(missile);
        missile.projectiledeathtype = thiswep.m_id;
-       setsize(missile, ROCKET_MINS, ROCKET_MAXS); // give it some size so it can be shot
+       setsize(missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
 
        setorigin(missile, w_shotorg - v_forward * 3); // move it back so it hits the wall at the right point
        W_SetupProjVelocity_Basic(missile, WEP_CVAR(devastator, speedstart), 0);
index e849f6957972a953a1a4c5c42044b73636675b60..7a10bf62a17358ff085a8464d70fcdc24f1b7bfb 100644 (file)
@@ -20,9 +20,6 @@ CLASS(Devastator, Weapon)
 /* wepname   */ ATTRIB(Devastator, m_name, string, _("Devastator"));
 /* legacy    */ ATTRIB(Devastator, m_deprecated_netname, string, "rocketlauncher");
 
-#define ROCKET_MINS '-4 -4 -4' // 0.8.5 used '-3 -3 -3' (before sv_legacy_bbox_expand 0)
-#define ROCKET_MAXS '4 4 4'    // 0.8.5 used '3 3 3'    (before sv_legacy_bbox_expand 0)
-
 #define X(BEGIN, P, END, class, prefix) \
        BEGIN(class) \
                P(class, prefix, ammo, float, NONE) \
index fbd92f0cb36677a57bd5672efceab9e51357e3f7..2c03871ce54580335fe95adff435d86d4a555818 100644 (file)
@@ -221,8 +221,8 @@ void W_Electro_Attack_Bolt(Weapon thiswep, entity actor, .entity weaponentity)
        W_SetupShot_ProjectileSize(
                actor,
                weaponentity,
-               BOLT_MINS,
-               BOLT_MAXS,
+               '0 0 -3',
+               '0 0 -3',
                false,
                2,
                SND_ELECTRO_FIRE,
@@ -242,7 +242,6 @@ void W_Electro_Attack_Bolt(Weapon thiswep, entity actor, .entity weaponentity)
        proj.nextthink = time;
        proj.ltime = time + WEP_CVAR_PRI(electro, lifetime);
        PROJECTILE_MAKETRIGGER(proj);
-       proj.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
        proj.projectiledeathtype = thiswep.m_id;
        proj.weaponentity_fld = weaponentity;
        setorigin(proj, w_shotorg);
@@ -252,7 +251,7 @@ void W_Electro_Attack_Bolt(Weapon thiswep, entity actor, .entity weaponentity)
        W_SetupProjVelocity_PRI(proj, electro);
        proj.angles = vectoangles(proj.velocity);
        settouch(proj, W_Electro_TouchExplode);
-       setsize(proj, BOLT_MINS, BOLT_MAXS);
+       setsize(proj, '0 0 -3', '0 0 -3');
        proj.flags = FL_PROJECTILE;
        IL_PUSH(g_projectiles, proj);
        IL_PUSH(g_bot_dodge, proj);
@@ -423,8 +422,8 @@ void W_Electro_Attack_Orb(Weapon thiswep, entity actor, .entity weaponentity)
        W_SetupShot_ProjectileSize(
                actor,
                weaponentity,
-               ORB_MINS,
-               ORB_MAXS,
+               '-4 -4 -4',
+               '4 4 4',
                false,
                2,
                SND_ELECTRO_FIRE2,
@@ -455,7 +454,7 @@ void W_Electro_Attack_Orb(Weapon thiswep, entity actor, .entity weaponentity)
        set_movetype(proj, MOVETYPE_BOUNCE);
        W_SetupProjVelocity_UP_SEC(proj, electro);
        settouch(proj, W_Electro_Orb_Touch);
-       setsize(proj, ORB_MINS, ORB_MAXS);
+       setsize(proj, '-4 -4 -4', '4 4 4');
        proj.takedamage = DAMAGE_YES;
        proj.damageforcescale = WEP_CVAR_SEC(electro, damageforcescale);
        SetResourceExplicit(proj, RES_HEALTH, WEP_CVAR_SEC(electro, health));
index b0b3ba799d7d57d4bce5776c8c0d27eeb22cdd2e..e4263403bf82161b52cf66eac3a1507e9f4b3748 100644 (file)
@@ -19,11 +19,6 @@ CLASS(Electro, Weapon)
 /* refname   */ ATTRIB(Electro, netname, string, "electro");
 /* wepname   */ ATTRIB(Electro, m_name, string, _("Electro"));
 
-#define ORB_MINS  '-5 -5 -5' // 0.8.5 used '-4 -4 -4' (before sv_legacy_bbox_expand 0)
-#define ORB_MAXS  '5 5 5'    // 0.8.5 used '4 4 4'    (before sv_legacy_bbox_expand 0)
-#define BOLT_MINS '-1 -1 -4' // 0.8.5 used '0 0 -3'   (before sv_legacy_bbox_expand 0)
-#define BOLT_MAXS '1 1 -2'   // 0.8.5 used '0 0 -3'   (before sv_legacy_bbox_expand 0)
-
 #define X(BEGIN, P, END, class, prefix) \
        BEGIN(class) \
                P(class, prefix, ammo, float, BOTH) \
index 096f8ed8b7066e23eaa8fefd07c6aa729f4a1c09..a8c12efccd2002dad48197ffccd8be1b6be6a3c0 100644 (file)
@@ -102,11 +102,10 @@ void W_Hagar_Attack(Weapon thiswep, entity actor, .entity weaponentity)
        setthink(missile, adaptor_think2use_hittype_splash);
        missile.nextthink = time + WEP_CVAR_PRI(hagar, lifetime);
        PROJECTILE_MAKETRIGGER(missile);
-       missile.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
        missile.projectiledeathtype = thiswep.m_id;
        missile.weaponentity_fld = weaponentity;
        setorigin(missile, w_shotorg);
-       setsize(missile, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+       setsize(missile, '0 0 0', '0 0 0');
 
        set_movetype(missile, MOVETYPE_FLY);
        W_SetupProjVelocity_PRI(missile, hagar);
@@ -150,11 +149,10 @@ void W_Hagar_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
        setthink(missile, adaptor_think2use_hittype_splash);
        missile.nextthink = time + WEP_CVAR_SEC(hagar, lifetime_min) + random() * WEP_CVAR_SEC(hagar, lifetime_rand);
        PROJECTILE_MAKETRIGGER(missile);
-       missile.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
        missile.projectiledeathtype = thiswep.m_id | HITTYPE_SECONDARY;
        missile.weaponentity_fld = weaponentity;
        setorigin(missile, w_shotorg);
-       setsize(missile, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+       setsize(missile, '0 0 0', '0 0 0');
 
        set_movetype(missile, MOVETYPE_BOUNCEMISSILE);
        W_SetupProjVelocity_SEC(missile, hagar);
@@ -213,11 +211,10 @@ void W_Hagar_Attack2_Load_Release(Weapon thiswep, entity actor, .entity weaponen
                setthink(missile, adaptor_think2use_hittype_splash);
                missile.nextthink = time + WEP_CVAR_SEC(hagar, lifetime_min) + random() * WEP_CVAR_SEC(hagar, lifetime_rand);
                PROJECTILE_MAKETRIGGER(missile);
-               missile.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
                missile.projectiledeathtype = thiswep.m_id | HITTYPE_SECONDARY;
                missile.weaponentity_fld = weaponentity;
                setorigin(missile, w_shotorg);
-               setsize(missile, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+               setsize(missile, '0 0 0', '0 0 0');
                set_movetype(missile, MOVETYPE_FLY);
                missile.missile_flags = MIF_SPLASH;
 
index 4282598a99877361aeb8c07ae0ba72a438003b68..18dde744003019106b11e8b46d373900bf6cefba 100644 (file)
@@ -45,10 +45,9 @@ void W_HLAC_Attack(Weapon thiswep, entity actor, .entity weaponentity)
 
        set_movetype(missile, MOVETYPE_FLY);
        PROJECTILE_MAKETRIGGER(missile);
-       missile.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
 
        setorigin(missile, w_shotorg);
-       setsize(missile, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+       setsize(missile, '0 0 0', '0 0 0');
 
        W_SetupProjVelocity_Basic(missile, WEP_CVAR_PRI(hlac, speed), spread);
        //missile.angles = vectoangles(missile.velocity); // csqc
@@ -91,10 +90,9 @@ void W_HLAC_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
 
                set_movetype(missile, MOVETYPE_FLY);
                PROJECTILE_MAKETRIGGER(missile);
-               missile.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
 
                setorigin(missile, w_shotorg);
-               setsize(missile, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+               setsize(missile, '0 0 0', '0 0 0');
 
                W_SetupProjVelocity_Basic(missile, WEP_CVAR_SEC(hlac, speed), spread);
                //missile.angles = vectoangles(missile.velocity); // csqc
index 30c2233ac72489e6a7a359634033c3c84767f974..94d4ac33ed765899b1fd0cd46ae9a964f8d54324 100644 (file)
@@ -77,11 +77,10 @@ void W_Hook_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
        gren.bot_dodgerating = WEP_CVAR_SEC(hook, damage);
        set_movetype(gren, MOVETYPE_TOSS);
        PROJECTILE_MAKETRIGGER(gren);
-       gren.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
        gren.projectiledeathtype = WEP_HOOK.m_id | HITTYPE_SECONDARY;
        gren.weaponentity_fld = weaponentity;
        setorigin(gren, w_shotorg);
-       setsize(gren, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+       setsize(gren, '0 0 0', '0 0 0');
 
        gren.nextthink = time + WEP_CVAR_SEC(hook, lifetime);
        setthink(gren, adaptor_think2use_hittype_splash);
index 40474b874030a8fed1b2a03e933b064a82057733..c73db2bc28f1d9e634d87b36fc4a21b5146b6e39 100644 (file)
@@ -20,7 +20,7 @@ void W_MineLayer_Stick(entity this, entity to)
        newmine.realowner = this.realowner;
        setorigin(newmine, this.origin);
        setmodel(newmine, MDL_MINELAYER_MINE);
-       setsize(newmine, MINE_MINS, MINE_MAXS);
+       setsize(newmine, '-4 -4 -4', '4 4 4');
        newmine.angles = vectoangles(-trace_plane_normal); // face against the surface
 
        newmine.movedir = -trace_plane_normal;
@@ -269,7 +269,7 @@ void W_MineLayer_Attack(Weapon thiswep, entity actor, .entity weaponentity)
 
        W_DecreaseAmmo(thiswep, actor, WEP_CVAR(minelayer, ammo), weaponentity);
 
-       W_SetupShot_ProjectileSize(actor, weaponentity, MINE_MINS, MINE_MAXS, false, 5, SND_MINE_FIRE, CH_WEAPON_A, WEP_CVAR(minelayer, damage), thiswep.m_id);
+       W_SetupShot_ProjectileSize(actor, weaponentity, '-4 -4 -4', '4 4 4', false, 5, SND_MINE_FIRE, CH_WEAPON_A, WEP_CVAR(minelayer, damage), thiswep.m_id);
        W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
 
        entity mine = WarpZone_RefSys_SpawnSameRefSys(actor);
@@ -295,7 +295,7 @@ void W_MineLayer_Attack(Weapon thiswep, entity actor, .entity weaponentity)
        PROJECTILE_MAKETRIGGER(mine);
        mine.projectiledeathtype = thiswep.m_id;
        mine.weaponentity_fld = weaponentity;
-       setsize(mine, MINE_MINS, MINE_MAXS);
+       setsize(mine, '-4 -4 -4', '4 4 4'); // give it some size so it can be shot
 
        setorigin(mine, w_shotorg - v_forward * 4); // move it back so it hits the wall at the right point
        W_SetupProjVelocity_Basic(mine, WEP_CVAR(minelayer, speed), 0);
index ce331ca6b5e82a819c2fab64e1b0bbb20364b22b..a574510f57736e373e0107ea59202d102ca09fca 100644 (file)
@@ -19,9 +19,6 @@ CLASS(MineLayer, Weapon)
 /* refname   */ ATTRIB(MineLayer, netname, string, "minelayer");
 /* wepname   */ ATTRIB(MineLayer, m_name, string, _("Mine Layer"));
 
-#define MINE_MINS '-5 -5 -5' // 0.8.5 used '-4 -4 -4' (before sv_legacy_bbox_expand 0)
-#define MINE_MAXS '5 5 5'    // 0.8.5 used '4 4 4'    (before sv_legacy_bbox_expand 0)
-
 #define X(BEGIN, P, END, class, prefix) \
        BEGIN(class) \
                P(class, prefix, ammo, float, NONE) \
index 0a543cbbe9c2c65d5953ede23a884e6babc436da..442f88265e52a0f5462079e63a96bde3fc8d27e1 100644 (file)
@@ -151,7 +151,7 @@ void W_Mortar_Attack(Weapon thiswep, entity actor, .entity weaponentity)
 {
        W_DecreaseAmmo(thiswep, actor, WEP_CVAR_PRI(mortar, ammo), weaponentity);
 
-       W_SetupShot_ProjectileSize(actor, weaponentity, GREN_MINS, GREN_MAXS, false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(mortar, damage), thiswep.m_id);
+       W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(mortar, damage), thiswep.m_id);
        w_shotdir = v_forward; // no TrueAim for grenades please
 
        W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
@@ -167,7 +167,7 @@ void W_Mortar_Attack(Weapon thiswep, entity actor, .entity weaponentity)
        gren.projectiledeathtype = thiswep.m_id;
        gren.weaponentity_fld = weaponentity;
        setorigin(gren, w_shotorg);
-       setsize(gren, GREN_MINS, GREN_MAXS);
+       setsize(gren, '-3 -3 -3', '3 3 3');
 
        gren.cnt = time + WEP_CVAR_PRI(mortar, lifetime);
        gren.nextthink = time;
@@ -203,7 +203,7 @@ void W_Mortar_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
 
        W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(mortar, ammo), weaponentity);
 
-       W_SetupShot_ProjectileSize(actor, weaponentity, GREN_MINS, GREN_MAXS, false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(mortar, damage), thiswep.m_id | HITTYPE_SECONDARY);
+       W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(mortar, damage), thiswep.m_id | HITTYPE_SECONDARY);
        w_shotdir = v_forward; // no TrueAim for grenades please
 
        W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
@@ -219,7 +219,7 @@ void W_Mortar_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
        gren.projectiledeathtype = thiswep.m_id | HITTYPE_SECONDARY;
        gren.weaponentity_fld = weaponentity;
        setorigin(gren, w_shotorg);
-       setsize(gren, GREN_MINS, GREN_MAXS);
+       setsize(gren, '-3 -3 -3', '3 3 3');
 
        gren.nextthink = time + WEP_CVAR_SEC(mortar, lifetime);
        setthink(gren, adaptor_think2use_hittype_splash);
index ef86c5f2a5057cc46e03e760ca9eacbef48ac7a5..6d44e75644ca0f2efe5865a2f855d46cec3f2c46 100644 (file)
@@ -20,9 +20,6 @@ CLASS(Mortar, Weapon)
 /* wepname   */ ATTRIB(Mortar, m_name, string, _("Mortar"));
 /* legacy    */ ATTRIB(Mortar, m_deprecated_netname, string, "grenadelauncher");
 
-#define GREN_MINS '-4 -4 -4' // 0.8.5 used '-3 -3 -3' (before sv_legacy_bbox_expand 0)
-#define GREN_MAXS '4 4 4'    // 0.8.5 used '3 3 3'    (before sv_legacy_bbox_expand 0)
-
 #define X(BEGIN, P, END, class, prefix) \
        BEGIN(class) \
                P(class, prefix, ammo, float, BOTH) \
index ab400856c3e89745aa649e1ee359a7fb35192189..b681078c2670d07d8a27cf04d632466fbda11c80 100644 (file)
@@ -298,11 +298,10 @@ void W_Porto_Attack(Weapon thiswep, entity actor, .entity weaponentity, float ty
        gren.bot_dodgerating = 200;
        set_movetype(gren, MOVETYPE_BOUNCEMISSILE);
        PROJECTILE_MAKETRIGGER(gren);
-       gren.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
        gren.effects = EF_RED;
        gren.scale = 4;
        setorigin(gren, w_shotorg);
-       setsize(gren, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+       setsize(gren, '0 0 0', '0 0 0');
 
        gren.nextthink = time + WEP_CVAR_BOTH(porto, (type <= 0), lifetime);
        setthink(gren, W_Porto_Think);
index be6d6e13c81dbde5248df327799fb242593d9399..7abb2a43c3f96e3e73df2db9ec6235ae2cdf4691 100644 (file)
@@ -169,7 +169,7 @@ void W_Seeker_Fire_Missile(Weapon thiswep, entity actor, .entity weaponentity, v
        W_DecreaseAmmo(thiswep, actor, WEP_CVAR(seeker, missile_ammo), weaponentity);
 
        makevectors(actor.v_angle);
-       W_SetupShot_ProjectileSize(actor, weaponentity, MISSILE_MINS, MISSILE_MAXS, false, 2, SND_SEEKER_FIRE, CH_WEAPON_A, 0, ((m_target != NULL) ? thiswep.m_id | HITTYPE_SECONDARY : thiswep.m_id));
+       W_SetupShot_ProjectileSize(actor, weaponentity, '-4 -4 -4', '4 4 4', false, 2, SND_SEEKER_FIRE, CH_WEAPON_A, 0, ((m_target != NULL) ? thiswep.m_id | HITTYPE_SECONDARY : thiswep.m_id));
        w_shotorg += f_diff;
        W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
 
@@ -203,7 +203,7 @@ void W_Seeker_Fire_Missile(Weapon thiswep, entity actor, .entity weaponentity, v
 
 
        setorigin(missile, w_shotorg);
-       setsize(missile, MISSILE_MINS, MISSILE_MAXS);
+       setsize(missile, '-4 -4 -4', '4 4 4');
        set_movetype(missile, MOVETYPE_FLYMISSILE);
        missile.flags = FL_PROJECTILE;
        IL_PUSH(g_projectiles, missile);
@@ -266,7 +266,7 @@ void W_Seeker_Fire_Flac(Weapon thiswep, entity actor, .entity weaponentity)
                        f_diff = '+1.25 +3.75 0';
                        break;
        }
-       W_SetupShot_ProjectileSize(actor, weaponentity, FLAC_MINS, FLAC_MAXS, false, 2, SND_FLAC_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, flac_damage), thiswep.m_id | HITTYPE_SECONDARY);
+       W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_FLAC_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, flac_damage), thiswep.m_id | HITTYPE_SECONDARY);
        w_shotorg += f_diff;
 
        // uses hagar effects!
@@ -294,7 +294,7 @@ void W_Seeker_Fire_Flac(Weapon thiswep, entity actor, .entity weaponentity)
        //missile.scale = 0.4; // BUG: the model is too big
 
        setorigin(missile, w_shotorg);
-       setsize(missile, FLAC_MINS, FLAC_MAXS);
+       setsize(missile, '-2 -2 -2', '2 2 2');
 
        W_SetupProjVelocity_UP_PRE(missile, seeker, flac_);
        CSQCProjectile(missile, true, PROJECTILE_FLAC, true);
@@ -489,7 +489,7 @@ void W_Seeker_Fire_Tag(Weapon thiswep, entity actor, .entity weaponentity)
 {
        W_DecreaseAmmo(thiswep, actor, WEP_CVAR(seeker, tag_ammo), weaponentity);
 
-       W_SetupShot_ProjectileSize(actor, weaponentity, TAG_MINS, TAG_MAXS, false, 2, SND_TAG_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, missile_damage) * WEP_CVAR(seeker, missile_count), thiswep.m_id | HITTYPE_BOUNCE | HITTYPE_SECONDARY);
+       W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_TAG_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, missile_damage) * WEP_CVAR(seeker, missile_count), thiswep.m_id | HITTYPE_BOUNCE | HITTYPE_SECONDARY);
 
        entity missile          = new(seeker_tag);
        missile.weaponentity_fld = weaponentity;
@@ -508,7 +508,7 @@ void W_Seeker_Fire_Tag(Weapon thiswep, entity actor, .entity weaponentity)
        missile.damageforcescale = WEP_CVAR(seeker, tag_damageforcescale);
 
        setorigin(missile, w_shotorg);
-       setsize(missile, TAG_MINS, TAG_MAXS);
+       setsize(missile, '-2 -2 -2', '2 2 2');
 
        missile.flags = FL_PROJECTILE;
        IL_PUSH(g_projectiles, missile);
index 81a2876352162570ca0ad5151eb15d7d10925760..d3024a436e485fa5a0bda7557d1489a4ebaca4a8 100644 (file)
@@ -19,13 +19,6 @@ CLASS(Seeker, Weapon)
 /* refname   */ ATTRIB(Seeker, netname, string, "seeker");
 /* wepname   */ ATTRIB(Seeker, m_name, string, _("T.A.G. Seeker"));
 
-#define MISSILE_MINS '-5 -5 -5' // 0.8.5 used '-4 -4 -4' (before sv_legacy_bbox_expand 0)
-#define MISSILE_MAXS '5 5 5'    // 0.8.5 used '4 4 4'    (before sv_legacy_bbox_expand 0)
-#define TAG_MINS     '-3 -3 -3' // 0.8.5 used '-2 -2 -2' (before sv_legacy_bbox_expand 0)
-#define TAG_MAXS     '3 3 3'    // 0.8.5 used '2 2 2'    (before sv_legacy_bbox_expand 0)
-#define FLAC_MINS    '-3 -3 -3' // 0.8.5 used '-2 -2 -2' (before sv_legacy_bbox_expand 0)
-#define FLAC_MAXS    '3 3 3'    // 0.8.5 used '2 2 2'    (before sv_legacy_bbox_expand 0)
-
 #define X(BEGIN, P, END, class, prefix) \
        BEGIN(class) \
        P(class, prefix, flac_ammo, float, NONE) \
index ac0a408f394794ffcc4c765ce4b5b39b87ec1fd7..4be54b6b220378c28746b2f864cc1bc730681e46 100644 (file)
@@ -194,7 +194,7 @@ void W_RocketMinsta_Attack(entity actor, .entity weaponentity, int mode)
        int laser_count = max(1, autocvar_g_rm_laser_count);
        int total = (mode == 0) ? laser_count : 1;
        Sound snd = (mode == 0) ? SND_CRYLINK_FIRE : SND_ELECTRO_FIRE2;
-       W_SetupShot_ProjectileSize(actor, weaponentity, RM_MINS, RM_MAXS, false, 2, snd, CH_WEAPON_A, autocvar_g_rm_laser_damage, WEP_ELECTRO.m_id);
+       W_SetupShot_ProjectileSize(actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, snd, CH_WEAPON_A, autocvar_g_rm_laser_damage, WEP_ELECTRO.m_id);
 
        // uses electro effects
        W_MuzzleFlash(WEP_ELECTRO, actor, weaponentity, w_shotorg, w_shotdir);
@@ -230,7 +230,7 @@ void W_RocketMinsta_Attack(entity actor, .entity weaponentity, int mode)
                proj.velocity = W_CalculateProjectileVelocity(actor, actor.velocity, proj.velocity, true);
                proj.angles = vectoangles(proj.velocity);
                settouch(proj, W_RocketMinsta_Laser_Touch);
-               setsize(proj, RM_MINS, RM_MAXS);
+               setsize(proj, '0 0 -3', '0 0 -3');
                proj.flags = FL_PROJECTILE;
                IL_PUSH(g_projectiles, proj);
                IL_PUSH(g_bot_dodge, proj);
index 1df620995717c20472755ac4d2f42f7ad6bfaa1b..83a1660ccc6eb15fe091727b6bd991f3f45d6da2 100644 (file)
@@ -21,9 +21,6 @@ CLASS(Vaporizer, Weapon)
 /* wepname   */ ATTRIB(Vaporizer, m_name, string, _("Vaporizer"));
 /* legacy    */ ATTRIB(Vaporizer, m_deprecated_netname, string, "minstanex");
 
-#define RM_MINS '-1 -1 -4' // 0.8.5 used '0 0 -3' (before sv_legacy_bbox_expand 0)
-#define RM_MAXS '1 1 -2'   // 0.8.5 used '0 0 -3' (before sv_legacy_bbox_expand 0)
-
 #define X(BEGIN, P, END, class, prefix) \
        BEGIN(class) \
                P(class, prefix, ammo, float, PRI) \
index 5bc00c1506a4e202fe4891d12e1aeac021c34fc1..a50830348a49caaf109b60fd7269ca3fc02c1554 100644 (file)
@@ -370,7 +370,7 @@ void FireGrapplingHook(entity actor, .entity weaponentity)
        vector vs = hook_shotorigin[s];
        vector oldmovedir = actor.(weaponentity).movedir;
        actor.(weaponentity).movedir = vs;
-       W_SetupShot_ProjectileSize(actor, weaponentity, HOOK_MINS, HOOK_MAXS, true, 0, SND_HOOK_FIRE, CH_WEAPON_B, 0, WEP_HOOK.m_id);
+       W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', true, 0, SND_HOOK_FIRE, CH_WEAPON_B, 0, WEP_HOOK.m_id);
        W_MuzzleFlash(WEP_HOOK, actor, weaponentity, w_shotorg, '0 0 0');
        actor.(weaponentity).movedir = oldmovedir;
 
@@ -388,7 +388,7 @@ void FireGrapplingHook(entity actor, .entity weaponentity)
        PROJECTILE_MAKETRIGGER(missile);
 
        //setmodel (missile, MDL_HOOK); // precision set below
-       setsize (missile, HOOK_MINS, HOOK_MAXS);
+       setsize (missile, '-3 -3 -3', '3 3 3');
        setorigin(missile, w_shotorg);
 
        missile.state = 0; // not latched onto anything
index 2af2b66d3005cb5c7a3aab64396739b5063e1abd..1b0729bd05ffe5d9bc7b53ef865bf0c06ebbc92f 100644 (file)
@@ -35,5 +35,3 @@ const float HOOK_WAITING_FOR_RELEASE = BIT(4);
 
 vector hook_shotorigin[4];
 
-#define HOOK_MINS '-4 -4 -4' // 0.8.5 used '-3 -3 -3' (before sv_legacy_bbox_expand 0)
-#define HOOK_MAXS '4 4 4'    // 0.8.5 used '3 3 3'    (before sv_legacy_bbox_expand 0)
index fb790b0fce1dc29e5d1bd299049f245ecdea9461..779226be3dfc98ded7bb21b56042e9ac54265b40 100644 (file)
@@ -24,14 +24,7 @@ bool WarpZone_Projectile_Touch_ImpactFilter_Callback(entity this, entity toucher
 
 .entity realowner;
 
-// if these are too big the max possible blaster jump height is increased a little
-const vector UNHITTABLEPROJ_MINS = '-0.015625 -0.015625 -0.015625'; // 0.8.5 set '0 0 0' (before sv_legacy_bbox_expand 0)
-const vector UNHITTABLEPROJ_MAXS = '0.015625 0.015625 0.015625';    // 0.8.5 set '0 0 0' (before sv_legacy_bbox_expand 0)
-const int CLIPGROUP_UNHITTABLEPROJ = 1;        // these projectiles cannot deflect or destroy each other
-// TODO: remove the following clipgroup comparison, which is included for backwards compatibility, after upgrading DP:
-// in DP versions with DP_RM_CLIPGROUP, the touch func isn't called when the clipgroup is a matching non zero integer.
-// see: https://gitlab.com/xonotic/xonotic-data.pk3dir/-/merge_requests/1131
-#define PROJECTILE_TOUCH(e,t) if (((e).clipgroup && (e).clipgroup == (t).clipgroup) || ((e).solid == SOLID_TRIGGER && (t).solid == SOLID_TRIGGER) || WarpZone_Projectile_Touch(e,t)) return
+#define PROJECTILE_TOUCH(e,t) MACRO_BEGIN if (WarpZone_Projectile_Touch(e,t)) return; MACRO_END
 
 #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
 // when doing this, hagar can go through clones
index 95376b64bb89d8ca6981dd22ea2ce2c8905d1291..94b3be212e3ec472932c4d666f5716843fb11eff 100644 (file)
@@ -29,11 +29,11 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vect
 #define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype) \
        W_SetupShot_Dir_ProjectileSize(ent, wepent, v_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
 #define W_SetupShot_Dir(ent, wepent, s_forward, antilag, recoil, snd, chan, maxdamage, deathtype) \
-       W_SetupShot_Dir_ProjectileSize(ent, wepent, s_forward, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS, antilag, recoil, snd, chan, maxdamage, deathtype)
+       W_SetupShot_Dir_ProjectileSize(ent, wepent, s_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, deathtype)
 #define W_SetupShot(ent, wepent, antilag, recoil, snd, chan, maxdamage, deathtype) \
-       W_SetupShot_ProjectileSize(ent, wepent, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS, antilag, recoil, snd, chan, maxdamage, deathtype)
+       W_SetupShot_ProjectileSize(ent, wepent, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, deathtype)
 #define W_SetupShot_Range(ent, wepent, antilag, recoil, snd, chan, maxdamage, range, deathtype) \
-       W_SetupShot_Dir_ProjectileSize_Range(ent, wepent, v_forward, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS, antilag, recoil, snd, chan, maxdamage, range, deathtype)
+       W_SetupShot_Dir_ProjectileSize_Range(ent, wepent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, range, deathtype)
 
 vector W_CalculateProjectileVelocity(entity actor, vector pvelocity, vector mvelocity, float forceAbsolute);