Write held block matrix straight into Gfx_View instead of copying from temp matrix

This commit is contained in:
UnknownShadow200 2020-02-20 12:57:07 +11:00
parent eb6a014f86
commit a3ffdfb284

View File

@ -52,12 +52,11 @@ static void HeldBlockRenderer_RenderModel(void) {
static void HeldBlockRenderer_SetMatrix(void) {
struct Entity* p = &LocalPlayer_Instance.Base;
struct Matrix m, lookAt;
struct Matrix lookAt;
Vec3 eye = { 0,0,0 }; eye.Y = Entity_GetEyeHeight(p);
Matrix_Translate(&lookAt, -eye.X, -eye.Y, -eye.Z);
Matrix_Mul(&m, &lookAt, &Camera.TiltM);
Gfx.View = m;
Matrix_Mul(&Gfx.View, &lookAt, &Camera.TiltM);
}
static void HeldBlockRenderer_ResetHeldState(void) {