Skip to content

Commit

Permalink
[RA] Fix ore occasionally growing over terrain.
Browse files Browse the repository at this point in the history
  • Loading branch information
OmniBlade committed Jun 19, 2024
1 parent 3fe4c5d commit 3de5c69
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions redalert/cell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3223,6 +3223,13 @@ bool CellClass::Can_Tiberium_Germinate(void) const
if (building != NULL && !building->Class->IsInvisible)
return (false);

/*
** Don't allow Tiberium to grow on a cell with a terrain object.
*/
TerrainClass const* terrain = Cell_Terrain();
if (terrain != NULL && (*terrain != TERRAIN_NONE))
return (false);

if (!Ground[Land_Type()].Build)
return (false);

Expand Down

0 comments on commit 3de5c69

Please sign in to comment.