Closed GoogleCodeExporter closed 9 years ago
Also the same method returns false for terran building which support an addon
where
the addon is already built there, e.g.
BWAPI::Broodwar->canBuildHere(NULL, BWAPI::TilePosition(101, 10),
BWAPI::UnitTypes::Terran_Factory) returns 0 when there is an addon at pos(105,
11)
and returns 1 if there is no addon at 105, 11
Original comment by krasi...@gmail.com
on 30 May 2010 at 3:20
This is probably related to the problem i was having before, here:
http://code.google.com/p/bwsal/issues/detail?id=22
Surely if the addon already exists then you cannont build on that tile
anymore...so
returning false would be the correct behaviour...no?
Original comment by Kali...@gmail.com
on 30 May 2010 at 6:48
Original comment by lowerlo...@gmail.com
on 31 May 2010 at 10:17
I cannot recreate the problem. This is what I did in my attempt to recreate the
problem:
1) Started a network game.
2) Got the Terran player to build a refinery at the geyser in the Protoss's
base.
3) Destroyed the refinery with probes
4) After destroying it, the tile position canBuildHere for the geyser's tile
position and unit type Protoss_Assimilator returned true.
Based on the scarce details provided in quaver.smith's original post, I bet he
was calling getTilePosition on the original geyser object, which of course is
destroyed when the Refinery is destroyed because the refinery is the geyser
(they are the same unit). Since the geyser object no longer existed,
geyser->getTilePosition() returned TilePositions::Unknown, as is the case with
any non-existent unit. So he was supplying TilePositions::Unknown to the
canBuildHere function, which explains why it was returning false.
Marked as WontFix since this is not a problem with BWAPI.
Original comment by lowerlo...@gmail.com
on 23 Jul 2010 at 1:55
Original issue reported on code.google.com by
quaver.smith
on 30 May 2010 at 2:07