Forum

Missing model bug.

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Missing model bug.

Postby r00k » Mon Sep 17, 2012 9:00 pm

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: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Re: Missing model bug.

Postby r00k » Wed Sep 19, 2012 4:28 am

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
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest