- Duke: Replace CraneDef y with pos.Y calls.

This commit is contained in:
Mitchell Richters 2021-12-30 22:28:48 +11:00
parent 8006d8e394
commit 3dfcbafd93
4 changed files with 5 additions and 5 deletions

View file

@ -757,9 +757,9 @@ void movecrane(DDukeActor *actor, int crane)
{ {
if (actor->spr.xvel < 192) if (actor->spr.xvel < 192)
actor->spr.xvel += 8; actor->spr.xvel += 8;
actor->spr.ang = getangle(cpt.pos.X - actor->spr.pos.X, cpt.y - actor->spr.pos.Y); actor->spr.ang = getangle(cpt.pos.X - actor->spr.pos.X, cpt.pos.Y - actor->spr.pos.Y);
ssp(actor, CLIPMASK0); ssp(actor, CLIPMASK0);
if (((actor->spr.pos.X - cpt.pos.X) * (actor->spr.pos.X - cpt.pos.X) + (actor->spr.pos.Y - cpt.y) * (actor->spr.pos.Y - cpt.y)) < (128 * 128)) if (((actor->spr.pos.X - cpt.pos.X) * (actor->spr.pos.X - cpt.pos.X) + (actor->spr.pos.Y - cpt.pos.Y) * (actor->spr.pos.Y - cpt.pos.Y)) < (128 * 128))
actor->temp_data[0]++; actor->temp_data[0]++;
} }

View file

@ -68,7 +68,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, CraneDef& w, Crane
if (arc.BeginObject(keyname)) if (arc.BeginObject(keyname))
{ {
arc("x", w.pos.X) arc("x", w.pos.X)
("y", w.y) ("y", w.pos.Y)
("z", w.z) ("z", w.z)
("polex", w.polex) ("polex", w.polex)
("poley", w.poley) ("poley", w.poley)

View file

@ -483,7 +483,7 @@ void initcrane(DDukeActor* actj, DDukeActor* act, int CRANEPOLE)
auto& apt = cranes[act->temp_data[4]]; auto& apt = cranes[act->temp_data[4]];
apt.pos.X = act->spr.pos.X; apt.pos.X = act->spr.pos.X;
apt.y = act->spr.pos.Y; apt.pos.Y = act->spr.pos.Y;
apt.z = act->spr.pos.Z; apt.z = act->spr.pos.Z;
apt.poleactor = nullptr; apt.poleactor = nullptr;

View file

@ -164,7 +164,7 @@ struct player_orig
struct CraneDef struct CraneDef
{ {
vec3_t pos; vec3_t pos;
int y, z; int pos.Y, z;
int polex, poley; int polex, poley;
TObjPtr<DDukeActor*> poleactor; TObjPtr<DDukeActor*> poleactor;
}; };