mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Store staticlights in savegames.
git-svn-id: https://svn.eduke32.com/eduke32@1308 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
26a9a58af3
commit
c920872753
1 changed files with 5 additions and 0 deletions
|
@ -240,6 +240,9 @@ int32_t G_LoadPlayer(int32_t spot)
|
|||
if (kdfread(§or[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
|
||||
|
|
Loading…
Reference in a new issue