From c8a0c1ad0ecdadc69a26c54b3e5ebd4d10ef920a Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 19 Oct 2014 03:40:27 +0000 Subject: [PATCH] try to fix bloom. fix some spectating stuff. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4772 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_cam.c | 5 +++-- engine/client/cl_pred.c | 11 +++++++++++ engine/gl/gl_bloom.c | 9 +-------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/engine/client/cl_cam.c b/engine/client/cl_cam.c index 94c17ffe5..d77f44547 100644 --- a/engine/client/cl_cam.c +++ b/engine/client/cl_cam.c @@ -290,7 +290,7 @@ static qboolean InitFlyby(playerview_t *pv, vec3_t selforigin, vec3_t playerorig } pv->cam_locked = true; - pv->viewentity = pv->cam_spec_track+1; + pv->viewentity = pv->playernum+1;//pv->cam_spec_track+1; VectorCopy(vec, pv->cam_desired_position); return true; } @@ -405,7 +405,7 @@ void Cam_Track(playerview_t *pv, usercmd_t *cmd) if (cl_hightrack.value && !pv->cam_locked) Cam_CheckHighTarget(pv); - if (!pv->cam_auto || cls.state != ca_active || cl.worldmodel || cl.worldmodel->loadstate != MLS_LOADED) + if (!pv->cam_auto || cls.state != ca_active || cl.worldmodel->loadstate != MLS_LOADED) return; if (pv->cam_locked && (!cl.players[pv->cam_spec_track].name[0] || cl.players[pv->cam_spec_track].spectator)) @@ -468,6 +468,7 @@ void Cam_Track(playerview_t *pv, usercmd_t *cmd) } self->weaponframe = player->weaponframe; + VectorCopy(player->viewangles, pv->viewangles); return; } diff --git a/engine/client/cl_pred.c b/engine/client/cl_pred.c index f0454d1fe..31cd03f36 100644 --- a/engine/client/cl_pred.c +++ b/engine/client/cl_pred.c @@ -911,6 +911,17 @@ void CL_PredictMovePNum (int seat) VectorCopy (pv->viewangles, pv->simangles); } + if (pv->cam_locked && pv->cam_spec_track >= 0) + { + extern cvar_t cl_chasecam; + if (!cl_chasecam.ival) + { + VectorCopy(pv->cam_desired_position, pv->simorg); + VectorClear(pv->simvel); + return; + } + } + if (!pv->cam_locked && pv->cam_auto && cl.spectator && pv->cam_spec_track >= 0 && pv->cam_spec_track < cl.allocated_client_slots && pv->viewentity != pv->cam_spec_track+1) { if (cl.inframes[cl.validsequence & UPDATE_MASK].playerstate[pv->cam_spec_track].messagenum == cl.validsequence) diff --git a/engine/gl/gl_bloom.c b/engine/gl/gl_bloom.c index 01f1189fd..6c10bcc0b 100644 --- a/engine/gl/gl_bloom.c +++ b/engine/gl/gl_bloom.c @@ -115,15 +115,8 @@ static void R_SetupBloomTextures(int w, int h) { sprintf(name, "***bloom*%c*%i***", 'a'+i, j); TEXASSIGN(pingtex[i][j], Image_CreateTexture(name, NULL, IF_CLAMP|IF_NOMIPMAP|IF_NOPICMIP|IF_LINEAR)); - qglGenTextures(1, &pingtex[i][j]->num); } - GL_MTBind(0, GL_TEXTURE_2D, pingtex[i][j]); - qglTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, texwidth[j], texheight[j], 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); - - qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + Image_Upload(pingtex[i][j], TF_RGBA32, NULL, NULL, texwidth[j], texheight[j], IF_CLAMP|IF_NOMIPMAP|IF_NOPICMIP|IF_LINEAR); } }