feat(glue): call CGlueLoading::StartLoad from CCharacterSelection::ShowCharacter

This commit is contained in:
fallenoak 2025-10-15 00:37:44 -05:00
parent 5277bf7f5d
commit 550f7dbdd0
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
3 changed files with 41 additions and 1 deletions

View File

@ -2,6 +2,7 @@
#include "client/ClientServices.hpp"
#include "component/CCharacterComponent.hpp"
#include "db/Db.hpp"
#include "glue/CGlueLoading.hpp"
#include "glue/CGlueMgr.hpp"
#include "glue/CRealmList.hpp"
#include "glue/Types.hpp"
@ -169,7 +170,8 @@ void CCharacterSelection::ShowCharacter() {
petModel->AttachToParent(parent, 1, nullptr, 0);
}
// TODO CGlueLoading::StartLoad(&character->component, 0);
// TODO a2 may be 1 in some circumstances
CGlueLoading::StartLoad(character->component, 0);
return;
}

21
src/glue/CGlueLoading.cpp Normal file
View File

@ -0,0 +1,21 @@
#include "glue/CGlueLoading.hpp"
#include "component/CCharacterComponent.hpp"
#include "model/Model2.hpp"
#include "util/SFile.hpp"
int32_t CGlueLoading::s_loadState;
void CGlueLoading::StartLoad(CCharacterComponent* component, int32_t a2) {
if (SFile::IsStreamingTrial()) {
// TODO
return;
}
if (component) {
component->RenderPrep(1);
component->m_data.model->IsDrawable(1, 1);
}
CGlueLoading::s_loadState = 3;
}

17
src/glue/CGlueLoading.hpp Normal file
View File

@ -0,0 +1,17 @@
#ifndef GLUE_C_GLUE_LOADING_HPP
#define GLUE_C_GLUE_LOADING_HPP
#include <cstdint>
class CCharacterComponent;
class CGlueLoading {
public:
// Static variables
static int32_t s_loadState;
// Static functions
static void StartLoad(CCharacterComponent* component, int32_t a2);
};
#endif