mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 21:20:39 +00:00
- Duke: Replace CraneDef
x
with pos.X
calls.
This commit is contained in:
parent
788be33c1a
commit
8006d8e394
4 changed files with 6 additions and 5 deletions
|
@ -757,9 +757,9 @@ void movecrane(DDukeActor *actor, int crane)
|
|||
{
|
||||
if (actor->spr.xvel < 192)
|
||||
actor->spr.xvel += 8;
|
||||
actor->spr.ang = getangle(cpt.x - actor->spr.pos.X, cpt.y - actor->spr.pos.Y);
|
||||
actor->spr.ang = getangle(cpt.pos.X - actor->spr.pos.X, cpt.y - actor->spr.pos.Y);
|
||||
ssp(actor, CLIPMASK0);
|
||||
if (((actor->spr.pos.X - cpt.x) * (actor->spr.pos.X - cpt.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.y) * (actor->spr.pos.Y - cpt.y)) < (128 * 128))
|
||||
actor->temp_data[0]++;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, CraneDef& w, Crane
|
|||
{
|
||||
if (arc.BeginObject(keyname))
|
||||
{
|
||||
arc("x", w.x)
|
||||
arc("x", w.pos.X)
|
||||
("y", w.y)
|
||||
("z", w.z)
|
||||
("polex", w.polex)
|
||||
|
|
|
@ -482,7 +482,7 @@ void initcrane(DDukeActor* actj, DDukeActor* act, int CRANEPOLE)
|
|||
act->temp_data[4] = cranes.Reserve(1);
|
||||
|
||||
auto& apt = cranes[act->temp_data[4]];
|
||||
apt.x = act->spr.pos.X;
|
||||
apt.pos.X = act->spr.pos.X;
|
||||
apt.y = act->spr.pos.Y;
|
||||
apt.z = act->spr.pos.Z;
|
||||
apt.poleactor = nullptr;
|
||||
|
|
|
@ -163,7 +163,8 @@ struct player_orig
|
|||
|
||||
struct CraneDef
|
||||
{
|
||||
int x, y, z;
|
||||
vec3_t pos;
|
||||
int y, z;
|
||||
int polex, poley;
|
||||
TObjPtr<DDukeActor*> poleactor;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue