Optimize if statements in the client module (#8998)
This commit is contained in:
committed by
Tomas Slusny
parent
7e0017fe4d
commit
43c04992bc
@@ -66,10 +66,6 @@ class CacheKey
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.type != other.type)
|
return this.type == other.type;
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1314,10 +1314,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
{
|
{
|
||||||
int var21 = (pitchCos * modelHeight >> 16) + var19;
|
int var21 = (pitchCos * modelHeight >> 16) + var19;
|
||||||
int var22 = (var18 - var21) * zoom;
|
int var22 = (var18 - var21) * zoom;
|
||||||
if (var22 / var14 < Rasterizer3D_clipMidY2)
|
return var22 / var14 < Rasterizer3D_clipMidY2;
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,12 +123,7 @@ public class KeyRemappingPlugin extends Plugin
|
|||||||
// the search box on the world map can be focused, and chat input goes there, even
|
// the search box on the world map can be focused, and chat input goes there, even
|
||||||
// though the chatbox still has its key listener.
|
// though the chatbox still has its key listener.
|
||||||
Widget worldMapSearch = client.getWidget(WidgetInfo.WORLD_MAP_SEARCH);
|
Widget worldMapSearch = client.getWidget(WidgetInfo.WORLD_MAP_SEARCH);
|
||||||
if (worldMapSearch != null && client.getVar(VarClientInt.WORLD_MAP_SEARCH_FOCUSED) == 1)
|
return worldMapSearch == null || client.getVar(VarClientInt.WORLD_MAP_SEARCH_FOCUSED) != 1;
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -215,11 +215,6 @@ public class PuzzleState
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (y1 == y2 && absX == 1)
|
return y1 == y2 && absX == 1;
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user