Skip to content

Commit

Permalink
Client: Replace all calls from View_EjectShell to View_EjectShellAtta…
Browse files Browse the repository at this point in the history
…chment
  • Loading branch information
eukara committed Mar 17, 2021
1 parent 29009ff commit 14c23b5
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 20 deletions.
6 changes: 5 additions & 1 deletion src/client/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ struct
entity m_eViewModel;
entity m_eMuzzleflash;
int m_iVMBones;
int m_iVMEjectBone;

/* viewmodel shell ejection */
float m_fEjectModel;
vector m_vecEjectPos;
vector m_vecEjectVel;

int m_iLastWeapon;
int m_iOldWeapon;
float m_flBobTime;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_ak47.qc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ w_ak47_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_RIFLE, 0);
View_EjectShellAttachment(SHELL_RIFLE, 0, [0, -80, 100]);

int r = (float)input_sequence % 3;
switch (r) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_aug.qc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ w_aug_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_RIFLE, 0);
View_EjectShellAttachment(SHELL_RIFLE, 0, [0, -80, 100]);

int r = (float)input_sequence % 3;
switch (r) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_deagle.qc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ w_deagle_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_PISTOL, 0);
View_EjectShellAttachment(SHELL_PISTOL, 0, [0, -80, 100]);

if (pl.deagle_mag <= 0) {
Weapons_ViewAnimation(DEAGLE_SHOOT_EMPTY);
Expand Down
4 changes: 2 additions & 2 deletions src/shared/w_elites.qc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ w_elites_primary(void)

int r = (float)input_sequence % 5;
if (pl.mode_temp) {
View_EjectShell(SHELL_PISTOL, 1);
View_EjectShellAttachment(SHELL_PISTOL, 1, [0, -80, 100]);

if (pl.elites_mag <= 0) {
Weapons_ViewAnimation(ELITES_SHOOT_LEFTLAST);
Expand All @@ -168,7 +168,7 @@ w_elites_primary(void)
}
}
} else {
View_EjectShell(SHELL_PISTOL, 0);
View_EjectShellAttachment(SHELL_PISTOL, 0, [0, 80, 100]);
if (pl.elites_mag <= 0) {
Weapons_ViewAnimation(ELITES_SHOOT_RIGHTLAST);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_fiveseven.qc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ w_fiveseven_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_PISTOL, 0);
View_EjectShellAttachment(SHELL_PISTOL, 0, [0, -80, 100]);

if (pl.fiveseven_mag <= 0) {
Weapons_ViewAnimation(FIVESEVEN_SHOOT_EMPTY);
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_g3sg1.qc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ w_g3sg1_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_RIFLE, 0);
View_EjectShellAttachment(SHELL_RIFLE, 0, [0, -80, 100]);

int r = (float)input_sequence % 2;
switch (r) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_glock18.qc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ w_glock18_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_PISTOL, 0);
View_EjectShellAttachment(SHELL_PISTOL, 0, [0, -80, 100]);
#else

if (pl.flags & FL_CROUCHING)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_m4a1.qc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ w_m4a1_primary(void)
} else {
View_SetMuzzleflash(MUZZLE_RIFLE);
}
View_EjectShell(SHELL_RIFLE, 0);
View_EjectShellAttachment(SHELL_RIFLE, 0, [0, -80, 100]);

/* this stuff is predicted */
int r = (float)input_sequence % 3;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_mac10.qc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ w_mac10_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_PISTOL, 0);
View_EjectShellAttachment(SHELL_PISTOL, 0, [0, -80, 100]);

int r = (float)input_sequence % 3;
switch (r) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_mp5.qc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ w_mp5_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_RIFLE, 0);
View_EjectShellAttachment(SHELL_RIFLE, 0, [0, -80, 100]);

int r = (float)input_sequence % 3;
switch (r) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_p228.qc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ w_p228_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_PISTOL, 0);
View_EjectShellAttachment(SHELL_PISTOL, 0, [0, -80, 100]);

if (pl.p228_mag <= 0) {
Weapons_ViewAnimation(P228_SHOOT_EMPTY);
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_p90.qc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ w_p90_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_PISTOL, 0);
View_EjectShellAttachment(SHELL_PISTOL, 0, [0, -80, 100]);

int r = (float)input_sequence % 3;
switch (r) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_para.qc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ w_para_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_RIFLE, 0);
View_EjectShellAttachment(SHELL_RIFLE, 0, [0, -80, 100]);

int r = (float)input_sequence % 2;
switch (r) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_sg550.qc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ w_sg550_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_RIFLE, 0);
View_EjectShellAttachment(SHELL_RIFLE, 0, [0, -80, 100]);

int r = (float)input_sequence % 2;
switch (r) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_sg552.qc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ w_sg552_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_RIFLE, 0);
View_EjectShellAttachment(SHELL_RIFLE, 0, [0, -80, 100]);

int r = (float)input_sequence % 3;
switch (r) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_tmp.qc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ w_tmp_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_PISTOL, 0);
View_EjectShellAttachment(SHELL_PISTOL, 0, [0, -80, 100]);

int r = (float)input_sequence % 3;
switch (r) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_ump45.qc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ w_ump45_primary(void)

#ifdef CLIENT
View_SetMuzzleflash(MUZZLE_RIFLE);
View_EjectShell(SHELL_PISTOL, 0);
View_EjectShellAttachment(SHELL_PISTOL, 0, [0, -80, 100]);
#else
TraceAttack_SetPenetrationPower(0);
TraceAttack_FireBullets(1, pl.origin + pl.view_ofs, 30, [accuracy,accuracy], WEAPON_UMP45);
Expand Down
2 changes: 1 addition & 1 deletion src/shared/w_usp45.qc
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ w_usp45_primary(void)
View_SetMuzzleflash(MUZZLE_SMALL);
}

View_EjectShell(SHELL_PISTOL, 0);
View_EjectShellAttachment(SHELL_PISTOL, 0, [0, -80, 100]);
#else
/* Different sounds without silencer */
if (pl.mode_usp45 == 1) {
Expand Down

0 comments on commit 14c23b5

Please sign in to comment.