Store staticlights in savegames.

git-svn-id: https://svn.eduke32.com/eduke32@1308 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2009-04-12 17:22:24 +00:00
parent 26a9a58af3
commit c920872753
1 changed files with 5 additions and 0 deletions

View File

@ -240,6 +240,9 @@ int32_t G_LoadPlayer(int32_t spot)
if (kdfread(&sector[0],sizeof(sectortype),MAXSECTORS,fil) != MAXSECTORS) goto corrupt;
if (kdfread(&sprite[0],sizeof(spritetype),MAXSPRITES,fil) != MAXSPRITES) goto corrupt;
if (kdfread(&spriteext[0],sizeof(spriteext_t),MAXSPRITES,fil) != MAXSPRITES) goto corrupt;
if (kdfread(&staticlightcount,sizeof(int32_t),1,fil) != 1) goto corrupt;
if (kdfread(&staticlights[0],sizeof(_prlight),PR_MAXLIGHTS,fil) != PR_MAXLIGHTS) goto corrupt;
#if defined(POLYMOST) && defined(USE_OPENGL)
for (i=0; i<MAXSPRITES; i++)
if (spriteext[i].mdanimtims)
@ -678,6 +681,8 @@ int32_t G_SavePlayer(int32_t spot)
}
#endif
dfwrite(&spriteext[0],sizeof(spriteext_t),MAXSPRITES,fil);
dfwrite(&staticlightcount,sizeof(int32_t),1,fil);
dfwrite(&staticlights[0],sizeof(_prlight),PR_MAXLIGHTS,fil);
#if defined(POLYMOST) && defined(USE_OPENGL)
for (i=0; i<MAXSPRITES; i++)if (spriteext[i].mdanimtims)spriteext[i].mdanimtims+=mdtims;
#endif