fix starting with half instead of full health

This commit is contained in:
UnknownShadow200 2017-06-23 08:42:25 +10:00
parent 46fa9eb12b
commit c4ba902141
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
// Copyright 2014-2017 ClassicalSharp | Licensed under BSD-3
using System;
using ClassicalSharp.Entities;
using OpenTK;
#if USE16_BIT
@ -58,9 +59,7 @@ namespace ClassicalSharp {
static BlockID RotateOther(Game game, BlockID block, string name, Vector3 offset) {
// Fence type blocks
if (game.BlockInfo.FindID(name + "-UD") == -1) {
float headY = game.LocalPlayer.HeadY;
if (headY < 0) headY += 360;
float headY = LocationUpdate.Clamp(game.LocalPlayer.HeadY);
if (headY < 45 || (headY >= 135 && headY < 225) || headY > 315)
return Find(game, block, name + "-WE");
return Find(game, block, name + "-NS");

View File

@ -143,6 +143,7 @@ namespace ClassicalSharp.Entities {
Hacks.WOMStyleHacks = !game.ClassicMode && Options.GetBool(OptionsKey.WOMStyleHacks, false);
Hacks.Enabled = !game.PureClassic && Options.GetBool(OptionsKey.HacksEnabled, true);
Hacks.FullBlockStep = !game.ClassicMode && Options.GetBool(OptionsKey.FullBlockStep, false);
Health = 20;
}
public void Ready(Game game) { }
@ -155,6 +156,7 @@ namespace ClassicalSharp.Entities {
Velocity = Vector3.Zero;
physics.jumpVel = 0.42f;
physics.serverJumpVel = 0.42f;
Health = 20;
}
}
}