UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Bug report #2428 envmaps not working correctly...
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Bug report
  • Category
    Battlescape
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    4. Useful
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (1)
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    Not estimated
Issue details
  • Resolution
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Complexity
    Not determined
  • Platform
    Not determined
  • Architecture
    Not determined
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/bugs/2428 Item 2428] imported from sourceforge.net tracker on 2013-01-28 19:35:59

Digging through the code I maybe found a explanation why the same envmap is used all the time, but I am not sure:

In r_material.c you can find this:

if (!strcmp(c, "envmap")) {
c = Com_Parse(buffer);
i = atoi(c);

if (i > -1 && i < MAX_ENVMAPTEXTURES)
s->image = r_envmaptextures[i];
else
s->image = R_FindImage(va("pics/envmaps/%s", c), it_material);

if (s->image == r_noTexture) {
Com_Printf("R_ParseStage: Failed to resolve envmap: %s\n", c);
return -1;
}

s->flags |= STAGE_ENVMAP;
continue;
}

...
and much later this:

if (!strcmp(c, "flare")) {
c = Com_Parse(buffer);
i = atoi(c);

if (i > -1 && i < NUM_FLARETEXTURES)
s->image = r_flaretextures[i];
else
s->image = R_FindImage(va("flares/%s", c), it_material);

if (s->image == r_noTexture) {
Com_Printf("R_ParseStage: Failed to resolve flare: %s\n", c);
return -1;
}

s->flags |= STAGE_FLARE;
continue;
}

I think these 2 lines should be the same:

s->image = R_FindImage(va("pics/envmaps/%s", c), it_material);
&
s->image = R_FindImage(va("flares/%s", c), it_material);

Flares working, envmaps don&#039;t, so maybe pics/envmaps/%s should be changed to envmaps/%s ?

But I am not 100% sure, but would do some testing in the next days...

Maybe someone could correct me if I am wrong or change the code right away if I am right...

===== Comments Ported from Sourceforge =====

====== tlh2000 (2010-03-31 18:36:04) ======

you are right - but that&#039;s a different issue - it&#039;s fixed now in current trunk - though it does not fix any envmap issue
====== mcr2010 (2010-03-31 19:07:49) ======

I will try to find the error when I have finished the animations...

====== mcr2010 (2011-10-02 07:46:43) ======

Last time I tested, envmaps were working as expected.
====== aduke1 (2012-09-15 22:01:45.274000) ======

- **status**: pending --> closed
Steps to reproduce this issue
Nothing entered.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif