-
Notifications
You must be signed in to change notification settings - Fork 121
bugfix(input): Prevent drag-selecting enemy beacons and enable selecting stealthed units while observing #1460
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this code here is fixing what we refer to in Generals as "box trick" aka selecting objects in the fog?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this condition gone, does it mean that we can now select enemy stealth units, while they are stealth? Or is that covered by isDrawableEffectivelyHidden ?
If so, then this fix needs to be different, for example allowing the observer to skip these tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely not, or this change would be a regression. The original stealth selection condition is now covered by isDrawableEffectivelyHidden. The benefit to this is that as observers can see stealthed units and beacons, isDrawableEffectivelyHidden returns false for them (unless the units are in a closed container).
NO_STEALTH.mp4
OBSERVE_STEALTH.mp4
xezon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Then I expect this is a Zero Hour specific change for now?
Do you think it is best to separate the same fix for Generals, considering it has a different / larger impact there? I understood "box trick" to be a popular exploit in Generals, so it could be controversial. |
|
It could be unified with then it keeps the bug in Generals. Not sure if Generals players are as protective about their exploits as Zero Hour players are. Can be separate change. |
Does this refer to the bug where players drag select a cargo unit and then can tell if it is empty or not by its selection status? |
|
Are we concerned about this cargo select exploit fix? I think top level players will notice. It refers to this report: |
|
I think it is unlikely that we will get a feedback on this exploit/bug fix from the entire community so to avoid distress I suggest we make the bug explicit and make its fix opt-in. This is stupid but we have learned over the years that some players are not yet ready for such kind of fixes and prefer to play with the bugs. So have something like (pseudo) if (!TheGlobalData->m_fixUnitCargoSelectionBug && selection->hasPassengers())
doSelection()Just so that the original exploit/bug is technically still available and then our data can opt-in the fix. In the future we will have game setup profiles and so then the pro players who like these kinds of bugs can keep the bug in their setup and the other players that like the fixed game experience can use the fixed version. This will not be the last code exploit/bug fix that we would treat like this. |
|
Thinking it further, I think we need to disable the fix for the retail compatible build anyway, otherwise players on this build have a technical disadvantage against retail game clients. |
I'm not too concerned and I've abused it many times. Let's not overestimate the impact of this exploit. An extreme minority of top-level players might be temporarily unhappy if/when they notice its absence but I'm confident such awareness will be gradual and it'll be soon accepted and forgotten.
It is very stupid. 😄 However, one of the benefits of initially maintaining retail compatibility is that we can fix these kinds of bugs without causing distress for those particular players, who have time to adapt and provide feedback, and can still play on the retail executable if they prefer. Let's not forget, these fixes do not have to be set in stone. If we merge this and there does end up being enough pushback then we can look at explicitly reimplementing the exploit. I don't mind the idea of an opt-in
It's worth noting that several of the fixes / improvements applied to this build already provide technical advantages over the retail game client. If anything, now is the perfect time to apply these kinds of fixes, when they are easier to accept due to the accompaniment of various advantages. |
|
The main issue is that it triggers bad PR because top level players will use these kinds of fixes to discredit the whole project. And other players listen to what the top players say, so it carries some weight. That is why I think it is generally a good idea to retain a bugged variant of the game that these top players can use and the rest of the players can play the fixed version of the game without any interference. And it would be easy for both groups to access both these game variants. But for that we need to make controversial bugs/exploits individually configurable. |
I'm skeptical that there are top-level players chomping at the bit to discredit the whole project despite all of the great advancements achieved so far and on the horizon - especially over such an insignificant and rarely-used exploit. If anything, they'd surely discredit themselves by making a fuss over it. I'm certain that nothing bad would come of this fix being merged; and reversion or amendment are always options if necessary. However, if we absolutely must remain beholden to the anticipated opinions of a few top-level players, then we can revisit this if/when such opinions have been expressed. |
|
My recommendation for this is to make the bug at least compile time configurable, and enable it for |
|
Needs replicating to generals |
Needs to be configurable on compile time and in GlobalData
0b5fb40 to
835d9e7
Compare
Done. DEJECTION.mp4
That is rather unfortunate. A player's ability to make decisions with less information is arguably more skillful. It goes against the game's design and the core principle of reconnaissance for opponents to have such information. We could also just show passenger info to opponents. It's effectively the same and the enhanced accessibility would diminish the viability of decoy strategies and curtail gameplay depth even further.
Are we also concerned about eliminating the much more egregious "box trick"? I suspect being able to select stealthed units and objects through fog must help the pros with fast decision-making to an even greater extent. |
|
User AnT1_Pr0 reported that users Excal, Dominator, Boycah say this bug does not need to be preserved. |
|
This can be updated again to remove the explicit reintroduction of the bugged behaviour if we are going along the lines of just fixing the behaviour now. Also wants replicating to generals. |
For Retail compatible we can preserve the bugs that do give an advantage, because otherwise Retail game clients do have a competitive edge. |
I assume Generals code is a bit different to Zero Hour because of the extra bugs. Perhaps treat it in a follow up change? |
Are we going to ignore the changes so far that give an advantage?
It's actually the same fix, it just fixes a lot more as the "box trick" exploit still exists there. I can add the fix under the same |
Which ones are these?
Yes can do. |
ba9f05d to
6977bb1
Compare
Idle worker selection, building snapping, building cancellation, dead units blocking commands, etc. |
The things you listed are minor impact. Personally I am not as concerned about the advantages of the update, albeit someone could classify this as cheating. |
|
I think this change needs a rebase? Because of GameDefines.h? |
Fair enough. I still think the collective and ever-increasing advantage - which already makes a difference in most if not all games - still outweighs the relatively minor impact of fixing this exploit.
Is it blocking the merge? If it's the same change from two different sources then it should be fine. |
|
This PR is causing a bug where if you put an infantry unit inside a garrison, humvee or a building for example, then try to put another infantry unit it will deselect the infantry and select the humvee instead of garrisoning it. This is also true for tunnels, if there is one unit inside the tunnel no other unit can get in. EDIT: this has been already reported |
…e selecting stealthed units while observing (TheSuperHackers#1460)" This reverts commit 4de89c3.
…ing stealthed units while observing (TheSuperHackers#1460)




This change fixes several user-facing bugs:
And a few internal benefits:
DrawableListvia drag-selections (e.g. selecting 10 full Battle Buses now only adds 10 objects to the draw list instead of 80)The original fix by Kris to prevent drag-selecting stealth / shrouded units was a bit of a complicated band-aid fix that also resulted in stealthed units being unselectable during replays / while observing.