smartcmd-MinecraftConsoles/Minecraft.World/TextureAndGeometryPacket.cpp

286 lines
7.1 KiB
C++
Raw Normal View History

2026-03-01 12:16:08 +08:00
#include "stdafx.h"
#include <iostream>
#include "InputOutputStream.h"
#include "PacketListener.h"
#include "TextureAndGeometryPacket.h"
TextureAndGeometryPacket::TextureAndGeometryPacket()
2026-03-01 12:16:08 +08:00
{
this->textureName = L"";
this->dwTextureBytes = 0;
this->pbData = nullptr;
2026-03-01 12:16:08 +08:00
this->dwBoxC = 0;
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
this->dwOffsetC = 0;
this->BoxDataA = nullptr;
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
this->OffsetDataA = nullptr;
2026-03-01 12:16:08 +08:00
uiAnimOverrideBitmask=0;
}
TextureAndGeometryPacket::~TextureAndGeometryPacket()
2026-03-01 12:16:08 +08:00
{
// can't free these - they're used elsewhere
// if(this->BoxDataA!=nullptr)
2026-03-01 12:16:08 +08:00
// {
// delete [] this->BoxDataA;
// }
//
// if(this->pbData!=nullptr)
2026-03-01 12:16:08 +08:00
// {
// delete [] this->pbData;
// }
}
TextureAndGeometryPacket::TextureAndGeometryPacket(const wstring &textureName, PBYTE pbData, DWORD dwBytes)
2026-03-01 12:16:08 +08:00
{
this->textureName = textureName;
wstring skinValue = textureName.substr(7,textureName.size());
skinValue = skinValue.substr(0,skinValue.find_first_of(L'.'));
std::wstringstream ss;
ss << std::dec << skinValue.c_str();
ss >> this->dwSkinID;
this->dwSkinID = MAKE_SKIN_BITMASK(true, this->dwSkinID);
this->pbData = pbData;
this->dwTextureBytes = dwBytes;
this->dwBoxC = 0;
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
this->dwOffsetC = 0;
this->BoxDataA=nullptr;
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
this->OffsetDataA=nullptr;
2026-03-01 12:16:08 +08:00
this->uiAnimOverrideBitmask=0;
}
TextureAndGeometryPacket::TextureAndGeometryPacket(const wstring &textureName, PBYTE pbData, DWORD dwBytes, DLCSkinFile *pDLCSkinFile)
2026-03-01 12:16:08 +08:00
{
this->textureName = textureName;
wstring skinValue = textureName.substr(7,textureName.size());
skinValue = skinValue.substr(0,skinValue.find_first_of(L'.'));
std::wstringstream ss;
ss << std::dec << skinValue.c_str();
ss >> this->dwSkinID;
this->dwSkinID = MAKE_SKIN_BITMASK(true, this->dwSkinID);
this->pbData = pbData;
this->dwTextureBytes = dwBytes;
this->uiAnimOverrideBitmask = pDLCSkinFile->getAnimOverrideBitmask();
this->dwBoxC = pDLCSkinFile->getAdditionalBoxesCount();
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
this->dwOffsetC = pDLCSkinFile->getOffsetsCount();
2026-03-01 12:16:08 +08:00
if(this->dwBoxC!=0)
{
this->BoxDataA= new SKIN_BOX [this->dwBoxC];
vector<SKIN_BOX *> *pSkinBoxes=pDLCSkinFile->getAdditionalBoxes();
int iCount=0;
for(auto& pSkinBox : *pSkinBoxes)
2026-03-01 12:16:08 +08:00
{
this->BoxDataA[iCount++]=*pSkinBox;
}
2026-03-01 12:16:08 +08:00
}
else
{
this->BoxDataA=nullptr;
2026-03-01 12:16:08 +08:00
}
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
if(this->dwOffsetC!=0)
{
this->OffsetDataA= new SKIN_OFFSET [this->dwOffsetC];
vector<SKIN_OFFSET *> *pSkinOffsets=pDLCSkinFile->getOffsets();
int iCount=0;
for(auto& pSkinOffset : *pSkinOffsets)
{
this->OffsetDataA[iCount++]=*pSkinOffset;
}
}
else
{
this->OffsetDataA=nullptr;
}
2026-03-01 12:16:08 +08:00
}
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
TextureAndGeometryPacket::TextureAndGeometryPacket(const wstring &textureName, PBYTE pbData, DWORD dwBytes, vector<SKIN_BOX *> *pvSkinBoxes, vector<SKIN_OFFSET *> *pvSkinOffsets, unsigned int uiAnimOverrideBitmask)
2026-03-01 12:16:08 +08:00
{
this->textureName = textureName;
wstring skinValue = textureName.substr(7,textureName.size());
skinValue = skinValue.substr(0,skinValue.find_first_of(L'.'));
std::wstringstream ss;
ss << std::dec << skinValue.c_str();
ss >> this->dwSkinID;
this->dwSkinID = MAKE_SKIN_BITMASK(true, this->dwSkinID);
this->pbData = pbData;
this->dwTextureBytes = dwBytes;
this->uiAnimOverrideBitmask = uiAnimOverrideBitmask;
if(pvSkinBoxes==nullptr)
2026-03-01 12:16:08 +08:00
{
this->dwBoxC=0;
this->BoxDataA=nullptr;
2026-03-01 12:16:08 +08:00
}
else
{
this->dwBoxC = static_cast<DWORD>(pvSkinBoxes->size());
2026-03-01 12:16:08 +08:00
this->BoxDataA= new SKIN_BOX [this->dwBoxC];
int iCount=0;
for(auto& pSkinBox : *pvSkinBoxes)
2026-03-01 12:16:08 +08:00
{
this->BoxDataA[iCount++]=*pSkinBox;
}
2026-03-01 12:16:08 +08:00
}
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
if(pvSkinOffsets==nullptr)
{
this->dwOffsetC=0;
this->OffsetDataA=nullptr;
}
else
{
this->dwOffsetC = static_cast<DWORD>(pvSkinOffsets->size());
this->OffsetDataA= new SKIN_OFFSET [this->dwOffsetC];
int iCount=0;
for(auto& pSkinOffset : *pvSkinOffsets)
{
this->OffsetDataA[iCount++]=*pSkinOffset;
}
}
2026-03-01 12:16:08 +08:00
}
void TextureAndGeometryPacket::handle(PacketListener *listener)
2026-03-01 12:16:08 +08:00
{
listener->handleTextureAndGeometry(shared_from_this());
}
void TextureAndGeometryPacket::read(DataInputStream *dis) //throws IOException
{
textureName = dis->readUTF();
dwSkinID = static_cast<DWORD>(dis->readInt());
short rawTextureBytes = dis->readShort();
if (rawTextureBytes <= 0)
{
dwTextureBytes = 0;
}
else
{
dwTextureBytes = (DWORD)(unsigned short)rawTextureBytes;
if (dwTextureBytes > 65536)
{
dwTextureBytes = 0;
}
}
2026-03-01 12:16:08 +08:00
if(dwTextureBytes>0)
{
this->pbData= new BYTE [dwTextureBytes];
for(DWORD i=0;i<dwTextureBytes;i++)
{
this->pbData[i] = dis->readByte();
}
}
uiAnimOverrideBitmask = dis->readInt();
short rawBoxC = dis->readShort();
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
short rawOffsetC = dis->readShort();
if (rawBoxC <= 0)
{
dwBoxC = 0;
}
else
{
dwBoxC = (DWORD)(unsigned short)rawBoxC;
if (dwBoxC > 256)
{
dwBoxC = 0; // sane limit for skin boxes
}
}
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
if (rawOffsetC <= 0)
{
dwOffsetC = 0;
}
else
{
dwOffsetC = (DWORD)(unsigned short)rawOffsetC;
if (dwOffsetC > 256)
{
dwOffsetC = 0; // sane limit for skin offsets
}
}
2026-03-01 12:16:08 +08:00
if(dwBoxC>0)
{
this->BoxDataA= new SKIN_BOX [dwBoxC];
}
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
if(dwOffsetC>0)
{
this->OffsetDataA= new SKIN_OFFSET [dwOffsetC];
}
2026-03-01 12:16:08 +08:00
for(DWORD i=0;i<dwBoxC;i++)
{
this->BoxDataA[i].ePart = static_cast<eBodyPart>(dis->readShort());
2026-03-01 12:16:08 +08:00
this->BoxDataA[i].fX = dis->readFloat();
this->BoxDataA[i].fY = dis->readFloat();
this->BoxDataA[i].fZ = dis->readFloat();
this->BoxDataA[i].fH = dis->readFloat();
this->BoxDataA[i].fW = dis->readFloat();
this->BoxDataA[i].fD = dis->readFloat();
this->BoxDataA[i].fU = dis->readFloat();
this->BoxDataA[i].fV = dis->readFloat();
this->BoxDataA[i].fA = dis->readFloat();
this->BoxDataA[i].fM = dis->readFloat();
this->BoxDataA[i].fS = dis->readFloat();
2026-03-01 12:16:08 +08:00
}
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
for(DWORD i=0;i<dwOffsetC;i++)
{
this->OffsetDataA[i].ePart = static_cast<eBodyOffset>(dis->readShort());
this->OffsetDataA[i].fD = dis->readFloat();
this->OffsetDataA[i].fO = dis->readFloat();
}
2026-03-01 12:16:08 +08:00
}
void TextureAndGeometryPacket::write(DataOutputStream *dos) //throws IOException
2026-03-01 12:16:08 +08:00
{
dos->writeUTF(textureName);
dos->writeInt(dwSkinID);
dos->writeShort(static_cast<short>(dwTextureBytes));
2026-03-01 12:16:08 +08:00
for(DWORD i=0;i<dwTextureBytes;i++)
{
dos->writeByte(this->pbData[i]);
}
dos->writeInt(uiAnimOverrideBitmask);
dos->writeShort(static_cast<short>(dwBoxC));
2026-03-01 12:16:08 +08:00
for(DWORD i=0;i<dwBoxC;i++)
{
dos->writeShort(static_cast<short>(this->BoxDataA[i].ePart));
2026-03-01 12:16:08 +08:00
dos->writeFloat(this->BoxDataA[i].fX);
dos->writeFloat(this->BoxDataA[i].fY);
dos->writeFloat(this->BoxDataA[i].fZ);
dos->writeFloat(this->BoxDataA[i].fH);
dos->writeFloat(this->BoxDataA[i].fW);
dos->writeFloat(this->BoxDataA[i].fD);
dos->writeFloat(this->BoxDataA[i].fU);
dos->writeFloat(this->BoxDataA[i].fV);
dos->writeFloat(this->BoxDataA[i].fA);
dos->writeFloat(this->BoxDataA[i].fM);
dos->writeFloat(this->BoxDataA[i].fS);
2026-03-01 12:16:08 +08:00
}
Squashed commit of the following: commit b40530fa5e12bdd0e2d03686b111964f9c5b3359 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d984089b989a162550705dee7a505412e22 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100cf9afe7df258dc653a4b33857d3cd285c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d1fb93d09a49987460ef698e0d125c2c93 Merge: db685a74 24c74aa2 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a74f34d02cc83e33ab97c5a7ad9a62ef023 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d54adb8f5bf96c75d10766422d23cc9129a Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12cc072db74ed9b8da937e00c2e15f889a0 Merge: 8e76763a fd2fd659 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763a3ddeaff943243fd0469d6c4a7b12b6c1 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f3532979033717044e74e6ceb766e23e35032 Merge: a1d9ae59 bb5fa506 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae591ac27117626aac708a4204a9e2451684 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751d9ca0527854e40be82e7841a650c2f189 Merge: 3888de7a 8bf03435 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7ab401d9562b7b922eca8b898aa73ba024 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.
2026-04-15 20:00:28 -07:00
dos->writeShort(static_cast<short>(dwOffsetC));
for(DWORD i=0;i<dwOffsetC;i++)
{
dos->writeShort(static_cast<short>(this->OffsetDataA[i].ePart));
dos->writeFloat(this->OffsetDataA[i].fD);
dos->writeFloat(this->OffsetDataA[i].fO);
}
2026-03-01 12:16:08 +08:00
}
int TextureAndGeometryPacket::getEstimatedSize()
2026-03-01 12:16:08 +08:00
{
return 4096+ +sizeof(int) + sizeof(float)*8*4;
}