PDA

View Full Version : Bug Found: Trueview


ensiform
02-22-2006, 05:06 PM
Razor and i have found out that trueview.cfg is like never loaded at least when you are local. because the piece that is calling it is never really right. clientNum is always 1 less than cg.snap->ps.clientNum. i pointed this out to him though already so he's looking into it for a better place to stick the code to run only when its you who changes models.

razorace
02-22-2006, 09:54 PM
I'll fix it when I have time tonight.

ensiform
02-23-2006, 11:16 PM
fixed, update your cvs its in cg_players.c


gj razor :king1:

razorace
02-24-2006, 06:11 AM
Thank you. :)

ensiform
05-16-2006, 05:59 PM
when using grip you dont see it around your hand in trueview first person :smash:

fix:

cg_players.c:

replace these two lines:

if ((cent->currentState.forcePowersActive & (1 << FP_GRIP)) &&
(cg.renderingThirdPerson || cent->currentState.number != cg.snap->ps.clientNum))

with:

//
if ((cent->currentState.forcePowersActive & (1 << FP_GRIP)) &&
(cg.renderingThirdPerson || cent->currentState.number != cg.snap->ps.clientNum
|| cg_trueguns.integer || cg.predictedPlayerState.weapon == WP_SABER
|| cg.predictedPlayerState.weapon == WP_MELEE))
//if ((cent->currentState.forcePowersActive & (1 << FP_GRIP)) &&
// (cg.renderingThirdPerson || cent->currentState.number != cg.snap->ps.clientNum))
//

razorace
06-11-2006, 11:45 PM
I checked the code and it looks like this fix is already in there.

Emiel Regis
07-20-2006, 09:13 AM
There is a problem using TrueView with scaled models - the crosshair is way off if you're using TV. This happened to me with MB's scaled models (wooks and sbds) and I couldn't find a real fix for it... Anyway code creating problems is in cg_players.c where eyeBolts for TV are set(~12000 line).

razorace
07-20-2006, 04:42 PM
hmmm, that's odd. I've never tried it with modelscale but I'd expect it to work correctly if the ->modelscale vector is passed into the code properly. It might be a problem with the crosshair code.

Emiel Regis
07-24-2006, 04:59 PM
Yea, actually I figured out it is. Anyway if anyone's willing to fix it, do it :P

razorace
07-28-2006, 04:12 PM
hmmm, what do you think is causing the crosshair problem then?

Emiel Regis
07-29-2006, 09:25 PM
I'm fairly positive that this line 'eyesBolt = trap_G2API_AddBolt(cent->ghoul2, 0, "*head_eyes");' or something within it's function causes it...(can't give you exact line since I'm using different code than you are but it starts with '//Restrict True View Model changes to the player and do the True View camera view work.' in cg_players.c) I tried commenting out this code and it fixed the issue (although there were two models rendered and general bugginess).

ensiform
07-29-2006, 09:55 PM
yeah but trap_G2API_GetBoltMatrix uses cent->modelScale which is correct so i dunno. what if you multiply the cg_trueeyeposition value by the modelscale?

razorace
07-30-2006, 08:16 PM
I'm fairly positive that this line 'eyesBolt = trap_G2API_AddBolt(cent->ghoul2, 0, "*head_eyes");' or something within it's function causes it...(can't give you exact line since I'm using different code than you are but it starts with '//Restrict True View Model changes to the player and do the True View camera view work.' in cg_players.c) I tried commenting out this code and it fixed the issue (although there were two models rendered and general bugginess).
That line is for checking to see if the model has a bolt for the player's eyes. If that surface tag exists on the playermodel, a bolt handle is assigned for that surface tag (or the preexisting one will be returned). If not, -1 will be returned. This line along shouldn't cause problems with the crosshair unless the crosshair code is using bolts for some reason. I'd check to see if the crosshair code uses bolts and if so, which ones.