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

Out of map orders leniency #1769

Merged
merged 9 commits into from
Nov 24, 2024
Merged

Conversation

saurtron
Copy link
Collaborator

@saurtron saurtron commented Nov 14, 2024

Work Done

  • Allow centering area commands out of map.
  • Allow attacking out of map units.
  • Allow guarding out of map units when both the actor and guardee are builders.

Related issues

Remarks

  • I think these actions are safe and wanted, since not being easy to target out of map units with attacks incentivises out of map attack hacks. Regarding the guard issue it's in the above referenced issue.
  • Could have maybe touched some more orders but for now these seem the most pressing.
  • Still doesn't allow attack ground out of map (in case someone is wondering).
  • Also allowing any out of map unit to issue guard orders, don't see why we shouldn't allow this.

@saurtron saurtron changed the title Out of map leniency Out of map orders leniency Nov 14, 2024
Comment on lines 721 to 722
// Allow guarding out of map units only if both are builders to avoid plane hacks.
if (guardee && !(guardee->unitDef->IsBuilderUnit() && ud->IsBuilderUnit()) && !guardee->pos.IsInBounds())
Copy link
Collaborator

@sprunk sprunk Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for a game to decide. IMO either keep the limit as-is or remove wholesale, don't instate a different limit. In general that applies to every command whose limitation isn't for technical reasons.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, just did it like this because it's what ppl requested at beyond-all-reason/Beyond-All-Reason#763 but we can just remove the check here and then make it stricter in some lua gadget.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok removed the check here and prepared a PR for BAR doing the same check.

rts/Game/UI/GuiHandler.cpp Outdated Show resolved Hide resolved
@sprunk
Copy link
Collaborator

sprunk commented Nov 15, 2024

A bunch of other commands (capture, repair etc) still check bounds, perhaps if guard loses the restriction then they all should?

@saurtron
Copy link
Collaborator Author

A bunch of other commands (capture, repair etc) still check bounds, perhaps if guard loses the restriction then they all should?

Maybe, since nobody asked for that I didn't want to lift too many restrictions at the same time. Some of these might need further checks in games to avoid hacks, like with out of map guard command.

That said, I'm open to removing further checks if you deem it necessary.

Copy link
Collaborator

@sprunk sprunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@lhog lhog merged commit 2203a5d into beyond-all-reason:master Nov 24, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants