Fixed item col not working correctly

This commit is contained in:
korenkonder
2024-06-06 12:22:41 +03:00
parent f98c25edb6
commit 58cc073ab6
5 changed files with 17 additions and 12 deletions
+3 -3
View File
@@ -453,7 +453,7 @@ namespace mdl {
if (texture_id != -1) {
texture_id &= 0xFFFFF;
for (int32_t j = 0; j < args->texture_pattern_count; j++)
if (args->texture_pattern_array[j].src == tex_index) {
if (args->texture_pattern_array[j].src == ::texture_id(0x00, tex_index)) {
texture* tex = texture_manager_get_texture(args->texture_pattern_array[j].dst);
if (tex)
tex_id = tex->glid;
@@ -678,7 +678,7 @@ static void draw_object_material_set_default(const mdl::ObjSubMeshArgs* args, bo
GLuint tex_id = -1;
uint32_t texture_id = texdata->tex_index & 0xFFFFF;
for (int32_t j = 0; j < args->texture_pattern_count; j++)
if (args->texture_pattern_array[j].src == texture_id) {
if (args->texture_pattern_array[j].src == ::texture_id(0x00, texture_id)) {
texture* tex = texture_manager_get_texture(args->texture_pattern_array[j].dst);
if (tex)
tex_id = tex->glid;
@@ -911,7 +911,7 @@ static void draw_object_material_set_reflect(const mdl::ObjSubMeshArgs* args) {
GLuint tex_id = -1;
for (int32_t j = 0; j < args->texture_pattern_count; j++)
if (args->texture_pattern_array[j].src == texture_id) {
if (args->texture_pattern_array[j].src == ::texture_id(0x00, texture_id)) {
texture* tex = texture_manager_get_texture(args->texture_pattern_array[j].dst);
if (tex)
tex_id = tex->glid;