Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed wall gate flickering when in construction state #4140

Merged
merged 1 commit into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,6 @@ INT_RETVAL intRunWidgets()

if (psBuilding->type == REF_DEMOLISH)
{
STRUCTURE tmp(0, selectedPlayer);
Monsterovich marked this conversation as resolved.
Show resolved Hide resolved
MAPTILE *psTile = mapTile(map_coord(pos.x), map_coord(pos.y));
FEATURE *psFeature = (FEATURE *)psTile->psObject;
STRUCTURE *psStructure = (STRUCTURE *)psTile->psObject;
Expand All @@ -1733,6 +1732,7 @@ INT_RETVAL intRunWidgets()
{
STRUCTURE tmp(generateNewObjectId(), selectedPlayer);
STRUCTURE *psStructure = &tmp;
tmp.state = SAS_NORMAL;
tmp.pStructureType = (STRUCTURE_STATS *)psPositionStats;
tmp.pos = {pos.x, pos.y, map_Height(pos.x, pos.y) + world_coord(1) / 10};

Expand Down
1 change: 1 addition & 0 deletions src/structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1971,6 +1971,7 @@ optional<STRUCTURE> buildBlueprint(STRUCTURE_STATS const *psStats, Vector3i pos,
}

STRUCTURE blueprint(0, ownerPlayer);
blueprint.state = SAS_NORMAL;
// construct the fake structure
blueprint.pStructureType = const_cast<STRUCTURE_STATS *>(psStats); // Couldn't be bothered to fix const correctness everywhere.
if (selectedPlayer < MAX_PLAYERS)
Expand Down
Loading