mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Pack of tiny code improvements for @alexvins request
This commit is contained in:
@@ -720,8 +720,8 @@ ETeleportChannelType::ETeleportChannelType CGameInfoCallback::getTeleportChannel
|
||||
{
|
||||
std::vector<ObjectInstanceID> entrances = getTeleportChannelEntraces(id, ObjectInstanceID(), Player);
|
||||
std::vector<ObjectInstanceID> exits = getTeleportChannelExits(id, ObjectInstanceID(), Player);
|
||||
if((!entrances.size() || !exits.size())
|
||||
|| (entrances.size() == 1 && entrances == exits))
|
||||
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
|
||||
{
|
||||
return ETeleportChannelType::IMPASSABLE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user