Fixed Micro Battles lag (stupid lava)

cmds for jnr devs
smaller head hitbox in MS
added MB to parser plugin
This commit is contained in:
Cheese 2015-06-17 13:02:12 +10:00
parent 47744a80e9
commit 6886484d79
7 changed files with 21 additions and 9 deletions

View File

@ -11,6 +11,7 @@ public enum GameType
BaconBrawl("Bacon Brawl"),
Barbarians("A Barbarians Life"),
Bridge("The Bridges"),
Build("Master Builders"),
CastleSiege("Castle Siege"),
ChampionsTDM("Champions TDM", "Champions"),
ChampionsDominate("Champions Domination", "Champions"),

View File

@ -10,7 +10,7 @@ public class GameCommand extends MultiCommandBase<ArcadeManager>
{
public GameCommand(ArcadeManager plugin)
{
super(plugin, Rank.ADMIN, new Rank[] {Rank.YOUTUBE, Rank.MAPLEAD}, "game");
super(plugin, Rank.ADMIN, new Rank[] {Rank.YOUTUBE, Rank.MAPLEAD, Rank.JNR_DEV}, "game");
AddCommand(new StartCommand(Plugin));
AddCommand(new StopCommand(Plugin));

View File

@ -19,7 +19,7 @@ public class SetCommand extends CommandBase<ArcadeManager>
{
public SetCommand(ArcadeManager plugin)
{
super(plugin, Rank.ADMIN, new Rank[] {Rank.YOUTUBE, Rank.MAPLEAD}, "set");
super(plugin, Rank.ADMIN, new Rank[] {Rank.YOUTUBE, Rank.MAPLEAD, Rank.JNR_DEV}, "set");
}
@Override

View File

@ -12,7 +12,7 @@ public class StartCommand extends CommandBase<ArcadeManager>
{
public StartCommand(ArcadeManager plugin)
{
super(plugin, Rank.ADMIN, new Rank[] {Rank.YOUTUBE, Rank.MAPLEAD}, "start");
super(plugin, Rank.ADMIN, new Rank[] {Rank.YOUTUBE, Rank.MAPLEAD, Rank.JNR_DEV}, "start");
}
@Override

View File

@ -13,7 +13,7 @@ public class StopCommand extends CommandBase<ArcadeManager>
{
public StopCommand(ArcadeManager plugin)
{
super(plugin, Rank.ADMIN, new Rank[] {Rank.MAPLEAD}, "stop");
super(plugin, Rank.ADMIN, new Rank[] {Rank.MAPLEAD, Rank.JNR_DEV}, "stop");
}
@Override

View File

@ -76,7 +76,7 @@ public class Micro extends TeamGame
{
Block block = WorldData.World.getBlockAt(x, y, z);
if (block.getType() == Material.AIR)
if (block.getType() == Material.AIR || block.isLiquid())
continue;
_blocks.add(block);
@ -104,9 +104,18 @@ public class Micro extends TeamGame
if (_blocks.isEmpty())
return;
if (!UtilTime.elapsed(GetStateTime(), 12000))
return;
int d = 1;
if (UtilTime.elapsed(GetStateTime(), 16000))
d = 2;
if (UtilTime.elapsed(GetStateTime(), 20000))
d = 3;
//TimingManager.start("Block Fall");
for (int i = 0 ; i < 3 ; i++)
for (int i = 0 ; i < d ; i++)
{
Block bestBlock = null;
double bestDist = 0;
@ -133,7 +142,7 @@ public class Micro extends TeamGame
if (Math.random() > 0.75)
bestBlock.getWorld().spawnFallingBlock(bestBlock.getLocation().add(0.5, 0.5, 0.5), bestBlock.getType(), bestBlock.getData());
bestBlock.setType(Material.AIR);
MapUtil.QuickChangeBlockAt(bestBlock.getLocation(), Material.AIR);
}
}
@ -178,6 +187,8 @@ public class Micro extends TeamGame
if (!UtilTime.elapsed(GetStateTime(), 10000))
return;
Announce("Removing Glass: " + _glass.size());
for (Block block : _glass)
MapUtil.QuickChangeBlockAt(block.getLocation(), Material.AIR);

View File

@ -1369,9 +1369,9 @@ public class MineStrike extends TeamGame
public boolean hitHead(Player player, Location loc)
{
return UtilMath.offset2d(loc, player.getLocation()) < 0.3 && //0.3 is ideal
return UtilMath.offset2d(loc, player.getLocation()) < 0.2 && //0.3 was old value, too large
loc.getY() >= player.getEyeLocation().getY() - 0.1 &&
loc.getY() < player.getEyeLocation().getY() + 0.2;
loc.getY() < player.getEyeLocation().getY() + 0.1; //0.2 was old value, too large
}