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
This commit is contained in:
helixhorned 2011-10-03 17:43:16 +00:00
parent f08610b6c8
commit 6cfdc2b376
4 changed files with 11 additions and 5 deletions

View file

@ -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();
}

View file

@ -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)

View file

@ -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)):