Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros
FixExploitManEaters.cs
Go to the documentation of this file.
2
4
5public static class FixExploitManEaters
6{
7 private static readonly List<int> IndexesProtected = new List<int>();
8
9 public static void Update()
10 {
11 IndexesProtected.Clear();
12 }
13
14 public static void ProtectSpot(int x, int y)
15 {
16 int item = ((x & 0xFFFF) << 16) | (y & 0xFFFF);
17 if (!IndexesProtected.Contains(item))
18 {
19 IndexesProtected.Add(item);
20 }
21 }
22
23 public static bool SpotProtected(int x, int y)
24 {
25 int item = ((x & 0xFFFF) << 16) | (y & 0xFFFF);
26 return IndexesProtected.Contains(item);
27 }
28}
static readonly List< int > IndexesProtected