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