Return-To-The-Roots / s25client

Return To The Roots (Settlers II(R) Clone)
http://www.rttr.info
GNU General Public License v2.0
478 stars 77 forks source link

Fortress could be built too close to a harbor #189

Open Spikeone opened 9 years ago

Spikeone commented 9 years ago

It is possible to build a fortress really close to any harbor spot - that way, if you overtake the military building you are not able to connect it to any of your roads and your flag is on the "border".

tooclose

ikharbeq commented 9 years ago

Well this seemed to be the best solution to the problem that harbors continue to push border and behave like regular military buildings once constructed (unlike original S2 but this is used for combat in rttr), but harbors do behave differently prior to construction by being allowed right next to existing military buildings mostly to avoid blocking harborspots the players don't know about when building the military building (this works the same as original S2).

I fixed the bug that used to crash the game when a military building's flag ended up on the border by keeping the flag & building alive and the situation in the screenshot is the result.

-> I wouldn't call this a bug it is an ugly feature of the harbor changes in rttr. Try to think of a better solution for the problem because I don't see a perfect one.

MarcusSt commented 9 years ago

He's alive. :)

This is a tough one. I also can't think of a good way of fixing this.

Options:

  1. disallow military buildings close to harbor spots (not a good idea),
  2. military building prevents the harbor from being built (we don't want to block harbor spots),
  3. do nothing,
  4. .... - better ideas?

I think of the above options, number three would be the best.

Spikeone commented 9 years ago
  1. Increase minimum distance by 1 node

funny, I cant just write 4. because githup transforms it to 1.