mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-14 20:01:18 +00:00
- Duke: Clean up player/actor accesses in addweapon_r.cpp
.
This commit is contained in:
parent
9a301d6e06
commit
8584745ce4
1 changed files with 4 additions and 3 deletions
|
@ -118,6 +118,7 @@ void addweapon_r(DukePlayer* p, int weapon, bool wswitch)
|
|||
p->curr_weapon = cw;
|
||||
p->wantweaponfire = -1;
|
||||
|
||||
const auto pact = p->GetActor();
|
||||
switch (weapon)
|
||||
{
|
||||
case SLINGBLADE_WEAPON:
|
||||
|
@ -128,13 +129,13 @@ void addweapon_r(DukePlayer* p, int weapon, bool wswitch)
|
|||
case THROWINGDYNAMITE_WEAPON:
|
||||
break;
|
||||
case SHOTGUN_WEAPON:
|
||||
S_PlayActorSound(SHOTGUN_COCK, p->GetActor());
|
||||
S_PlayActorSound(SHOTGUN_COCK, pact);
|
||||
break;
|
||||
case PISTOL_WEAPON:
|
||||
S_PlayActorSound(INSERT_CLIP, p->GetActor());
|
||||
S_PlayActorSound(INSERT_CLIP, pact);
|
||||
break;
|
||||
default:
|
||||
S_PlayActorSound(EJECT_CLIP, p->GetActor());
|
||||
S_PlayActorSound(EJECT_CLIP, pact);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue