beyond-all-reason / Beyond-All-Reason

Main game repository for Beyond All Reason.
https://www.beyondallreason.info/
Other
1.73k stars 289 forks source link

Pregame/Placement: Commander can be placed on non-traversable terrain. #1309

Open resopmok opened 2 years ago

resopmok commented 2 years ago

Not sure where in the code this would be done, but it seems there ought to be a check during commander placement that disallows placing the commander on non-traversable terrain (maybe it just uses the same sound when you try to place a building where it can't be placed). When it does happen, the commander becomes stuck and unable to move. On land, it requires a transport to remove or a remake of the game to redo placement. Underwater, the commander is permanently stuck.

drivver44 commented 2 years ago

ideal solution is to limit players to the ideal/intented starting positions/areas ZK does this for a fair amount of its maps

badosu commented 1 year ago

Either change the startbox widget or make a gadget that checks the intended start position with the AllowStartPosition callin. Use GetGroundBlocked or GetGroundNormal to validate the position

WatchTheFort commented 1 year ago

We would also need to shade the disallowed areas, so it isn't a guessing game

badosu commented 1 year ago

For now just mitigating the worst case scenario is enough, for the good first issue new contributors can take.

Later someone can devise a shader by mapping slope of the map.

badosu commented 1 year ago

This was resolved on https://github.com/beyond-all-reason/Beyond-All-Reason/pull/1515 and https://github.com/beyond-all-reason/Beyond-All-Reason/pull/1552, can be closed.

badosu commented 1 year ago

Agree the ideal solution is via gadget, until then it's mitigated widget side.

badosu commented 1 year ago

Nevermind, I only did it for buildqueue clash not terrain (buildqueue handling uses separate logic and purely widget-side).