1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

CGameInfoCallback: now actually drop excludeId argument

This commit is contained in:
ArseniyShestakov
2015-03-09 14:20:34 +03:00
parent 861104f493
commit 00b0af7306
3 changed files with 9 additions and 9 deletions

View File

@ -698,20 +698,20 @@ std::vector<ObjectInstanceID> CGameInfoCallback::getVisibleTeleportObjects(std::
return ids;
}
std::vector<ObjectInstanceID> CGameInfoCallback::getTeleportChannelEntraces(TeleportChannelID id, ObjectInstanceID excludeId, PlayerColor player) const
std::vector<ObjectInstanceID> CGameInfoCallback::getTeleportChannelEntraces(TeleportChannelID id, PlayerColor player) const
{
return getVisibleTeleportObjects(gs->map->teleportChannels[id]->entrances, player);
}
std::vector<ObjectInstanceID> CGameInfoCallback::getTeleportChannelExits(TeleportChannelID id, ObjectInstanceID excludeId, PlayerColor player) const
std::vector<ObjectInstanceID> CGameInfoCallback::getTeleportChannelExits(TeleportChannelID id, PlayerColor player) const
{
return getVisibleTeleportObjects(gs->map->teleportChannels[id]->exits, player);
}
ETeleportChannelType CGameInfoCallback::getTeleportChannelType(TeleportChannelID id, PlayerColor player) const
{
std::vector<ObjectInstanceID> entrances = getTeleportChannelEntraces(id, ObjectInstanceID(), player);
std::vector<ObjectInstanceID> exits = getTeleportChannelExits(id, ObjectInstanceID(), player);
std::vector<ObjectInstanceID> entrances = getTeleportChannelEntraces(id, player);
std::vector<ObjectInstanceID> exits = getTeleportChannelExits(id, player);
if((!entrances.size() || !exits.size()) // impassable if exits or entrances list are empty
|| (entrances.size() == 1 && entrances == exits)) // impassable if only entrance and only exit is same object. e.g bidirectional monolith
{