Skip to content

Commit

Permalink
Adjust inline
Browse files Browse the repository at this point in the history
  • Loading branch information
ZivDero committed Dec 5, 2024
1 parent 45b55b4 commit b1cec15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/extensions/combat/combatext_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ static CellClass* Get_Bridge_Owner(CellClass& cellptr)
}


static bool Is_Bridge_Height(CellClass& cellptr, const Coordinate& coord)
static bool Is_Bridge_Level(CellClass& cellptr, const Coordinate& coord)
{
return cellptr.IsBridge && (coord.Z > BRIDGE_HEIGHT + CELL_HEIGHT(cellptr.Level + 1)) && (coord.Z <= BRIDGE_HEIGHT + CELL_HEIGHT(cellptr.Level - 2));
return !cellptr.IsBridge || coord.Z > BRIDGE_HEIGHT + CELL_HEIGHT(cellptr.Level - 2) && coord.Z <= BRIDGE_HEIGHT + CELL_HEIGHT(cellptr.Level + 1);
}


Expand Down Expand Up @@ -429,7 +429,7 @@ void Vinifera_Explosion_Damage(const Coordinate& coord, int strength, TechnoClas

if (bridge_owner_cell && bridge_owner_cell->Is_Overlay_Bridge()
|| Is_Tile_Bridge_Middle(cellptr->Tile)) {
if (!Is_Bridge_Height(*cellptr, coord)) {
if (Is_Bridge_Level(*cellptr, coord)) {
if ((warhead->IsWallDestroyer && (warhead == Rule->IonCannonWarhead || Random_Pick(1, Rule->BridgeStrength) < strength))) {
for (int i = 0; i < (warhead == Rule->IonCannonWarhead ? 4 : 1); i++) {
if (Map.Destroy_Bridge_At(cell)) {
Expand All @@ -446,7 +446,7 @@ void Vinifera_Explosion_Damage(const Coordinate& coord, int strength, TechnoClas

if (bridge_owner_cell && bridge_owner_cell->Is_Overlay_Rail_Bridge()
|| Is_Tile_Train_Bridge_Middle(cellptr->Tile)) {
if (!Is_Bridge_Height(*cellptr, coord)) {
if (Is_Bridge_Level(*cellptr, coord)) {
if ((warhead->IsWallDestroyer && (warhead == Rule->IonCannonWarhead || Random_Pick(1, Rule->BridgeStrength) < strength))) {
for (int i = 0; i < (warhead == Rule->IonCannonWarhead ? 4 : 1); i++) {
if (Map.Destroy_Bridge_At(cell)) {
Expand Down

0 comments on commit b1cec15

Please sign in to comment.