Don't show 'chunks/s' in top left when 0.

This commit is contained in:
UnknownShadow200 2017-08-25 12:44:44 +10:00
parent dffa95da28
commit 160d1874a6
2 changed files with 7 additions and 5 deletions

View File

@ -58,8 +58,10 @@ namespace ClassicalSharp.Gui.Screens {
if (game.ClassicMode) { if (game.ClassicMode) {
statusBuffer.AppendNum(ref index, game.ChunkUpdates).Append(ref index, " chunk updates"); statusBuffer.AppendNum(ref index, game.ChunkUpdates).Append(ref index, " chunk updates");
} else { } else {
statusBuffer.AppendNum(ref index, game.ChunkUpdates).Append(ref index, " chunks/s, ") if (game.ChunkUpdates > 0) {
.AppendNum(ref index, game.Vertices).Append(ref index, " vertices"); statusBuffer.AppendNum(ref index, game.ChunkUpdates).Append(ref index, " chunks/s, ");
}
statusBuffer.AppendNum(ref index, game.Vertices).Append(ref index, " vertices");
int ping = PingList.AveragePingMilliseconds(); int ping = PingList.AveragePingMilliseconds();
if (ping != 0) { if (ping != 0) {
@ -125,7 +127,7 @@ namespace ClassicalSharp.Gui.Screens {
int index = 0; int index = 0;
Texture tex = posAtlas.tex; Texture tex = posAtlas.tex;
tex.X1 = 2; tex.Width = (short)posAtlas.offset; tex.X1 = 2; tex.Width = (short)posAtlas.offset;
IGraphicsApi.Make2DQuad(ref tex, FastColour.WhitePacked, IGraphicsApi.Make2DQuad(ref tex, FastColour.WhitePacked,
game.ModelCache.vertices, ref index); game.ModelCache.vertices, ref index);
Vector3I pos = Vector3I.Floor(game.LocalPlayer.Position); Vector3I pos = Vector3I.Floor(game.LocalPlayer.Position);
@ -149,7 +151,7 @@ namespace ClassicalSharp.Gui.Screens {
void UpdateHackState(bool force) { void UpdateHackState(bool force) {
HacksComponent hacks = game.LocalPlayer.Hacks; HacksComponent hacks = game.LocalPlayer.Hacks;
if (force || hacks.Speeding != speeding || hacks.HalfSpeeding != halfSpeeding || hacks.Noclip != noclip || if (force || hacks.Speeding != speeding || hacks.HalfSpeeding != halfSpeeding || hacks.Noclip != noclip ||
hacks.Flying != fly || game.Fov != lastFov) { hacks.Flying != fly || game.Fov != lastFov) {
speeding = hacks.Speeding; halfSpeeding = hacks.HalfSpeeding; noclip = hacks.Noclip; fly = hacks.Flying; speeding = hacks.Speeding; halfSpeeding = hacks.HalfSpeeding; noclip = hacks.Noclip; fly = hacks.Flying;
lastFov = game.Fov; lastFov = game.Fov;
int index = 0; int index = 0;

View File

@ -101,7 +101,7 @@ namespace ClassicalSharp.Model {
(skinType == SkinType.Type64x64 ? Set64 : Set); (skinType == SkinType.Type64x64 ? Set64 : Set);
DrawRotate(-p.HeadXRadians, 0, 0, model.Head, true); DrawRotate(-p.HeadXRadians, 0, 0, model.Head, true);
DrawPart(model.Torso); DateTime.UtcNow.mi DrawPart(model.Torso);
DrawRotate(p.anim.leftLegX, 0, p.anim.leftLegZ, model.LeftLeg, false); DrawRotate(p.anim.leftLegX, 0, p.anim.leftLegZ, model.LeftLeg, false);
DrawRotate(p.anim.rightLegX, 0, p.anim.rightLegZ, model.RightLeg, false); DrawRotate(p.anim.rightLegX, 0, p.anim.rightLegZ, model.RightLeg, false);