- Fixed: M_NotifyNewSave() needlessly created a copy of the filename.

- Fixed: Any touching_sectorlists for actors unlinked in G_StartTravel() were
  lost forever.
- Fixed: DLightningThinker::Serialize() did not delete the old
  LightningLightLevels array when loading from an archive.
- Fixed: Although I moved the correct polyobject freeing code into
  P_FreeLevelData(), I left the old wrong code there too, which just deleted
  the array without deleting anything hanging off of it.


SVN r127 (trunk)
This commit is contained in:
Randy Heit 2006-05-18 04:25:26 +00:00
parent ba01f00d7c
commit a39f5bb8f7
9 changed files with 46 additions and 23 deletions

View file

@ -1,4 +1,12 @@
May 17, 2006
- Fixed: M_NotifyNewSave() needlessly created a copy of the filename.
- Fixed: Any touching_sectorlists for actors unlinked in G_StartTravel() were
lost forever.
- Fixed: DLightningThinker::Serialize() did not delete the old
LightningLightLevels array when loading from an archive.
- Fixed: Although I moved the correct polyobject freeing code into
P_FreeLevelData(), I left the old wrong code there too, which just deleted
the array without deleting anything hanging off of it.
- Texture animation improvements:
* Animations are now millisecond-accurate, so delays in ANIMDEFS can have
fractional parts.

View file

@ -121,7 +121,7 @@ TAutoGrowArray<SDWORD> ACS_GlobalArrays[NUM_GLOBALVARS];
extern bool netdemo;
extern FString BackupSaveName;
BOOL savegamerestore;
bool savegamerestore;
extern int mousex, mousey;
extern bool sendpause, sendsave, sendturn180, SendLand;
@ -1949,6 +1949,7 @@ void G_StartTravel ()
if (players[i].health > 0)
{
pawn->UnlinkFromWorld ();
P_DelSector_List ();
pawn->RemoveFromHash ();
pawn->ChangeStatNum (STAT_TRAVELLING);
@ -1956,6 +1957,7 @@ void G_StartTravel ()
{
inv->ChangeStatNum (STAT_TRAVELLING);
inv->UnlinkFromWorld ();
P_DelSector_List ();
}
}
}

View file

@ -282,7 +282,7 @@ extern SDWORD ACS_GlobalVars[NUM_GLOBALVARS];
extern TAutoGrowArray<SDWORD> ACS_WorldArrays[NUM_WORLDVARS];
extern TAutoGrowArray<SDWORD> ACS_GlobalArrays[NUM_GLOBALVARS];
extern BOOL savegamerestore;
extern bool savegamerestore;
// mapname will be changed if it is a valid warptrans
bool CheckWarpTransMap (char mapname[9], bool substitute);

View file

@ -41,6 +41,10 @@ void DLightningThinker::Serialize (FArchive &arc)
if (arc.IsLoading ())
{
if (LightningLightLevels != NULL)
{
delete[] LightningLightLevels;
}
LightningLightLevels = new BYTE[numsectors + (numsectors+7)/8];
}
lights = LightningLightLevels;

View file

@ -827,7 +827,7 @@ void M_NotifyNewSave (const char *file, const char *title, bool okForQuicksave)
{
node = new FSaveGameNode;
strcpy (node->Title, title);
node->Filename = copystring (file);
node->Filename = file;
node->bOldVersion = false;
node->bMissingWads = false;
M_InsertSaveNode (node);

View file

@ -316,6 +316,7 @@ extern sector_t *CameraSector;
// [RH] Means of death
void P_RadiusAttack (AActor *spot, AActor *source, int damage, int distance, int damageType, bool hurtSelf, bool thrustless=false);
void P_DelSector_List();
void P_DelSeclist(msecnode_t *); // phares 3/16/98
void P_CreateSecNodeList(AActor*,fixed_t,fixed_t); // phares 3/14/98
int P_GetMoveFactor(const AActor *mo, int *frictionp); // phares 3/6/98

View file

@ -4387,6 +4387,23 @@ msecnode_t *P_DelSecnode (msecnode_t *node)
return NULL;
} // phares 3/13/98
//=============================================================================
//
// P_DelSector_List
//
// Deletes the sector_list and NULLs it.
//
//=============================================================================
void P_DelSector_List ()
{
if (sector_list != NULL)
{
P_DelSeclist (sector_list);
sector_list = NULL;
}
}
//=============================================================================
//
// P_DelSeclist

View file

@ -3223,11 +3223,7 @@ void AActor::Destroy ()
flags |= MF_NOSECTOR|MF_NOBLOCKMAP;
// Delete all nodes on the current sector_list phares 3/16/98
if (sector_list)
{
P_DelSeclist (sector_list);
sector_list = NULL;
}
P_DelSector_List();
// stop any playing sound
S_RelinkSound (this, NULL);

View file

@ -2926,12 +2926,6 @@ void P_FreeLevelData ()
delete[] PolyBlockMap;
PolyBlockMap = NULL;
}
po_NumPolyobjs = 0;
if (polyobjs != NULL)
{
delete[] polyobjs;
polyobjs = NULL;
}
if (rejectmatrix != NULL)
{
delete[] rejectmatrix;
@ -2972,6 +2966,7 @@ void P_FreeLevelData ()
delete[] polyobjs;
polyobjs = NULL;
}
po_NumPolyobjs = 0;
if (zones != NULL)
{
delete[] zones;