Remove checkIfActive timings

Unneeded and adds extra timings cost to every entity tick
This commit is contained in:
Aikar 2016-03-18 17:11:53 -04:00
parent 3ce3b26186
commit af73f87c66

View file

@ -38,7 +38,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public static final Timing playerCommandTimer = Timings.ofSafe("playerCommand");
+
+ public static final Timing entityActivationCheckTimer = Timings.ofSafe("entityActivationCheck");
+ public static final Timing checkIfActiveTimer = Timings.ofSafe("checkIfActive");
+
+ public static final Timing antiXrayUpdateTimer = Timings.ofSafe("anti-xray - update");
+ public static final Timing antiXrayObfuscateTimer = Timings.ofSafe("anti-xray - obfuscate");
@ -1119,4 +1118,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public class ActivationRange
{
@@ -0,0 +0,0 @@ public class ActivationRange
*/
public static boolean checkIfActive(Entity entity)
{
- SpigotTimings.checkIfActiveTimer.startTiming();
// Never safe to skip fireworks or entities not yet added to chunk
// PAIL: inChunk
if ( !entity.isAddedToChunk() || entity instanceof EntityFireworks ) { // Paper - EAR: Fix bug with teleporting entities
- SpigotTimings.checkIfActiveTimer.stopTiming();
return true;
}
@@ -0,0 +0,0 @@ public class ActivationRange
{
isActive = false;
}
- SpigotTimings.checkIfActiveTimer.stopTiming();
return isActive;
}
}
--