Skip to content

Commit

Permalink
Adjustments for TSpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ZivDero committed Dec 5, 2024
1 parent 70cb6f9 commit c09534f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/extensions/foot/footext_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,13 @@ void FootClassExt::_Draw_NavComQueue_Lines() const

start_coord = start->Center_Coord();

if (Map.In_Radar(Coord_Cell(start_coord)) && Map[start_coord].Bit2_16) {
if (Map.In_Radar(Coord_Cell(start_coord)) && Map[start_coord].IsBridge) {
start_coord.Z = BRIDGE_HEIGHT + Map.Get_Cell_Height(start_coord);
}

end_coord = end->Center_Coord();

if (Map.In_Radar(Coord_Cell(end_coord)) && Map[end_coord].Bit2_16) {
if (Map.In_Radar(Coord_Cell(end_coord)) && Map[end_coord].IsBridge) {
end_coord.Z = BRIDGE_HEIGHT + Map.Get_Cell_Height(end_coord);
}

Expand Down Expand Up @@ -353,7 +353,7 @@ void FootClassExt::_Draw_Action_Line() const
end_coord = navtarget->Center_Coord();
Cell target_cell = Coord_Cell(end_coord);

if (Map.In_Radar(target_cell) && Map[end_coord].Bit2_16) {
if (Map.In_Radar(target_cell) && Map[end_coord].IsBridge) {
end_coord.Z = BRIDGE_HEIGHT + Map.Get_Cell_Height(end_coord);
}

Expand Down
2 changes: 1 addition & 1 deletion src/extensions/scenario/scenarioext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ Coordinate ScenarioClassExtension::Get_Waypoint_Coord_Height(WaypointType wp) co
CellClass *cell = &Map[Waypoint[wp]];
Coordinate coord = cell->Center_Coord();

if (cell->Bit2_16 && cell->Bit2_64) {
if (cell->IsBridge && cell->Bit2_64) {
coord.Z += BridgeCellHeight;
}

Expand Down
2 changes: 1 addition & 1 deletion src/extensions/tactical/tacticalext_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ void TacticalExt::_Draw_Rally_Points(bool blit)
Coordinate rally_coord = bldg->ArchiveTarget->Center_Coord();

rally_coord.Z = Map.Get_Cell_Height(rally_coord);
if (Map[rally_coord].Bit2_16)
if (Map[rally_coord].IsBridge)
rally_coord.Z += BridgeCellHeight;

Point2D end_pos = func_60F0F0(Point2D(rally_coord.X, rally_coord.Y)) / 256;
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/techno/technoext_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ WeaponSlotType TechnoClassExt::_What_Weapon_Should_I_Use(TARGET target) const
} else if (target->What_Am_I() == RTTI_CELL) {
CellClass* cell = static_cast<CellClass*>(target);
IsometricTileType tile = cell->Tile;
if (tile != DestroyableCliff && tile != BlackTile && !cell->Bit2_16) {
if (tile != DestroyableCliff && tile != BlackTile && !cell->IsBridge) {
if (cell->Overlay < OVERLAY_LOBRDG01 || cell->Overlay > OVERLAY_LOBRDG26) {
immobilize = true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/new/locomotion/rocketlocomotion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ void RocketLocomotionClass::Explode()
*/
const auto animtype = Combat_Anim(damage, warhead, Map[cell].Land_Type(), &coord);
if (animtype)
new AnimClass(animtype, coord, 0, 1, SHAPE_WIN_REL | SHAPE_CENTER | SHAPE_FLAT, -15);
new AnimClass(animtype, coord, 0, 1, SHAPE_WIN_REL | SHAPE_CENTER | SHAPE_FLAT, Get_Explosion_Z(coord));
Combat_Lighting(coord, damage, warhead);
Explosion_Damage(coord, damage, Linked_To(), warhead, true);
Linked_To()->Remove_This();
Expand All @@ -645,7 +645,7 @@ bool RocketLocomotionClass::Time_To_Explode(const RocketTypeClass* rocket)
if (coord.Z > DestinationCoord.Z)
{
const CellClass* rocket_cell = Linked_To()->Get_Cell_Ptr();
if (!rocket_cell || !rocket_cell->Bit2_16 || DestinationCoord.Z != rocket_cell->Center_Coord().Z || coord.Z > DestinationCoord.Z + ROCKET_SPEED)
if (!rocket_cell || !rocket_cell->IsBridge || DestinationCoord.Z != rocket_cell->Center_Coord().Z || coord.Z > DestinationCoord.Z + ROCKET_SPEED)
{
/**
* Nope, too early.
Expand Down

0 comments on commit c09534f

Please sign in to comment.