From 6cfdc2b3768fb5ba7f3be3c4643156fc9db86d38 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Mon, 3 Oct 2011 17:43:16 +0000 Subject: [PATCH] Delete maphack lights when changing from Polymer to another renderer. This fixes a crash when loading a map afterwards. Tweak a few debugging messages and some whitespace. git-svn-id: https://svn.eduke32.com/eduke32@2068 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/engine.c | 3 ++- polymer/eduke32/build/src/mdsprite.c | 2 +- polymer/eduke32/source/jaudiolib/src/fx_man.c | 7 ++++++- polymer/eduke32/source/jaudiolib/src/multivoc.c | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 2a63e944b..1c188b4a3 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -457,7 +457,7 @@ void yax_update(int32_t resetstat) yax_getbunches(i, &cb, &fb); if (cb>=0) yax_setbunch(i, YAX_CEILING, bunchmap[cb]); - if (fb>=0) + if (fb>=0) yax_setbunch(i, YAX_FLOOR, bunchmap[fb]); } } @@ -15831,6 +15831,7 @@ int32_t setrendermode(int32_t renderer) } else if (rendmode==4) // going from Polymer to another renderer { + delete_maphack_lights(); G_Polymer_UnInit(); polymer_uninit(); } diff --git a/polymer/eduke32/build/src/mdsprite.c b/polymer/eduke32/build/src/mdsprite.c index f318fd6f5..0cf85623b 100644 --- a/polymer/eduke32/build/src/mdsprite.c +++ b/polymer/eduke32/build/src/mdsprite.c @@ -1995,7 +1995,7 @@ static int32_t md3draw(md3model_t *m, spritetype *tspr) m->cframe < 0 || m->cframe >= m->numframes || m->nframe < 0 || m->nframe >= m->numframes) { - OSD_Printf("Model frame out of bounds!\n"); + OSD_Printf("%s: Model frame out of bounds!\n", m->head.nam); if (m->interpol < 0) m->interpol = 0; if (m->interpol > 1) diff --git a/polymer/eduke32/source/jaudiolib/src/fx_man.c b/polymer/eduke32/source/jaudiolib/src/fx_man.c index 66909bbec..b4c74cdce 100644 --- a/polymer/eduke32/source/jaudiolib/src/fx_man.c +++ b/polymer/eduke32/source/jaudiolib/src/fx_man.c @@ -977,7 +977,12 @@ int32_t FX_PlayLoopedAuto(char *ptr, uint32_t length, int32_t loopstart, int32_t uint32_t callbackval) { int32_t handle = -1; - printf("FX_PlayLoopedAuto %X\n",*(int32_t *)ptr); + { + int32_t fmtstr[2]; + fmtstr[0] = *(int32_t *)ptr; + ((char *)fmtstr)[4] = 0; + printf("FX_PlayLoopedAuto %s\n",(char *)fmtstr); + } switch (*(int32_t *)ptr) { case LITTLE32('C'+('r'<<8)+('e'<<16)+('a'<<24)): diff --git a/polymer/eduke32/source/jaudiolib/src/multivoc.c b/polymer/eduke32/source/jaudiolib/src/multivoc.c index bf1ec3e77..c32f2e58e 100644 --- a/polymer/eduke32/source/jaudiolib/src/multivoc.c +++ b/polymer/eduke32/source/jaudiolib/src/multivoc.c @@ -446,8 +446,8 @@ void MV_ServiceVoc(void) if (iter > MV_MaxVoices && MV_Printf) MV_Printf("more iterations than voices! iter: %d\n",iter); - if (voice->Paused) - continue; + if (voice->Paused) + continue; MV_BufferEmpty[ MV_MixPage ] = FALSE;