From 96c9222c65471d664a9350e4e9b853221010c383 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Fri, 14 Apr 2017 08:02:01 +1000 Subject: [PATCH] Fix sitting model with two-layer skins (Thanks Daeslender) and fix sitting model not being in /client models list (Thanks Brett) --- .../Commands/SinglePlayerCommands.cs | 2 +- .../Entities/Model/HumanoidModel.cs | 4 +- src/Client/Client.vcxproj | 2 + src/Client/Client.vcxproj.filters | 124 +++++++++--------- src/Client/Compiler.c | 3 + src/Client/Compiler.h | 2 +- src/Client/Typedefs.h | 1 + 7 files changed, 75 insertions(+), 63 deletions(-) create mode 100644 src/Client/Compiler.c diff --git a/ClassicalSharp/Commands/SinglePlayerCommands.cs b/ClassicalSharp/Commands/SinglePlayerCommands.cs index bce7aaf8b..021b9dabb 100644 --- a/ClassicalSharp/Commands/SinglePlayerCommands.cs +++ b/ClassicalSharp/Commands/SinglePlayerCommands.cs @@ -22,7 +22,7 @@ namespace ClassicalSharp.Commands { Help = new string[] { "&a/client model [name]", "&bnames: &echibi, chicken, creeper, human, pig, sheep", - "&e skeleton, spider, zombie, ", + "&e skeleton, spider, zombie, sitting, ", }; } diff --git a/ClassicalSharp/Entities/Model/HumanoidModel.cs b/ClassicalSharp/Entities/Model/HumanoidModel.cs index 432bf5693..5636b5e34 100644 --- a/ClassicalSharp/Entities/Model/HumanoidModel.cs +++ b/ClassicalSharp/Entities/Model/HumanoidModel.cs @@ -114,8 +114,8 @@ namespace ClassicalSharp.Model { index = 0; if (skinType != SkinType.Type64x32) { DrawPart(model.TorsoLayer); - DrawRotate(p.anim.leftLegX, 0, 0, model.LeftLegLayer, false); - DrawRotate(p.anim.rightLegX, 0, 0, model.RightLegLayer, false); + DrawRotate(p.anim.leftLegX, 0, p.anim.leftLegZ, model.LeftLegLayer, false); + DrawRotate(p.anim.rightLegX, 0, p.anim.rightLegZ, model.RightLegLayer, false); Rotate = RotateOrder.XZY; DrawRotate(p.anim.leftArmX, 0, p.anim.leftArmZ, model.LeftArmLayer, false); DrawRotate(p.anim.rightArmX, 0, p.anim.rightArmZ, model.RightArmLayer, false); diff --git a/src/Client/Client.vcxproj b/src/Client/Client.vcxproj index d47f649d7..32e9a063f 100644 --- a/src/Client/Client.vcxproj +++ b/src/Client/Client.vcxproj @@ -178,9 +178,11 @@ + + diff --git a/src/Client/Client.vcxproj.filters b/src/Client/Client.vcxproj.filters index ee5cb00c0..e65ce1445 100644 --- a/src/Client/Client.vcxproj.filters +++ b/src/Client/Client.vcxproj.filters @@ -1,60 +1,66 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {5c270b38-8fe1-4d87-81bb-71b889de1474} - - - {6acee9ab-36de-4f0d-b434-b915b4b52c02} - - - {405d40c2-3d05-4d42-8ccb-415189b379a4} - - - - - Header Files\Generator - - - Header Files\Generator - - - Header Files\Generator - - - Header Files\Defines - - - Header Files\Defines - - - Header Files\Defines - - - Header Files - - - - - Source Files\Generator - - - Source Files\Generator - - - Source Files\Generator - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {5c270b38-8fe1-4d87-81bb-71b889de1474} + + + {6acee9ab-36de-4f0d-b434-b915b4b52c02} + + + {405d40c2-3d05-4d42-8ccb-415189b379a4} + + + + + Header Files\Generator + + + Header Files\Generator + + + Header Files\Generator + + + Header Files\Defines + + + Header Files\Defines + + + Header Files\Defines + + + Header Files + + + + + Source Files\Generator + + + Source Files\Generator + + + Source Files\Generator + + + Source Files\Generator + + + Source Files\Generator + + \ No newline at end of file diff --git a/src/Client/Compiler.c b/src/Client/Compiler.c new file mode 100644 index 000000000..bb143a5a4 --- /dev/null +++ b/src/Client/Compiler.c @@ -0,0 +1,3 @@ +#include "Compiler.h" +#include "Typedefs.h" +int __stdcall DllMain(void* hinstDLL, UInt32 fdwReason, void* pvReserved) { return 1; } \ No newline at end of file diff --git a/src/Client/Compiler.h b/src/Client/Compiler.h index cba820b75..fabd921f6 100644 --- a/src/Client/Compiler.h +++ b/src/Client/Compiler.h @@ -18,5 +18,5 @@ #define EXPORT_FUNC __declspec(dllexport) #define IMPORT_FUNC __declspec(dllimport) -int __stdcall DllMain(void* hinstDLL, UInt32 fdwReason, void* pvReserved) { return 1; } +int __stdcall DllMain(void* hinstDLL, UInt32 fdwReason, void* pvReserved); #endif \ No newline at end of file diff --git a/src/Client/Typedefs.h b/src/Client/Typedefs.h index 3e6a17d03..c5a7877f0 100644 --- a/src/Client/Typedefs.h +++ b/src/Client/Typedefs.h @@ -18,6 +18,7 @@ typedef double Real64; typedef UInt8 bool; #define true 1 #define false 0 +#define NULL 0 typedef UInt8 BlockID; typedef UInt8 EntityID;