Replace calls to TraceAttack_FireBullets() with the new TraceAttack_FireBulletsWithDecal(), thus fixing missing bullet decals.

This commit is contained in:
Marco Cawthorne 2022-12-28 15:00:18 -08:00
parent 27f04a0ee9
commit 8ce747c212
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
22 changed files with 22 additions and 22 deletions

View File

@ -179,7 +179,7 @@ w_ak47_primary(player pl)
#else
TraceAttack_SetRangeModifier(2.375); /* 18 units!!! */
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 36, [accuracy,accuracy], WEAPON_AK47);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 36, [accuracy,accuracy], WEAPON_AK47, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_ak47.fire");
#endif

View File

@ -145,7 +145,7 @@ w_aug_primary(player pl)
#else
TraceAttack_SetRangeModifier(2.125);
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 32, [accuracy,accuracy], WEAPON_AUG);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 32, [accuracy,accuracy], WEAPON_AUG, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_aug.fire");
#endif

View File

@ -236,7 +236,7 @@ w_awp_primary(player pl)
#else
TraceAttack_SetRangeModifier(1.375);
TraceAttack_SetPenetrationPower(2); /* however, we can only penetrate one wall if the first one is 5 units thick or higher */
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 115, [accuracy,accuracy], WEAPON_AWP);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 115, [accuracy,accuracy], WEAPON_AWP, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_awp.fire");
#endif

View File

@ -178,7 +178,7 @@ w_deagle_primary(player pl)
#else
TraceAttack_SetRangeModifier(1.875); /* 14 but not 15 */
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 54, [accuracy,accuracy], WEAPON_DEAGLE);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 54, [accuracy,accuracy], WEAPON_DEAGLE, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_deagle.fire");
#endif

View File

@ -250,7 +250,7 @@ w_elites_primary(player pl)
#else
TraceAttack_SetRangeModifier(1.875); /* 14 but not 15 */
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 45, [accuracy,accuracy], WEAPON_ELITES);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 45, [accuracy,accuracy], WEAPON_ELITES, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_elites.fire");
#endif

View File

@ -149,7 +149,7 @@ w_fiveseven_primary(player pl)
#else
TraceAttack_SetRangeModifier(1.875); /* 14 but not 15 */
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 25, [accuracy,accuracy], WEAPON_FIVESEVEN);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 25, [accuracy,accuracy], WEAPON_FIVESEVEN, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_fiveseven.fire");
#endif

View File

@ -140,7 +140,7 @@ w_g3sg1_primary(player pl)
#else
TraceAttack_SetRangeModifier(2.375);
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 80, [accuracy,accuracy], WEAPON_G3SG1);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 80, [accuracy,accuracy], WEAPON_G3SG1, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_g3sg1.fire");
#endif

View File

@ -148,7 +148,7 @@ w_glock18_primary(player pl)
#ifdef SERVER
TraceAttack_SetRangeModifier(1.25); /* penetrates 9 units, but not 10 */
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 25, [accuracy,accuracy], WEAPON_GLOCK18);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 25, [accuracy,accuracy], WEAPON_GLOCK18, "Impact.BigShot");
#endif
}

View File

@ -207,7 +207,7 @@ w_m3_primary(player pl)
Cstrike_ShotMultiplierAdd(pl, 1);
pl.punchangle[0] = -4 * (9 / 6);
#ifdef SERVER
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 26, [random(-1,1) * 0.1,random(-1,1) * 0.05], WEAPON_M3);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 26, [random(-1,1) * 0.1,random(-1,1) * 0.05], WEAPON_M3, "Impact.BigShot");
#endif
}

View File

@ -186,7 +186,7 @@ w_m4a1_primary(player pl)
TraceAttack_SetRangeModifier(2.125);
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 33, [accuracy,accuracy], WEAPON_M4A1);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 33, [accuracy,accuracy], WEAPON_M4A1, "Impact.BigShot");
#endif
pl.w_attack_next = 0.0875f;

View File

@ -144,7 +144,7 @@ w_mac10_primary(player pl)
#else
TraceAttack_SetRangeModifier(1.25); /* 9, but not 10 */
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 29, [accuracy,accuracy], WEAPON_MAC10);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 29, [accuracy,accuracy], WEAPON_MAC10, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_mac10.fire");
#endif

View File

@ -142,7 +142,7 @@ w_mp5_primary(player pl)
#else
TraceAttack_SetRangeModifier(1.25); /* 9 units but not 10 */
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 26, [accuracy,accuracy], WEAPON_MP5);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 26, [accuracy,accuracy], WEAPON_MP5, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_mp5.fire");
#endif

View File

@ -149,7 +149,7 @@ w_p228_primary(player pl)
#else
TraceAttack_SetRangeModifier(1.5); /* penetrates 11, but not 12 units */
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 40, [accuracy,accuracy], WEAPON_P228);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 40, [accuracy,accuracy], WEAPON_P228, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_p228.fire");
#endif

View File

@ -142,7 +142,7 @@ w_p90_primary(player pl)
#else
TraceAttack_SetRangeModifier(1.875); /* 9 but not 10 */
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 26, [accuracy,accuracy], WEAPON_P90);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 26, [accuracy,accuracy], WEAPON_P90, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_p90.fire");
#endif

View File

@ -138,7 +138,7 @@ w_para_primary(player pl)
#else
TraceAttack_SetRangeModifier(2.125);
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 35, [accuracy,accuracy], WEAPON_PARA);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 35, [accuracy,accuracy], WEAPON_PARA, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_para.fire");
#endif

View File

@ -199,7 +199,7 @@ w_scout_primary(player pl)
#else
TraceAttack_SetRangeModifier(2.375);
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 75, [accuracy,accuracy], WEAPON_SCOUT);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 75, [accuracy,accuracy], WEAPON_SCOUT, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_scout.fire");
#endif

View File

@ -139,7 +139,7 @@ w_sg550_primary(player pl)
#else
TraceAttack_SetRangeModifier(2.125);
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 70, [accuracy,accuracy], WEAPON_SG550);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 70, [accuracy,accuracy], WEAPON_SG550, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_sg550.fire");
#endif

View File

@ -142,7 +142,7 @@ w_sg552_primary(player pl)
#else
TraceAttack_SetRangeModifier(2.125);
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 33, [accuracy,accuracy], WEAPON_SG552);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 33, [accuracy,accuracy], WEAPON_SG552, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_sg552.fire");
#endif

View File

@ -142,7 +142,7 @@ w_tmp_primary(player pl)
#else
TraceAttack_SetRangeModifier(1.25); /* 9 but not 10 */
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 26, [accuracy,accuracy], WEAPON_TMP);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 26, [accuracy,accuracy], WEAPON_TMP, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_tmp.fire");
#endif

View File

@ -142,7 +142,7 @@ w_ump45_primary(player pl)
#else
TraceAttack_SetRangeModifier(0.875); /* 6, but not 7 */
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 30, [accuracy,accuracy], WEAPON_UMP45);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 30, [accuracy,accuracy], WEAPON_UMP45, "Impact.BigShot");
Sound_Play(pl, CHAN_WEAPON, "weapon_ump45.fire");
#endif

View File

@ -198,7 +198,7 @@ w_usp45_primary(player pl)
/* actual firing */
TraceAttack_SetRangeModifier(0.79); /* can penetrate 6 but not 7 units */
TraceAttack_SetPenetrationPower(1);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 33, [accuracy,accuracy], WEAPON_USP45);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 33, [accuracy,accuracy], WEAPON_USP45, "Impact.BigShot");
#endif
pl.gflags |= GF_SEMI_TOGGLED;

View File

@ -206,7 +206,7 @@ w_xm1014_primary(player pl)
Cstrike_ShotMultiplierAdd(pl, 1);
pl.punchangle[0] = -4 * (6 / 6);
#ifdef SERVER
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 22, [random(-1,1) * 0.1,random(-1,1) * 0.05], WEAPON_M3);
TraceAttack_FireBulletsWithDecal(1, pl.origin + pl.view_ofs, 22, [random(-1,1) * 0.1,random(-1,1) * 0.05], WEAPON_M3, "Impact.BigShot");
#endif
}