mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
Tie a few random things previously hardcoded to p->curr_weapon == KNEE_WEAPON to curr_weapon being a weapon with a workslike of KNEE_WEAPON instead, and do the same with stuff hard coded for HANDREMOTE_WEAPON
git-svn-id: https://svn.eduke32.com/eduke32@4650 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
57cc3fe82a
commit
3eaf78da8b
5 changed files with 13 additions and 11 deletions
|
@ -4261,7 +4261,9 @@ ACTOR_STATIC void G_MoveActors(void)
|
|||
s->ang = ps->ang;
|
||||
|
||||
if ((TEST_SYNC_KEY(g_player[p].sync->bits, SK_FIRE) || (ps->quick_kick > 0)) && sprite[ps->i].extra > 0)
|
||||
if (ps->quick_kick > 0 || (ps->curr_weapon != HANDREMOTE_WEAPON && ps->curr_weapon != HANDBOMB_WEAPON && ps->curr_weapon != TRIPBOMB_WEAPON && ps->ammo_amount[ps->curr_weapon] >= 0))
|
||||
if (ps->quick_kick > 0 ||
|
||||
(PWEAPON(p, ps->curr_weapon, WorksLike) != HANDREMOTE_WEAPON && PWEAPON(p, ps->curr_weapon, WorksLike) != HANDBOMB_WEAPON &&
|
||||
PWEAPON(p, ps->curr_weapon, WorksLike) != TRIPBOMB_WEAPON && ps->ammo_amount[ps->curr_weapon] >= 0))
|
||||
{
|
||||
for (x=0; x<8; x++)
|
||||
{
|
||||
|
|
|
@ -2059,14 +2059,14 @@ static void G_DrawStatusBar(int32_t snum)
|
|||
G_DrawAltDigiNum(105,-(hudoffset-22),lAmount,-16,10+16+256);
|
||||
}
|
||||
|
||||
i = (p->curr_weapon == PISTOL_WEAPON) ? 16384 : 32768;
|
||||
i = (tilesiz[ammo_sprites[p->curr_weapon]].y > 50) ? 16384 : 32768;
|
||||
|
||||
rotatesprite_althudr(57,hudoffset-15,sbarsc(i),0,ammo_sprites[p->curr_weapon],0,0,10+512);
|
||||
|
||||
if (p->curr_weapon == HANDREMOTE_WEAPON) i = HANDBOMB_WEAPON;
|
||||
if (PWEAPON(snum, p->curr_weapon, WorksLike) == HANDREMOTE_WEAPON) i = HANDBOMB_WEAPON;
|
||||
else i = p->curr_weapon;
|
||||
|
||||
if (p->curr_weapon != KNEE_WEAPON &&
|
||||
if (PWEAPON(snum, p->curr_weapon, WorksLike) != KNEE_WEAPON &&
|
||||
(!althud_flashing || totalclock&32 || p->ammo_amount[i] > (p->max_ammo_amount[i]/10)))
|
||||
G_DrawAltDigiNum(-20,-(hudoffset-22),p->ammo_amount[i],-16,10+16+512);
|
||||
|
||||
|
@ -2155,7 +2155,7 @@ static void G_DrawStatusBar(int32_t snum)
|
|||
|
||||
rotatesprite_fs(sbarx(37), yofssh+sbary(200-28), sb16, 0, AMMOBOX, 0, 21, orient);
|
||||
|
||||
if (p->curr_weapon == HANDREMOTE_WEAPON)
|
||||
if (PWEAPON(snum, p->curr_weapon, WorksLike) == HANDREMOTE_WEAPON)
|
||||
i = HANDBOMB_WEAPON;
|
||||
else
|
||||
i = p->curr_weapon;
|
||||
|
@ -2379,9 +2379,9 @@ static void G_DrawStatusBar(int32_t snum)
|
|||
if (u&1024)
|
||||
{
|
||||
if (u != -1) G_PatchStatusBar(196,SBY+17,219,SBY+17+11);
|
||||
if (p->curr_weapon != KNEE_WEAPON)
|
||||
if (PWEAPON(snum, p->curr_weapon, WorksLike) != KNEE_WEAPON)
|
||||
{
|
||||
if (p->curr_weapon == HANDREMOTE_WEAPON) i = HANDBOMB_WEAPON;
|
||||
if (PWEAPON(snum, p->curr_weapon, WorksLike) == HANDREMOTE_WEAPON) i = HANDBOMB_WEAPON;
|
||||
else i = p->curr_weapon;
|
||||
G_DrawDigiNum(230-22,SBY+17,p->ammo_amount[i],-16,10+16);
|
||||
}
|
||||
|
|
|
@ -842,7 +842,7 @@ static void P_AddWeaponAmmoCommon(DukePlayer_t *ps, int32_t weap, int32_t amount
|
|||
{
|
||||
P_AddAmmo(weap, ps, amount);
|
||||
|
||||
if (ps->curr_weapon == KNEE_WEAPON && (ps->gotweapon & (1 << weap)))
|
||||
if (PWEAPON(vm.g_p, ps->curr_weapon, WorksLike) == KNEE_WEAPON && (ps->gotweapon & (1 << weap)))
|
||||
P_AddWeaponMaybeSwitch(ps, weap);
|
||||
}
|
||||
|
||||
|
@ -3483,7 +3483,7 @@ nullquote:
|
|||
j = 1;
|
||||
else if ((l&256) && s <= -8 && TEST_SYNC_KEY(g_player[vm.g_p].sync->bits, SK_RUN))
|
||||
j = 1;
|
||||
else if ((l&512) && (ps->quick_kick > 0 || (ps->curr_weapon == KNEE_WEAPON && ps->kickback_pic > 0)))
|
||||
else if ((l&512) && (ps->quick_kick > 0 || (PWEAPON(vm.g_p, ps->curr_weapon, WorksLike) == KNEE_WEAPON && ps->kickback_pic > 0)))
|
||||
j = 1;
|
||||
else if ((l&1024) && sprite[ps->i].xrepeat < 32)
|
||||
j = 1;
|
||||
|
|
|
@ -943,7 +943,7 @@ static void resetprestat(int32_t snum,int32_t g)
|
|||
P_ResetWeapons(snum);
|
||||
P_ResetInventory(snum);
|
||||
}
|
||||
else if (p->curr_weapon == HANDREMOTE_WEAPON)
|
||||
else if (PWEAPON(snum, p->curr_weapon, WorksLike) == HANDREMOTE_WEAPON)
|
||||
{
|
||||
p->ammo_amount[HANDBOMB_WEAPON]++;
|
||||
p->curr_weapon = HANDBOMB_WEAPON;
|
||||
|
|
|
@ -2400,7 +2400,7 @@ void P_HandleSharedKeys(int32_t snum)
|
|||
p->return_to_center = 9;
|
||||
|
||||
if (TEST_SYNC_KEY(sb_snum, SK_QUICK_KICK) && p->quick_kick == 0)
|
||||
if (p->curr_weapon != KNEE_WEAPON || p->kickback_pic == 0)
|
||||
if (PWEAPON(snum, p->curr_weapon, WorksLike) != KNEE_WEAPON || p->kickback_pic == 0)
|
||||
{
|
||||
if (VM_OnEvent(EVENT_QUICKKICK,g_player[snum].ps->i,snum, -1, 0) == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue