mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- fully floatified the crane data.
This commit is contained in:
parent
9392e31b33
commit
25a048c62f
3 changed files with 12 additions and 13 deletions
|
@ -640,8 +640,8 @@ void movecrane(DDukeActor *actor, int crane)
|
|||
case STAT_ZOMBIEACTOR:
|
||||
case STAT_STANDABLE:
|
||||
case STAT_PLAYER:
|
||||
actor->spr.ang = getangle(cpt.pole.X - actor->int_pos().X, cpt.pole.Y - actor->int_pos().Y);
|
||||
SetActor(a2, vec3_t( cpt.pole.X, cpt.pole.Y, a2->int_pos().Z ));
|
||||
actor->spr.ang = getangle(cpt.pole - actor->spr.pos.XY());
|
||||
SetActor(a2, DVector3( cpt.pole.X, cpt.pole.Y, a2->spr.pos.Z ));
|
||||
actor->temp_data[0]++;
|
||||
return;
|
||||
}
|
||||
|
@ -737,7 +737,7 @@ void movecrane(DDukeActor *actor, int crane)
|
|||
if ((sectp->floorz - actor->spr.pos.Z) > 32)
|
||||
actor->spr.picnum++;
|
||||
|
||||
if (actor->int_pos().Z < cpt.pos.Z)
|
||||
if (actor->spr.pos.Z < cpt.pos.Z)
|
||||
{
|
||||
actor->temp_data[0]++;
|
||||
actor->spr.xvel = 0;
|
||||
|
@ -749,9 +749,9 @@ void movecrane(DDukeActor *actor, int crane)
|
|||
{
|
||||
if (actor->spr.xvel < 192)
|
||||
actor->spr.xvel += 8;
|
||||
actor->spr.ang = getangle(cpt.pos.X - actor->int_pos().X, cpt.pos.Y - actor->int_pos().Y);
|
||||
actor->spr.ang = getangle(cpt.pos.XY() - actor->spr.pos.XY());
|
||||
ssp(actor, CLIPMASK0);
|
||||
if (((actor->int_pos().X - cpt.pos.X) * (actor->int_pos().X - cpt.pos.X) + (actor->int_pos().Y - cpt.pos.Y) * (actor->int_pos().Y - cpt.pos.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)) < (8 * 8))
|
||||
actor->temp_data[0]++;
|
||||
}
|
||||
|
||||
|
|
|
@ -478,11 +478,11 @@ void initcrane(DDukeActor* actj, DDukeActor* act, int CRANEPOLE)
|
|||
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL | CSTAT_SPRITE_ONE_SIDE;
|
||||
|
||||
act->spr.picnum += 2;
|
||||
act->set_int_z(sect->int_ceilingz() + (48 << 8));
|
||||
act->spr.pos.Z = sect->ceilingz + 48;
|
||||
act->temp_data[4] = cranes.Reserve(1);
|
||||
|
||||
auto& apt = cranes[act->temp_data[4]];
|
||||
apt.pos = act->int_pos();
|
||||
apt.pos = act->spr.pos;
|
||||
apt.poleactor = nullptr;
|
||||
|
||||
DukeStatIterator it(STAT_DEFAULT);
|
||||
|
@ -497,13 +497,12 @@ void initcrane(DDukeActor* actj, DDukeActor* act, int CRANEPOLE)
|
|||
actk->spr.xrepeat = 48;
|
||||
actk->spr.yrepeat = 128;
|
||||
|
||||
apt.pole.X = actk->int_pos().X;
|
||||
apt.pole.Y = actk->int_pos().Y;
|
||||
apt.pole = actk->spr.pos.XY();
|
||||
|
||||
actk->set_int_pos(act->int_pos());
|
||||
actk->spr.pos = act->spr.pos;
|
||||
actk->spr.shade = act->spr.shade;
|
||||
|
||||
SetActor(actk, actk->int_pos());
|
||||
SetActor(actk, actk->spr.pos);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -197,8 +197,8 @@ struct player_orig
|
|||
|
||||
struct CraneDef
|
||||
{
|
||||
vec3_t pos;
|
||||
vec2_t pole;
|
||||
DVector3 pos;
|
||||
DVector2 pole;
|
||||
TObjPtr<DDukeActor*> poleactor;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue