-
Notifications
You must be signed in to change notification settings - Fork 89
[GEN][ZH] Fix reselection of group not always working #1334
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
Conversation
That bit of code you posted was backported from zero hour in selectionxlat to begin with, maybe it's just in a different place to where you were looking. #1305 |
GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
Outdated
Show resolved
Hide resolved
Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
Outdated
Show resolved
Hide resolved
Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
Outdated
Show resolved
Hide resolved
Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
Outdated
Show resolved
Hide resolved
Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
Outdated
Show resolved
Hide resolved
Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
Outdated
Show resolved
Hide resolved
Generals/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
Outdated
Show resolved
Hide resolved
Not sure if it is needed. If not, than no point in backporting it to ZH. Never mind, as @xezon remarked, I fixed the wrong section in Generals 😵. But it seems like the exploit is still possible. Will still make a full PR for that. |
Yeah, preventing the building being added using shift to a new team will prevent the normal way of scud bugging. |
b944fe6
to
0e7bf99
Compare
GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/SelectionXlat.cpp
Show resolved
Hide resolved
My apologies @roossienb! I actually already have a working solution here. I was just wanted to create the issue and have it triaged first before opening a PR. |
0e7bf99
to
b1f97df
Compare
Looks like you have a different solution to the issue. My suggestion would be to create a PR as an alternative to this one (and link it) and let the reviewers decide which implementation they like best. I don't mind either way. |
What about the GameMessage::MSG_META_ADD_TEAM ? Shouldn't that be treated equally or similarly? |
I'm not sure how that would work.
|
I think the stubjax version got merged for this in the end, so this could be closed. |
From the issue:
Double pressing logic always assumed the group already is selected.
Rewrote the logic by breaking the if / else, now always (re)selecting the group - even on double press
Due to the re-arrangement of code, Github is not showing the changes very well. It is better to use compare next to each other.