WEAPON_SUPERSHOTGUN: make the shell eject nicer
This commit is contained in:
parent
3fea7639fe
commit
ccab59cb15
2 changed files with 22 additions and 6 deletions
|
@ -41,7 +41,7 @@ enum
|
|||
};
|
||||
|
||||
#ifdef CLIENT
|
||||
void w_supershotgun_ejectshell(void)
|
||||
void w_supershotgun_ejectshell_s(bool right)
|
||||
{
|
||||
static void w_supershotgun_ejectshell_death(void) {
|
||||
remove(self);
|
||||
|
@ -60,7 +60,12 @@ void w_supershotgun_ejectshell(void)
|
|||
|
||||
makevectors(pSeat->m_eViewModel.angles);
|
||||
eShell.velocity += (v_forward * 0);
|
||||
eShell.velocity += (v_right * 80);
|
||||
|
||||
if (right)
|
||||
eShell.velocity += (v_right * 80);
|
||||
else
|
||||
eShell.velocity += (v_right * -80);
|
||||
|
||||
eShell.velocity += (v_up * 100);
|
||||
eShell.touch = w_supershotgun_ejectshell_touch;
|
||||
|
||||
|
@ -68,7 +73,17 @@ void w_supershotgun_ejectshell(void)
|
|||
eShell.think = w_supershotgun_ejectshell_death;
|
||||
eShell.nextthink = time + 2.5f;
|
||||
setsize(eShell, [0,0,0], [0,0,0]);
|
||||
setorigin(eShell, pSeat->m_eViewModel.origin + (v_forward * 26) + (v_right * 8) + (v_up * -4));
|
||||
|
||||
if (right)
|
||||
setorigin(eShell, pSeat->m_eViewModel.origin + (v_forward * 28) + (v_right * 4) + (v_up * -18));
|
||||
else
|
||||
setorigin(eShell, pSeat->m_eViewModel.origin + (v_forward * 28) + (v_right * -4) + (v_up * -18));
|
||||
}
|
||||
|
||||
void w_supershotgun_ejectshell(void)
|
||||
{
|
||||
w_supershotgun_ejectshell_s(true);
|
||||
w_supershotgun_ejectshell_s(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -147,7 +162,7 @@ w_supershotgun_primary(player pl)
|
|||
pl.ammo_shells -= 2;
|
||||
|
||||
#ifdef CLIENT
|
||||
View_AddEvent(w_supershotgun_ejectshell, 0.0f);
|
||||
View_AddEvent(w_supershotgun_ejectshell, 0.325f);
|
||||
#else
|
||||
TraceAttack_FireBulletsWithDecal(14, pl.origin + pl.view_ofs, Skill_GetValue("plr_supershotgun", 4), [0.14,0.08], WEAPON_SUPERSHOTGUN, "Impact.BigShot");
|
||||
Sound_Play(pl, CHAN_WEAPON, "weapon_supershotgun.shoot");
|
||||
|
|
|
@ -50,8 +50,6 @@ q3a_entities
|
|||
replace misc_teleporter_dest info_null
|
||||
replace misc_portal_camera info_null
|
||||
replace target_delay info_null
|
||||
replace target_position info_null
|
||||
replace target_location info_null
|
||||
replace info_camp info_null
|
||||
replace info_player_intermission info_null
|
||||
replace holdable_teleporter info_null
|
||||
|
@ -71,6 +69,9 @@ q3a_entities
|
|||
replace holdable_medkit info_null
|
||||
replace func_bobbing info_null
|
||||
replace item_flight info_null
|
||||
replace target_push info_notnull
|
||||
replace target_position info_notnull
|
||||
replace target_location info_notnull
|
||||
|
||||
replace ammo_belt item_nails
|
||||
replace ammo_bfg item_cells
|
||||
|
|
Loading…
Reference in a new issue