I really don't know what's wrong with this code, and I can't find what's wrong with it.
I have
Code:
std::vector <Light_Point *> visible_pointlights;
and in a function I determine what lights are visible from the current position. Once that is determined what I do is
Code:
visible_pointlights.push_back(entities[i]->pointlight);
entities[i]->pointlight is a Light_Point too. Among some other data, Light_Point contains 3 floats called x, y and z. The problem is that the values in visible_pointlights[i] are not the same as entities[i]->pointlight.
I really don't know why it doesn't work because I'm pointing at the sime thing.
Also, in case you need to know entities[i].pointlight is defined as
Code:
Light_Point * pointlight;
I hope that helps determine what's wrong with my code.