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

Remove uncollidable mines exception #1619

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Remove uncollidable mines exception #1619

wants to merge 1 commit into from

Conversation

sprunk
Copy link
Collaborator

@sprunk sprunk commented Jul 24, 2024

Games can set blocking = false in the unit def,
or call Spring.SetUnitBlocking(unitID, nil, false) in gadget:UnitCreated.

Games can set `blocking = false` in the unit def,
or call `Spring.SetUnitBlocking(unitID, nil, false)` in `gadget:UnitCreated`.
sprunk referenced this pull request Jul 24, 2024
…ocked. Masks can now be applied to yardmaps in AddGroundBlockingObject, right now the only masking is that 1 is the opening yard for a factory but that could be extended for future uses later on.

(since y is what mines used to be nonblocking can their special case be removed now?)

git-svn-id: https://spring.clan-sy.com/svn/spring/trunk@5343 37977431-3df6-0310-b722-df95706aa16b
// when not flying) except mines, since their position would
// be given away otherwise by the PF, etc.
// NOTE: this does mean that mines can be stacked indefinitely
// (an extra yardmap character would be needed to prevent this)
immobile = unitDef->IsImmobileUnit();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't seem to need this line too.

Copy link
Collaborator Author

@sprunk sprunk Nov 3, 2024

Choose a reason for hiding this comment

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

Not in this init function, but it sets the member which is used in a bunch of other places, e.g.

// dont lock-on to units outside of our reach (for immobile builders)
if (owner->immobile && !IsInBuildRange(f))

Perhaps would be good to refactor those to unit->unitDef->IsImmobileUnit() later but it's not in the scope of this PR.

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.

2 participants