Missing model bug.

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Missing model bug.

Post by r00k »

Well I've stumbled onto a bug lately that's been hidden for over a year in my project. It seems to really only happen with the Q1A mod.
When i start the mod with -game q1a none of the armor models, weapons, health even the bot player model doesnt appear.
Although, i can hear the bots and they attack me. If i run over where a green armor is (dm6) it does pick it up. I just dont see the model.
I DO see my own viewent and viewmodel though.
If i type "entities" it lists the invisible items in view.

So, after a few hours diff'nn old versions that dont have this bug im still stuck.

If I take the q1a pak0.pak and put it in the frikbot folder for instance, all the models load properly.
So it might be a progs.dat issue...hmm I did notice some items falling off the map 'bonus item fell out of level..."

edit: i just fired up a wqpro server and same items fell out, used -game q1a on the client and everything loads properly....so i guess its not a gamedir bug :(
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Missing model bug.

Post by r00k »

Found it!

// nehahra: model alpha
if ((val = GETEDICTFIELDVALUE(ent, eval_alpha)))
{
alpha = val->_float;
CLAMP(0,alpha,255);
// bits |= U_TRANS;
}
else
alpha = 1;

if ((val = GETEDICTFIELDVALUE(ent, eval_renderamt)) && val->_float != 0) // HalfLife support
{
alpha = val->_float;
CLAMP(0,alpha,255);
// bits |= U_TRANS;
}

if ((val = GETEDICTFIELDVALUE(ent, eval_fullbright)))
fullbright = val->_float;
else
fullbright = 0;

if ((alpha < 1 && alpha > 0) || fullbright)
bits |= U_TRANS;
the clamping still can have 0 and makes the models alpha = 0 on some mods that support it!!! :D
Post Reply