feat(model): handle texture replacement model calls on model load

This commit is contained in:
fallenoak 2025-10-27 21:14:33 -05:00
parent ca58375aa4
commit e794580ea8
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D

View File

@ -1181,7 +1181,11 @@ int32_t CM2Model::InitializeLoaded() {
switch (modelCall->type) { switch (modelCall->type) {
case 0: { case 0: {
// TODO auto textureId = modelCall->args[0];
auto texture = *reinterpret_cast<HTEXTURE*>(&modelCall->args[1]);
this->ReplaceTexture(textureId, texture);
break; break;
} }
@ -1268,7 +1272,7 @@ int32_t CM2Model::InitializeLoaded() {
this->m_modelCallList = modelCall->modelCallNext; this->m_modelCallList = modelCall->modelCallNext;
if (modelCall->type == 0) { if (modelCall->type == 0) {
HTEXTURE texture = reinterpret_cast<HTEXTURE>(&modelCall->args[1]); auto texture = *reinterpret_cast<HTEXTURE*>(&modelCall->args[1]);
if (texture) { if (texture) {
HandleClose(texture); HandleClose(texture);