This commit is contained in:
Joris 2012-09-07 18:39:39 +02:00
parent 0be07616c6
commit 63542119b6
3 changed files with 4 additions and 5 deletions

View file

@ -169,8 +169,8 @@ int DoActionMove(CUnit &unit)
}
if (unit.Type->UnitType == UnitTypeNaval) { // Boat (un)docking?
const CMapField& mf_cur = *Map.Field(unit.Offset);
const CMapField& mf_next = *Map.Field(unit.tilePos + posd);
const CMapField &mf_cur = *Map.Field(unit.Offset);
const CMapField &mf_next = *Map.Field(unit.tilePos + posd);
if (mf_cur.WaterOnMap() && mf_next.CoastOnMap()) {
PlayUnitSound(unit, VoiceDocking);

View file

@ -165,8 +165,7 @@ class CPlayer;
class CMapFieldPlayerInfo
{
public:
CMapFieldPlayerInfo() : SeenTile(0)
{
CMapFieldPlayerInfo() : SeenTile(0) {
memset(Visible, 0, sizeof(Visible));
memset(VisCloak, 0, sizeof(VisCloak));
memset(Radar, 0, sizeof(Radar));

View file

@ -135,7 +135,7 @@ void CMap::Reveal()
Vec2i pos;
for (pos.x = 0; pos.x < this->Info.MapWidth; ++pos.x) {
for (pos.y = 0; pos.y < this->Info.MapHeight; ++pos.y) {
CMapFieldPlayerInfo& playerInfo = this->Field(pos)->playerInfo;
CMapFieldPlayerInfo &playerInfo = this->Field(pos)->playerInfo;
for (int p = 0; p < PlayerMax; ++p) {
playerInfo.Visible[p] = std::max<unsigned short>(1, playerInfo.Visible[p]);
}