mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 00:32:45 +03:00
feat(model): handle texture replacement model calls on model load
This commit is contained in:
parent
ca58375aa4
commit
e794580ea8
@ -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);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user