Skip to content

Commit 9f65260

Browse files
authored
Merge pull request #397 from Panxuc/dev
fix: 🐛 repairwormhole
2 parents 420ea59 + d7d6c53 commit 9f65260

File tree

1 file changed

+1
-14
lines changed
  • logic/GameClass/GameObj/Map

1 file changed

+1
-14
lines changed

logic/GameClass/GameObj/Map/Map.cs

+1-14
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,9 @@ public IOutOfBound GetOutOfBound(XY pos)
8181
{
8282
return (Ship?)GameObjDict[GameObjType.Ship].Find(gameObj => (teamID == ((Ship)gameObj).TeamID) && playerID == ((Ship)gameObj).PlayerID);
8383
}
84-
85-
public static bool WormholeInteract(Wormhole gameObj, XY Pos)
86-
{
87-
foreach (WormholeCell cell in gameObj.Cells)
88-
{
89-
if (GameData.ApproachToInteract(cell.Position, Pos))
90-
return true;
91-
}
92-
return false;
93-
}
9484
public GameObj? OneForInteract(XY Pos, GameObjType gameObjType)
9585
{
96-
return (GameObj?)GameObjDict[gameObjType].Find(gameObj =>
97-
((GameData.ApproachToInteract(gameObj.Position, Pos)) ||
98-
(gameObjType == GameObjType.Wormhole && WormholeInteract((Wormhole)gameObj, Pos)))
99-
);
86+
return (GameObj?)GameObjDict[gameObjType].Find(gameObj => GameData.ApproachToInteract(gameObj.Position, Pos));
10087
}
10188
public GameObj? OneInTheSameCell(XY Pos, GameObjType gameObjType)
10289
{

0 commit comments

Comments
 (0)