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

TempleIoned global is wrongly set to False #113

Open
jaredballou opened this issue May 27, 2021 · 3 comments
Open

TempleIoned global is wrongly set to False #113

jaredballou opened this issue May 27, 2021 · 3 comments

Comments

@jaredballou
Copy link

The block of code at BUILDING.CPP:1657 to 1679 sets TempleIoned = false; when any structure is destroyed, thwarting the player from receiving the canon ending even when they damage and then destroy the Temple with the Ion Cannon.

The Temple/Ion conditional does properly match and set it to true when said damage or destruction occurs (and gives a Steam achievement), but to get the TempleIoned ending, the player must destroy every single enemy structure before the temple, so that the value will remain true once end-game logic processing occurs.

I can submit a PR for a corrected patch if that makes it easier, I'm not even sure EA/Petroglyph are reading these, so for the time being I'll just fix it in my mod codebase.

@Milord-Freeman
Copy link

Milord-Freeman commented May 29, 2021

I apologize for the correction, but I think it is important to make some clarifications.

To begin with, we are talking about the Tiberian Dawn project, not Red Alert - in the last project, in the building.cpp file there is no code at all that mentions the "TempleIoned" variable.
Further, we are talking about the BuildingClass::Take_Damage function, in the switch case block when TechnoClass::Take_Damage returns RESULT_DESTROYED, just below in the "if ... Else" block.

Why such a detailed description of the place? It's simple, the fact is that in my codebase string "TempleIoned = false" are placed at 1564 line of file.

I don’t know how it happened for you, but perhaps you made changes even higher in the code. In any case, for this information to make sense, it is important to show how to find this place.

@OmniBlade
Copy link

Its still useful to highlight bugs like this here so knowledge of them is made more widely available for those of us maintaining forks of the code base. For what its worth I believe this is a bug from the original game as well.

@OmniBlade
Copy link

I've created a PR against Vanilla Conquer that fixes this bug:
TheAssemblyArmada/Vanilla-Conquer#713

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants