From 46aa3d439a5abe520e9ee5f990c19954221f481c Mon Sep 17 00:00:00 2001 From: plagman Date: Fri, 13 Feb 2009 12:30:08 +0000 Subject: [PATCH] Propagate build/polymost locals so that polymost_dorotatesprite can correctly draw HUD models on top of polymer. git-svn-id: https://svn.eduke32.com/eduke32@1224 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymer.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index 9a309154c..f7b2aabac 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -557,13 +557,22 @@ void polymer_drawrooms(int32_t daposx, int32_t daposy, int32_t da mirrorfrom[0] = -3; // no mirror polymer_displayrooms(dacursectnum); - viewangle = daang; curmodelviewmatrix = rootmodelviewmatrix; - cosglobalang = sintable[(viewangle+512)&2047]; - singlobalang = sintable[viewangle&2047]; + + // build globals used by rotatesprite + viewangle = daang; + globalang = (daang&2047); + cosglobalang = sintable[(globalang+512)&2047]; + singlobalang = sintable[globalang&2047]; cosviewingrangeglobalang = mulscale16(cosglobalang,viewingrange); sinviewingrangeglobalang = mulscale16(singlobalang,viewingrange); + // polymost globals used by polymost_dorotatesprite + gcosang = ((double)cosglobalang)/262144.0; + gsinang = ((double)singlobalang)/262144.0; + gcosang2 = gcosang*((double)viewingrange)/65536.0; + gsinang2 = gsinang*((double)viewingrange)/65536.0; + if (pr_verbosity >= 3) OSD_Printf("PR : Rooms drawn.\n"); }