SSM Hunger Fix

This commit is contained in:
Chiss 2013-11-17 09:53:53 +11:00
parent 07d9610bf7
commit 630281c663
2 changed files with 7 additions and 7 deletions

View File

@ -60,7 +60,7 @@ public class BlockForm extends Form
//Player > Chicken
DisguiseChicken disguise = new DisguiseChicken(Player);
disguise.setBaby();
disguise.setBaby();
disguise.setSoundDisguise(new DisguiseCat(Player));
Host.Manager.GetDisguise().disguise(disguise);

View File

@ -342,7 +342,7 @@ public class SuperSmash extends SoloGame
if (!IsLive())
return;
hungerTick = (hungerTick + 1)%8;
hungerTick = (hungerTick + 1)%10;
for (Player player : GetPlayers(true))
{
@ -363,21 +363,21 @@ public class SuperSmash extends SoloGame
@EventHandler(priority = EventPriority.MONITOR)
public void HungerRestore(CustomDamageEvent event)
{
if (event.IsCancelled())
return;
if (event.GetDamagerPlayer(true) != null)
if (event.GetDamagerPlayer(true) == null)
return;
Player damager = event.GetDamagerPlayer(true);
if (damager == null)
return;
if (!Recharge.Instance.use(damager, "Hunger Restore", 250, false))
return;
int amount = Math.max(1, (int)(event.GetDamage()/2));
UtilPlayer.hunger(damager, amount);
}
}