mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
Use a vec3_t instead of separate vars to hold temporary position data in G_HandleMirror()
git-svn-id: https://svn.eduke32.com/eduke32@8029 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a8f621a989
commit
b9e61fcb7f
1 changed files with 9 additions and 12 deletions
|
@ -644,24 +644,21 @@ void G_HandleMirror(int32_t x, int32_t y, int32_t z, fix16_t a, fix16_t q16horiz
|
|||
g_visibility = (j>>1) + (j>>2);
|
||||
|
||||
//backup original camera position
|
||||
int32_t origCamX = CAMERA(pos.x);
|
||||
int32_t origCamY = CAMERA(pos.y);
|
||||
int32_t origCamZ = CAMERA(pos.z);
|
||||
auto origCam = CAMERA(pos);
|
||||
fix16_t origCamq16ang = CAMERA(q16ang);
|
||||
fix16_t origCamq16horiz = CAMERA(q16horiz);
|
||||
|
||||
//set the camera inside the mirror facing out
|
||||
CAMERA(pos.x) = tposx;
|
||||
CAMERA(pos.y) = tposy;
|
||||
CAMERA(pos.z) = z;
|
||||
CAMERA(pos) = { tposx, tposy, z };
|
||||
CAMERA(q16ang) = tang;
|
||||
CAMERA(q16horiz) = q16horiz;
|
||||
|
||||
display_mirror = 1;
|
||||
VM_OnEventWithReturn(EVENT_DISPLAYROOMS, g_player[0].ps->i, 0, 0);
|
||||
display_mirror = 0;
|
||||
|
||||
//reset the camera position
|
||||
CAMERA(pos.x) = origCamX;
|
||||
CAMERA(pos.y) = origCamY;
|
||||
CAMERA(pos.z) = origCamZ;
|
||||
CAMERA(pos) = origCam;
|
||||
CAMERA(q16ang) = origCamq16ang;
|
||||
CAMERA(q16horiz) = origCamq16horiz;
|
||||
|
||||
|
|
Loading…
Reference in a new issue