commitb40530fa5eAuthor: 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. commita8384d9840Author: 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. commit875100cf9aAuthor: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit96f683d1fbMerge:db685a7424c74aa2Author: 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 commitdb685a74f3Author: 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). commitaa769d54adAuthor: 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. commitf18ac12cc0Merge:8e76763afd2fd659Author: 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 commit8e76763a3dAuthor: 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. commit1a8f353297Merge:a1d9ae59bb5fa506Author: 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 commita1d9ae591aAuthor: 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. commitd28a751d9cMerge:3888de7a8bf03435Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit3888de7ab4Author: 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.
96 lines
3.4 KiB
C++
96 lines
3.4 KiB
C++
#pragma once
|
|
#include "Model.h"
|
|
#include "SkinOffset.h"
|
|
|
|
class HumanoidModel : public Model
|
|
{
|
|
public:
|
|
// Base geometry
|
|
ModelPart *head, *hair, *body, *arm0, *arm1, *leg0, *leg1, *ear, *cloak;
|
|
// Second layer/64x64 skin geometry
|
|
ModelPart *jacket, *sleeve0, *sleeve1, *pants0, *pants1;
|
|
// Extra geometry for DLC skins
|
|
ModelPart *waist, *belt, *bodyArmor, *armArmor0, *armArmor1, *legging0, *legging1, *sock0, *sock1, *boot0, *boot1;
|
|
//ModelPart *hat;
|
|
|
|
int holdingLeftHand;
|
|
int holdingRightHand;
|
|
bool idle;
|
|
bool sneaking;
|
|
bool bowAndArrow;
|
|
bool eating; // 4J added
|
|
float eating_t; // 4J added
|
|
float eating_swing; // 4J added
|
|
unsigned int m_uiAnimOverrideBitmask; // 4J added
|
|
float m_fYOffset; // 4J added
|
|
bool m_isArmor;
|
|
enum animbits
|
|
{
|
|
eAnim_ArmsDown =0,
|
|
eAnim_ArmsOutFront,
|
|
eAnim_NoLegAnim,
|
|
eAnim_HasIdle,
|
|
eAnim_ForceAnim, // Claptrap looks bad if the user turns off custom skin anim
|
|
// 4J-PB - DaveK wants Fish characters to move both legs in the same way
|
|
eAnim_SingleLegs,
|
|
eAnim_SingleArms,
|
|
eAnim_StatueOfLiberty, // Dr Who Weeping Angel
|
|
eAnim_DontRenderArmour, // Dr Who Daleks
|
|
eAnim_NoBobbing, // Dr Who Daleks
|
|
eAnim_DisableRenderHead,
|
|
eAnim_DisableRenderArm0,
|
|
eAnim_DisableRenderArm1,
|
|
eAnim_DisableRenderTorso,
|
|
eAnim_DisableRenderLeg0,
|
|
eAnim_DisableRenderLeg1,
|
|
eAnim_DisableRenderHair,
|
|
eAnim_SmallModel, // Maggie Simpson for riding horse, etc
|
|
eAnim_ClassicModel,
|
|
eAnim_SlimModel,
|
|
// Hide overlay/second layer on 64x64 skins
|
|
eAnim_DisableRenderSleeve1,
|
|
eAnim_DisableRenderSleeve0,
|
|
eAnim_DisableRenderPants1,
|
|
eAnim_DisableRenderPants0,
|
|
eAnim_DisableRenderJacket,
|
|
eAnim_RenderArmorHead,
|
|
eAnim_RenderArmorArm0,
|
|
eAnim_RenderArmorArm1,
|
|
eAnim_RenderArmorTorso,
|
|
eAnim_RenderArmorLeg0,
|
|
eAnim_RenderArmorLeg1,
|
|
eAnim_Dinnerbone
|
|
|
|
};
|
|
|
|
static const unsigned int m_staticBitmaskIgnorePlayerCustomAnimSetting= (1<<HumanoidModel::eAnim_ForceAnim) |
|
|
(1<<HumanoidModel::eAnim_DisableRenderArm0) |
|
|
(1<<HumanoidModel::eAnim_DisableRenderArm1) |
|
|
(1<<HumanoidModel::eAnim_DisableRenderTorso) |
|
|
(1<<HumanoidModel::eAnim_DisableRenderLeg0) |
|
|
(1<<HumanoidModel::eAnim_DisableRenderLeg1) |
|
|
(1<<HumanoidModel::eAnim_DisableRenderHair) |
|
|
(1<<HumanoidModel::eAnim_DisableRenderSleeve1) |
|
|
(1<<HumanoidModel::eAnim_DisableRenderSleeve0) |
|
|
(1<<HumanoidModel::eAnim_DisableRenderPants1) |
|
|
(1<<HumanoidModel::eAnim_DisableRenderPants0) |
|
|
(1<<HumanoidModel::eAnim_DisableRenderJacket);
|
|
|
|
|
|
void _init(float g, float yOffset, int texWidth, int texHeight, bool slim, bool isArmor); // 4J added
|
|
HumanoidModel();
|
|
HumanoidModel(float g);
|
|
HumanoidModel(float g, bool isArmor);
|
|
HumanoidModel(float g, float yOffset, int texWidth, int texHeight);
|
|
HumanoidModel(float g, float yOffset, int texWidth, int texHeight, bool slim);
|
|
virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled, vector<SKIN_OFFSET *> *modelOffsets = nullptr);
|
|
virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim = 0);
|
|
void renderHair(float scale, bool usecompiled);
|
|
void renderEars(float scale, bool usecompiled);
|
|
void renderCloak(float scale, bool usecompiled);
|
|
void render(HumanoidModel *model, float scale, bool usecompiled);
|
|
|
|
// Add new bits to models
|
|
ModelPart * AddOrRetrievePart(SKIN_BOX *pBox);
|
|
};
|