From 7f649df33e8db81ba1bfc8ad770c3ed09f5ee01b Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 17 Apr 2022 19:46:46 +0000 Subject: [PATCH] Fix up d3d renderers. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6231 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/d3d/d3d11_backend.c | 48 +++++++++++++++++++------------------- engine/d3d/d3d_backend.c | 48 +++++++++++++++++++------------------- engine/d3d/vid_d3d.c | 2 +- engine/d3d/vid_d3d11.c | 2 +- 4 files changed, 50 insertions(+), 50 deletions(-) diff --git a/engine/d3d/d3d11_backend.c b/engine/d3d/d3d11_backend.c index db75e0d7b..656bb3801 100644 --- a/engine/d3d/d3d11_backend.c +++ b/engine/d3d/d3d11_backend.c @@ -2912,46 +2912,46 @@ static void BE_RotateForEntity (const entity_t *e, const model_t *mod) if (e->flags & RF_WEAPONMODELNOBOB) { - vm[0] = vpn[0]; - vm[1] = vpn[1]; - vm[2] = vpn[2]; + vm[0] = r_refdef.weaponmatrix[0][0]; + vm[1] = r_refdef.weaponmatrix[0][1]; + vm[2] = r_refdef.weaponmatrix[0][2]; vm[3] = 0; - vm[4] = -vright[0]; - vm[5] = -vright[1]; - vm[6] = -vright[2]; + vm[4] = r_refdef.weaponmatrix[1][0]; + vm[5] = r_refdef.weaponmatrix[1][1]; + vm[6] = r_refdef.weaponmatrix[1][2]; vm[7] = 0; - vm[8] = vup[0]; - vm[9] = vup[1]; - vm[10] = vup[2]; + vm[8] = r_refdef.weaponmatrix[2][0]; + vm[9] = r_refdef.weaponmatrix[2][1]; + vm[10] = r_refdef.weaponmatrix[2][2]; vm[11] = 0; - vm[12] = r_refdef.vieworg[0]; - vm[13] = r_refdef.vieworg[1]; - vm[14] = r_refdef.vieworg[2]; + vm[12] = r_refdef.weaponmatrix[3][0]; + vm[13] = r_refdef.weaponmatrix[3][1]; + vm[14] = r_refdef.weaponmatrix[3][2]; vm[15] = 1; } else { - vm[0] = r_refdef.playerview->vw_axis[0][0]; - vm[1] = r_refdef.playerview->vw_axis[0][1]; - vm[2] = r_refdef.playerview->vw_axis[0][2]; + vm[0] = r_refdef.weaponmatrix_bob[0][0]; + vm[1] = r_refdef.weaponmatrix_bob[0][1]; + vm[2] = r_refdef.weaponmatrix_bob[0][2]; vm[3] = 0; - vm[4] = r_refdef.playerview->vw_axis[1][0]; - vm[5] = r_refdef.playerview->vw_axis[1][1]; - vm[6] = r_refdef.playerview->vw_axis[1][2]; + vm[4] = r_refdef.weaponmatrix_bob[1][0]; + vm[5] = r_refdef.weaponmatrix_bob[1][1]; + vm[6] = r_refdef.weaponmatrix_bob[1][2]; vm[7] = 0; - vm[8] = r_refdef.playerview->vw_axis[2][0]; - vm[9] = r_refdef.playerview->vw_axis[2][1]; - vm[10] = r_refdef.playerview->vw_axis[2][2]; + vm[8] = r_refdef.weaponmatrix_bob[2][0]; + vm[9] = r_refdef.weaponmatrix_bob[2][1]; + vm[10] = r_refdef.weaponmatrix_bob[2][2]; vm[11] = 0; - vm[12] = r_refdef.playerview->vw_origin[0]; - vm[13] = r_refdef.playerview->vw_origin[1]; - vm[14] = r_refdef.playerview->vw_origin[2]; + vm[12] = r_refdef.weaponmatrix_bob[3][0]; + vm[13] = r_refdef.weaponmatrix_bob[3][1]; + vm[14] = r_refdef.weaponmatrix_bob[3][2]; vm[15] = 1; } diff --git a/engine/d3d/d3d_backend.c b/engine/d3d/d3d_backend.c index b2aaeffb4..985c1c7d0 100644 --- a/engine/d3d/d3d_backend.c +++ b/engine/d3d/d3d_backend.c @@ -3455,46 +3455,46 @@ static void D3D9BE_RotateForEntity (const entity_t *e, const model_t *mod) if (e->flags & RF_WEAPONMODELNOBOB) { - vm[0] = vpn[0]; - vm[1] = vpn[1]; - vm[2] = vpn[2]; + vm[0] = r_refdef.weaponmatrix[0][0]; + vm[1] = r_refdef.weaponmatrix[0][1]; + vm[2] = r_refdef.weaponmatrix[0][2]; vm[3] = 0; - vm[4] = -vright[0]; - vm[5] = -vright[1]; - vm[6] = -vright[2]; + vm[4] = r_refdef.weaponmatrix[1][0]; + vm[5] = r_refdef.weaponmatrix[1][1]; + vm[6] = r_refdef.weaponmatrix[1][2]; vm[7] = 0; - vm[8] = vup[0]; - vm[9] = vup[1]; - vm[10] = vup[2]; + vm[8] = r_refdef.weaponmatrix[2][0]; + vm[9] = r_refdef.weaponmatrix[2][1]; + vm[10] = r_refdef.weaponmatrix[2][2]; vm[11] = 0; - vm[12] = r_refdef.vieworg[0]; - vm[13] = r_refdef.vieworg[1]; - vm[14] = r_refdef.vieworg[2]; + vm[12] = r_refdef.weaponmatrix[3][0]; + vm[13] = r_refdef.weaponmatrix[3][1]; + vm[14] = r_refdef.weaponmatrix[3][2]; vm[15] = 1; } else { - vm[0] = r_refdef.playerview->vw_axis[0][0]; - vm[1] = r_refdef.playerview->vw_axis[0][1]; - vm[2] = r_refdef.playerview->vw_axis[0][2]; + vm[0] = r_refdef.weaponmatrix_bob[0][0]; + vm[1] = r_refdef.weaponmatrix_bob[0][1]; + vm[2] = r_refdef.weaponmatrix_bob[0][2]; vm[3] = 0; - vm[4] = r_refdef.playerview->vw_axis[1][0]; - vm[5] = r_refdef.playerview->vw_axis[1][1]; - vm[6] = r_refdef.playerview->vw_axis[1][2]; + vm[4] = r_refdef.weaponmatrix_bob[1][0]; + vm[5] = r_refdef.weaponmatrix_bob[1][1]; + vm[6] = r_refdef.weaponmatrix_bob[1][2]; vm[7] = 0; - vm[8] = r_refdef.playerview->vw_axis[2][0]; - vm[9] = r_refdef.playerview->vw_axis[2][1]; - vm[10] = r_refdef.playerview->vw_axis[2][2]; + vm[8] = r_refdef.weaponmatrix_bob[2][0]; + vm[9] = r_refdef.weaponmatrix_bob[2][1]; + vm[10] = r_refdef.weaponmatrix_bob[2][2]; vm[11] = 0; - vm[12] = r_refdef.playerview->vw_origin[0]; - vm[13] = r_refdef.playerview->vw_origin[1]; - vm[14] = r_refdef.playerview->vw_origin[2]; + vm[12] = r_refdef.weaponmatrix_bob[3][0]; + vm[13] = r_refdef.weaponmatrix_bob[3][1]; + vm[14] = r_refdef.weaponmatrix_bob[3][2]; vm[15] = 1; } diff --git a/engine/d3d/vid_d3d.c b/engine/d3d/vid_d3d.c index 143851444..fe8977902 100644 --- a/engine/d3d/vid_d3d.c +++ b/engine/d3d/vid_d3d.c @@ -1094,7 +1094,7 @@ static qboolean (D3D9_SCR_UpdateScreen) (void) if (topmenu && topmenu->isopaque) nohud = true; #ifdef VM_CG - else if (CG_Refresh()) + else if (q3 && q3->cg.Redraw(cl.time)) nohud = true; #endif #ifdef CSQC_DAT diff --git a/engine/d3d/vid_d3d11.c b/engine/d3d/vid_d3d11.c index 071376a73..f8ee2e29b 100644 --- a/engine/d3d/vid_d3d11.c +++ b/engine/d3d/vid_d3d11.c @@ -1436,7 +1436,7 @@ static qboolean (D3D11_SCR_UpdateScreen) (void) if (topmenu && topmenu->isopaque) nohud = true; #ifdef VM_CG - else if (CG_Refresh()) + else if (q3 && q3->cg.Redraw(cl.time)) nohud = true; #endif #ifdef CSQC_DAT