- SetActorZ vectors

This commit is contained in:
Christoph Oelckers 2022-08-22 18:34:43 +02:00
parent e76dfa5d3c
commit d8f379c8fa
6 changed files with 16 additions and 17 deletions

View file

@ -1920,7 +1920,7 @@ int DoCarryFlag(DSWActor* actor)
{
DVector3 pos(attached->spr.pos.XY(), ActorZOfMiddle(attached));
SetActorZ(actor, pos);
actor->set_int_ang(NORM_ANGLE(attached->int_ang() + 1536));
actor->spr.angle = attached->spr.angle + DAngle270;
}
// not activated yet
@ -2067,10 +2067,9 @@ int DoCarryFlagNoDet(DSWActor* actor)
// if no Owner then die
if (attached != nullptr)
{
vec3_t pos = { attached->int_pos().X, attached->int_pos().Y, int_ActorZOfMiddle(attached) };
SetActorZ(actor, &pos);
actor->set_int_ang(NORM_ANGLE(attached->int_ang() + 1536));
actor->set_int_z(attached->int_pos().Z - (int_ActorSizeZ(attached) >> 1));
SetActorZ(actor, DVector3(attached->spr.pos.XY(), ActorZOfMiddle(attached)));
actor->spr.angle = attached->spr.angle + DAngle270;
actor->spr.pos.Z = attached->spr.pos.Z - (ActorSizeZ(attached) * 0.5);
}
if (!attached->hasU() || attached->user.Health <= 0)

View file

@ -1311,7 +1311,7 @@ void DoSpawnTeleporterEffect(DSWActor* actor)
nx, ny, int_ActorZOfTop(actor) + Z(16),
actor->int_ang(), 0);
SetActorZ(effectActor, effectActor->int_pos());
SetActorZ(effectActor, effectActor->spr.pos);
effectActor->spr.shade = -40;
effectActor->spr.xrepeat = effectActor->spr.yrepeat = 42;
@ -1329,7 +1329,7 @@ void DoSpawnTeleporterEffectPlace(DSWActor* actor)
actor->int_pos().X, actor->int_pos().Y, int_ActorZOfTop(actor) + Z(16),
actor->int_ang(), 0);
SetActorZ(effectActor, effectActor->int_pos());
SetActorZ(effectActor, effectActor->spr.pos);
effectActor->spr.shade = -40;
effectActor->spr.xrepeat = effectActor->spr.yrepeat = 42;

View file

@ -931,7 +931,7 @@ void DoSpawnSpotsForKill(short match)
change_actor_stat(actor, STAT_NO_STATE);
actor->user.ActorActionFunc = DoSpawnSpot;
actor->user.WaitTics = SP_TAG5(actor) * 15;
SetActorZ(actor, actor->int_pos());
SetActorZ(actor, actor->spr.pos);
// setting for Killed
actor->user.LastDamage = 1;
}

View file

@ -4723,7 +4723,7 @@ int DoGrating(DSWActor* actor)
actor->clearUser();
}
SetActorZ(actor, actor->int_pos());
SetActorZ(actor, actor->spr.pos);
return 0;
}
@ -6294,7 +6294,7 @@ Collision move_sprite(DSWActor* actor, int xchange, int ychange, int zchange, in
// extra processing for Stacks and warping
if (FAF_ConnectArea(actor->sector()))
SetActorZ(actor, actor->int_pos());
SetActorZ(actor, actor->spr.pos);
if ((actor->sector()->extra & SECTFX_WARP_SECTOR))
{
@ -6483,7 +6483,7 @@ Collision move_missile(DSWActor* actor, int xchange, int ychange, int zchange, i
}
if (FAF_ConnectArea(actor->sector()))
SetActorZ(actor, actor->int_pos());
SetActorZ(actor, actor->spr.pos);
if ((actor->sector()->extra & SECTFX_WARP_SECTOR))
{

View file

@ -1736,7 +1736,7 @@ PlayerPart:
// Does not necessarily move with the sector so must accout for
// moving across sectors
if (!SO_EMPTY(sop)) // special case for operating SO's
SetActorZ(sop->so_actors[i], actor->int_pos());
SetActorZ(sop->so_actors[i], actor->spr.pos);
}
actor->user.oangdiff += getincangle(oldang, actor->int_ang());
@ -1905,7 +1905,7 @@ void UpdateSectorObjectSprites(SECTOR_OBJECT* sop)
DSWActor* actor = sop->so_actors[i];
if (!actor) continue;
SetActorZ(actor, actor->int_pos());
SetActorZ(actor, actor->spr.pos);
}
}

View file

@ -7965,7 +7965,7 @@ int DoPlasmaFountain(DSWActor* actor)
if (!attachActor) return 0;
// move with sprite
SetActorZ(actor, attachActor->int_pos());
SetActorZ(actor, attachActor->spr.pos);
actor->spr.angle = attachActor->spr.angle;
actor->user.Counter++;
@ -9450,7 +9450,7 @@ int DoMicro(DSWActor* actor)
// last smoke
if ((actor->user.WaitTics -= MISSILEMOVETICS) <= 0)
{
SetActorZ(actorNew, actorNew->int_pos());
SetActorZ(actorNew, actorNew->spr.pos);
NewStateGroup(actor, &sg_MicroMini[0]);
actor->spr.xrepeat = actor->spr.yrepeat = 10;
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE);
@ -16121,7 +16121,7 @@ int InitEnemyUzi(DSWActor* actor)
// Make sprite shade brighter
actor->user.Vis = 128;
SetActorZ(actor, actor->int_pos());
SetActorZ(actor, actor->spr.pos);
if (actor->user.ID == ZILLA_RUN_R0)
{
@ -18306,7 +18306,7 @@ void QueueLoWangs(DSWActor* actor)
else
{
// move old sprite to new sprite's place
SetActorZ(LoWangsQueue[LoWangsQueueHead], actor->int_pos());
SetActorZ(LoWangsQueue[LoWangsQueueHead], actor->spr.pos);
spawnedActor = LoWangsQueue[LoWangsQueueHead];
ASSERT(spawnedActor->spr.statnum != MAXSTATUS);
}