- Duke: Pass player pointer through to alterang().

This commit is contained in:
Mitchell Richters 2023-10-03 19:36:36 +11:00 committed by Christoph Oelckers
parent 2720c6f8c6
commit b8ffcf3799
2 changed files with 3 additions and 4 deletions

View file

@ -1397,7 +1397,7 @@ void move(DDukeActor* actor, int pnum, double pdist)
dodge(actor);
if (!actor->isPlayer())
alterang(a, actor, pnum);
alterang(a, actor, p);
if (abs(actor->vel.X) < 6 / 16.) actor->vel.X = 0;
@ -4002,13 +4002,12 @@ int furthestcanseepoint(DDukeActor *actor, DDukeActor* tosee, DVector2& pos)
//
//---------------------------------------------------------------------------
void alterang(int ang, DDukeActor* actor, int playernum)
void alterang(int ang, DDukeActor* actor, DDukePlayer* const p)
{
DAngle goalang, aang, angdif;
int j;
int ticselapsed;
const auto p = getPlayer(playernum);
const auto pact = p->GetActor();
auto moveptr = &ScriptCode[actor->temp_data[1]];

View file

@ -87,7 +87,7 @@ void handle_se128(DDukeActor* i);
void handle_se130(DDukeActor* i, int countmax);
int dodge(DDukeActor*);
void alterang(int ang, DDukeActor* actor, int g_p);
void alterang(int ang, DDukeActor* actor, DDukePlayer* const p);
void checkavailweapon(DDukePlayer* p);
void addammo(int weapon, DDukePlayer* p, int amount);