]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/mortar.qc
Remove legacy Quake bbox expansion: projectiles
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / mortar.qc
index 2152accff03f070d74a8875d4ad8b01e9cfd3dee..0a543cbbe9c2c65d5953ede23a884e6babc436da 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, '-3 -3 -3', '3 3 3', false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(mortar, damage), thiswep.m_id);
+       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_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, '-3 -3 -3', '3 3 3');
+       setsize(gren, GREN_MINS, GREN_MAXS);
 
        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, '-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_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_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, '-3 -3 -3', '3 3 3');
+       setsize(gren, GREN_MINS, GREN_MAXS);
 
        gren.nextthink = time + WEP_CVAR_SEC(mortar, lifetime);
        setthink(gren, adaptor_think2use_hittype_splash);
@@ -358,7 +358,8 @@ METHOD(Mortar, wr_killmessage, Notification(entity thiswep))
 
 METHOD(Mortar, wr_impacteffect, void(entity thiswep, entity actor))
 {
-    pointparticles(EFFECT_GRENADE_EXPLODE, w_org + w_backoff, '0 0 0', 1);
+    vector org2 = w_org + w_backoff * 2;
+    pointparticles(EFFECT_GRENADE_EXPLODE, org2, '0 0 0', 1);
     if(!w_issilent)
         sound(actor, CH_SHOTS, SND_GRENADE_IMPACT, VOL_BASE, ATTN_NORM);
 }