mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-17 01:01:09 +00:00
- Duke: Clean up player/actor accesses in displayweapon_*()
.
This commit is contained in:
parent
27d859229f
commit
f3bc7d9ce0
5 changed files with 6 additions and 8 deletions
|
@ -53,8 +53,8 @@ void checkweapons_d(DDukePlayer* p);
|
|||
void checkweapons_r(DDukePlayer* p);
|
||||
void processinput_d(int snum);
|
||||
void processinput_r(int snum);
|
||||
void displayweapon_d(int snum, double interpfrac);
|
||||
void displayweapon_r(int snum, double interpfrac);
|
||||
void displayweapon_d(DDukePlayer* const p, double interpfrac);
|
||||
void displayweapon_r(DDukePlayer* const p, double interpfrac);
|
||||
void displaymasks_d(DDukePlayer* const p, int pal, double interpfrac);
|
||||
void displaymasks_r(DDukePlayer* const p, int pal, double interpfrac);
|
||||
void think_d();
|
||||
|
|
|
@ -83,7 +83,7 @@ struct Dispatcher
|
|||
int (*doincrements)(DDukePlayer* p);
|
||||
void (*checkweapons)(DDukePlayer* p);
|
||||
void (*processinput)(int snum);
|
||||
void (*displayweapon)(int snum, double interpfrac);
|
||||
void (*displayweapon)(DDukePlayer* const p, double interpfrac);
|
||||
void (*displaymasks)(DDukePlayer* const p, int pal, double interpfrac);
|
||||
|
||||
void (*animatesprites)(tspriteArray& tsprites, const DVector2& viewVec, DAngle viewang, double interpfrac);
|
||||
|
|
|
@ -196,7 +196,7 @@ void V_AddBlend (float r, float g, float b, float a, float v_blend[4])
|
|||
cameratext(pp->newOwner);
|
||||
else
|
||||
{
|
||||
fi.displayweapon(screenpeek, interpfrac);
|
||||
fi.displayweapon(pp, interpfrac);
|
||||
if (pp->over_shoulder_on == 0)
|
||||
fi.displaymasks(pp, pp->GetActor()->spr.pal == 1 || !pp->insector() ? 1 : pp->cursector->floorpal, interpfrac);
|
||||
}
|
||||
|
|
|
@ -217,10 +217,9 @@ void animateshrunken(DDukePlayer* p, double xoffset, double yoffset, int8_t shad
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void displayweapon_d(int snum, double interpfrac)
|
||||
void displayweapon_d(DDukePlayer* const p, double interpfrac)
|
||||
{
|
||||
int pal, pal2;
|
||||
DDukePlayer* p = getPlayer(snum);
|
||||
|
||||
if (p->newOwner != nullptr || ud.cameraactor != nullptr || p->over_shoulder_on > 0 || (p->GetActor()->spr.pal != 1 && p->GetActor()->spr.extra <= 0))
|
||||
return;
|
||||
|
|
|
@ -210,12 +210,11 @@ void DrawBoat(int const kb, const DVector2& offsets, DAngle angle, int shade, in
|
|||
//---------------------------------------------------------------------------
|
||||
void animateshrunken(DDukePlayer* p, double xoffset, double yoffset, int8_t shade, int o, double interpfrac);
|
||||
|
||||
void displayweapon_r(int snum, double interpfrac)
|
||||
void displayweapon_r(DDukePlayer* const p, double interpfrac)
|
||||
{
|
||||
double weapon_sway, gun_pos, hard_landing;
|
||||
DAngle TiltStatus;
|
||||
|
||||
auto p = getPlayer(snum);
|
||||
auto kb = &p->kickback_pic;
|
||||
|
||||
int o = 0;
|
||||
|
|
Loading…
Reference in a new issue