mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- Duke: Move player_struct::restorexyz()
to DCoreActor::restorepos()
.
This commit is contained in:
parent
a78d976352
commit
6eeedbd38a
7 changed files with 12 additions and 11 deletions
|
@ -139,6 +139,12 @@ public:
|
|||
backupang();
|
||||
}
|
||||
|
||||
void restorepos()
|
||||
{
|
||||
spr.pos = opos;
|
||||
viewzoffset = oviewzoffset;
|
||||
}
|
||||
|
||||
sectortype* sector() const
|
||||
{
|
||||
return spr.sectp;
|
||||
|
|
|
@ -203,7 +203,7 @@ void checkavailweapon(player_struct* player)
|
|||
void clearcamera(player_struct* ps)
|
||||
{
|
||||
ps->newOwner = nullptr;
|
||||
ps->restorexyz();
|
||||
ps->GetActor()->restorepos();
|
||||
ps->angle.restore();
|
||||
updatesector(ps->posGet(), &ps->cursector);
|
||||
|
||||
|
|
|
@ -1734,7 +1734,7 @@ static void greenslime(DDukeActor *actor)
|
|||
if (ps[p].newOwner != nullptr)
|
||||
{
|
||||
ps[p].newOwner = nullptr;
|
||||
ps[p].restorexyz();
|
||||
ps[p].GetActor()->restorepos();
|
||||
ps[p].angle.restore();
|
||||
|
||||
updatesector(ps[p].posGet(), &ps[p].cursector);
|
||||
|
|
|
@ -2045,7 +2045,7 @@ int ParseState::parse(void)
|
|||
if(!isRR() && ps[g_p].newOwner != nullptr)
|
||||
{
|
||||
ps[g_p].newOwner = nullptr;
|
||||
ps[g_p].restorexyz();
|
||||
ps[g_p].GetActor()->restorepos();
|
||||
ps[g_p].angle.restore();
|
||||
updatesector(ps[g_p].posGet(), &ps[g_p].cursector);
|
||||
|
||||
|
|
|
@ -1061,7 +1061,7 @@ void checkhitdefault_d(DDukeActor* targ, DDukeActor* proj)
|
|||
if (ps[p].newOwner != nullptr)
|
||||
{
|
||||
ps[p].newOwner = nullptr;
|
||||
ps[p].restorexyz();
|
||||
ps[p].GetActor()->restorepos();
|
||||
ps[p].angle.restore();
|
||||
|
||||
updatesector(ps[p].posGet(), &ps[p].cursector);
|
||||
|
@ -1411,7 +1411,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
|
||||
void clearcameras(player_struct* p)
|
||||
{
|
||||
p->restorexyz();
|
||||
p->GetActor()->restorepos();
|
||||
p->newOwner = nullptr;
|
||||
|
||||
updatesector(p->posGet(), &p->cursector);
|
||||
|
|
|
@ -1544,7 +1544,7 @@ void checkhitdefault_r(DDukeActor* targ, DDukeActor* proj)
|
|||
if (ps[p].newOwner != nullptr)
|
||||
{
|
||||
ps[p].newOwner = nullptr;
|
||||
ps[p].restorexyz();
|
||||
ps[p].GetActor()->restorepos();
|
||||
|
||||
updatesector(ps[p].posGet(), &ps[p].cursector);
|
||||
|
||||
|
|
|
@ -330,11 +330,6 @@ struct player_struct
|
|||
return cursector != nullptr;
|
||||
}
|
||||
|
||||
void restorexyz()
|
||||
{
|
||||
GetActor()->spr.pos = GetActor()->opos;
|
||||
}
|
||||
|
||||
void backupxy()
|
||||
{
|
||||
GetActor()->opos.X = GetActor()->spr.pos.X;
|
||||
|
|
Loading…
Reference in a new issue