mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +00:00
- SW: Replace PANEL_SPRITEstruct
xorig
with bobpos.X
calls.
This commit is contained in:
parent
36b549b7f1
commit
d8aab1ecea
3 changed files with 4 additions and 5 deletions
|
@ -6357,7 +6357,7 @@ void pWeaponBob(PANEL_SPRITEp psp, short condition)
|
|||
// Back up current coordinates for interpolating.
|
||||
psp->backupcoords();
|
||||
|
||||
psp->pos.X = psp->xorig + xdiff;
|
||||
psp->pos.X = psp->bobpos.X + xdiff;
|
||||
psp->pos.Y = psp->yorig + ydiff + UziRecoilYadj;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,8 +106,7 @@ struct PANEL_SPRITEstruct
|
|||
PANEL_STATEp State, RetractState, PresentState, ActionState, RestState;
|
||||
PLAYERp PlayerP;
|
||||
// Do not change the order of this line
|
||||
DVector2 pos, opos;
|
||||
double xorig;
|
||||
DVector2 pos, opos, bobpos;
|
||||
double yorig; // Do not change the order of this
|
||||
// line
|
||||
|
||||
|
@ -134,7 +133,7 @@ struct PANEL_SPRITEstruct
|
|||
void backupx() { opos.X = pos.X; };
|
||||
void backupy() { opos.Y = pos.Y; };
|
||||
void backupcoords() { opos = pos; };
|
||||
void backupbobx() { xorig = pos.X; };
|
||||
void backupbobx() { bobpos.X = pos.X; };
|
||||
void backupboby() { yorig = pos.Y; };
|
||||
void backupbobcoords() { backupbobx(); backupboby(); };
|
||||
};
|
||||
|
|
|
@ -338,7 +338,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PANEL_SPRITEstruct
|
|||
("picnum", w.picnum)
|
||||
("vel", w.vel)
|
||||
("vel_adj", w.vel_adj)
|
||||
("xorig", w.xorig)
|
||||
("xorig", w.bobpos.X)
|
||||
("yorig", w.yorig)
|
||||
("flags", w.flags)
|
||||
("priority", w.priority)
|
||||
|
|
Loading…
Reference in a new issue