- OperateSectorObject

This commit is contained in:
Christoph Oelckers 2022-09-03 23:41:31 +02:00
parent 9df83edd10
commit 8a320f6fa7
3 changed files with 9 additions and 9 deletions

View file

@ -160,7 +160,7 @@ void DoPlayerBeginDive(PLAYER* pp);
void DoPlayerDive(PLAYER* pp);
void DoPlayerTeleportPause(PLAYER* pp);
bool PlayerFlyKey(void);
void OperateSectorObject(SECTOR_OBJECT* sop, short newang, const DVector2& newpos);
void OperateSectorObject(SECTOR_OBJECT* sop, DAngle newang, const DVector2& newpos);
void CheckFootPrints(PLAYER* pp);
bool DoPlayerTestCrawl(PLAYER* pp);
void DoPlayerDeathFlip(PLAYER* pp);
@ -1540,10 +1540,10 @@ void DoPlayerTurnTurret(PLAYER* pp, float avel)
}
pp->angle.ang = new_ang;
pp->actor->set_int_ang(pp->angle.ang.Buildang());
pp->actor->spr.angle = pp->angle.ang;
}
OperateSectorObject(pp->sop, pp->angle.ang.Buildang(), pp->sop->pmid);
OperateSectorObject(pp->sop, pp->angle.ang, pp->sop->pmid);
}
void SlipSlope(PLAYER* pp)
@ -2532,7 +2532,7 @@ void DoPlayerMoveVehicle(PLAYER* pp)
}
auto save_sect = pp->cursector;
OperateSectorObject(pp->sop, pp->angle.ang.Buildang(), { MAXSO, MAXSO });
OperateSectorObject(pp->sop, pp->angle.ang, { MAXSO, MAXSO });
pp->setcursector(pp->sop->op_main_sector); // for speed
floor_dist = abs(z - pp->sop->floor_loz * worldtoint);
@ -2634,7 +2634,7 @@ void DoPlayerMoveVehicle(PLAYER* pp)
}
}
OperateSectorObject(pp->sop, pp->angle.ang.Buildang(), { pp->int_ppos().X * inttoworld, pp->int_ppos().Y * inttoworld });
OperateSectorObject(pp->sop, pp->angle.ang, pp->pos.XY());
pp->cursector = save_sect; // for speed
if (!SyncInput())

View file

@ -639,8 +639,8 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, SECTOR_OBJECT& w,
("update", w.update, def->update)
("bob_diff", w.bob_diff, def->bob_diff)
("target_dist", w.target_dist, def->target_dist)
("floor_loz", w._floor_loz, def->_floor_loz)
("floor_hiz", w._floor_hiz, def->_floor_hiz)
("floor_loz", w.floor_loz, def->floor_loz)
("floor_hiz", w.floor_hiz, def->floor_hiz)
("morph_z", w.morph_z, def->morph_z)
("morph_z_min", w.morph_z_min, def->morph_z_min)
("morph_z_max", w.morph_z_max, def->morph_z_max)

View file

@ -2542,9 +2542,9 @@ void OperateSectorObjectForTics(SECTOR_OBJECT* sop, short newang, const DVector2
RefreshPoints(sop, pos - sop->pmid.XY(), false);
}
void OperateSectorObject(SECTOR_OBJECT* sop, short newang, const DVector2& pos)
void OperateSectorObject(SECTOR_OBJECT* sop, DAngle newang, const DVector2& pos)
{
OperateSectorObjectForTics(sop, newang, pos, synctics);
OperateSectorObjectForTics(sop, newang.Buildang(), pos, synctics);
}
void PlaceSectorObject(SECTOR_OBJECT* sop, const DVector2& pos)