mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +00:00
- 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:
parent
ba01f00d7c
commit
a39f5bb8f7
9 changed files with 46 additions and 23 deletions
|
@ -1,4 +1,12 @@
|
||||||
May 17, 2006
|
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:
|
- Texture animation improvements:
|
||||||
* Animations are now millisecond-accurate, so delays in ANIMDEFS can have
|
* Animations are now millisecond-accurate, so delays in ANIMDEFS can have
|
||||||
fractional parts.
|
fractional parts.
|
||||||
|
|
|
@ -121,7 +121,7 @@ TAutoGrowArray<SDWORD> ACS_GlobalArrays[NUM_GLOBALVARS];
|
||||||
extern bool netdemo;
|
extern bool netdemo;
|
||||||
extern FString BackupSaveName;
|
extern FString BackupSaveName;
|
||||||
|
|
||||||
BOOL savegamerestore;
|
bool savegamerestore;
|
||||||
|
|
||||||
extern int mousex, mousey;
|
extern int mousex, mousey;
|
||||||
extern bool sendpause, sendsave, sendturn180, SendLand;
|
extern bool sendpause, sendsave, sendturn180, SendLand;
|
||||||
|
@ -1949,6 +1949,7 @@ void G_StartTravel ()
|
||||||
if (players[i].health > 0)
|
if (players[i].health > 0)
|
||||||
{
|
{
|
||||||
pawn->UnlinkFromWorld ();
|
pawn->UnlinkFromWorld ();
|
||||||
|
P_DelSector_List ();
|
||||||
pawn->RemoveFromHash ();
|
pawn->RemoveFromHash ();
|
||||||
pawn->ChangeStatNum (STAT_TRAVELLING);
|
pawn->ChangeStatNum (STAT_TRAVELLING);
|
||||||
|
|
||||||
|
@ -1956,6 +1957,7 @@ void G_StartTravel ()
|
||||||
{
|
{
|
||||||
inv->ChangeStatNum (STAT_TRAVELLING);
|
inv->ChangeStatNum (STAT_TRAVELLING);
|
||||||
inv->UnlinkFromWorld ();
|
inv->UnlinkFromWorld ();
|
||||||
|
P_DelSector_List ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,7 +282,7 @@ extern SDWORD ACS_GlobalVars[NUM_GLOBALVARS];
|
||||||
extern TAutoGrowArray<SDWORD> ACS_WorldArrays[NUM_WORLDVARS];
|
extern TAutoGrowArray<SDWORD> ACS_WorldArrays[NUM_WORLDVARS];
|
||||||
extern TAutoGrowArray<SDWORD> ACS_GlobalArrays[NUM_GLOBALVARS];
|
extern TAutoGrowArray<SDWORD> ACS_GlobalArrays[NUM_GLOBALVARS];
|
||||||
|
|
||||||
extern BOOL savegamerestore;
|
extern bool savegamerestore;
|
||||||
|
|
||||||
// mapname will be changed if it is a valid warptrans
|
// mapname will be changed if it is a valid warptrans
|
||||||
bool CheckWarpTransMap (char mapname[9], bool substitute);
|
bool CheckWarpTransMap (char mapname[9], bool substitute);
|
||||||
|
|
|
@ -41,6 +41,10 @@ void DLightningThinker::Serialize (FArchive &arc)
|
||||||
|
|
||||||
if (arc.IsLoading ())
|
if (arc.IsLoading ())
|
||||||
{
|
{
|
||||||
|
if (LightningLightLevels != NULL)
|
||||||
|
{
|
||||||
|
delete[] LightningLightLevels;
|
||||||
|
}
|
||||||
LightningLightLevels = new BYTE[numsectors + (numsectors+7)/8];
|
LightningLightLevels = new BYTE[numsectors + (numsectors+7)/8];
|
||||||
}
|
}
|
||||||
lights = LightningLightLevels;
|
lights = LightningLightLevels;
|
||||||
|
|
|
@ -827,7 +827,7 @@ void M_NotifyNewSave (const char *file, const char *title, bool okForQuicksave)
|
||||||
{
|
{
|
||||||
node = new FSaveGameNode;
|
node = new FSaveGameNode;
|
||||||
strcpy (node->Title, title);
|
strcpy (node->Title, title);
|
||||||
node->Filename = copystring (file);
|
node->Filename = file;
|
||||||
node->bOldVersion = false;
|
node->bOldVersion = false;
|
||||||
node->bMissingWads = false;
|
node->bMissingWads = false;
|
||||||
M_InsertSaveNode (node);
|
M_InsertSaveNode (node);
|
||||||
|
|
|
@ -316,6 +316,7 @@ extern sector_t *CameraSector;
|
||||||
// [RH] Means of death
|
// [RH] Means of death
|
||||||
void P_RadiusAttack (AActor *spot, AActor *source, int damage, int distance, int damageType, bool hurtSelf, bool thrustless=false);
|
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_DelSeclist(msecnode_t *); // phares 3/16/98
|
||||||
void P_CreateSecNodeList(AActor*,fixed_t,fixed_t); // phares 3/14/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
|
int P_GetMoveFactor(const AActor *mo, int *frictionp); // phares 3/6/98
|
||||||
|
|
|
@ -4387,6 +4387,23 @@ msecnode_t *P_DelSecnode (msecnode_t *node)
|
||||||
return NULL;
|
return NULL;
|
||||||
} // phares 3/13/98
|
} // 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
|
// P_DelSeclist
|
||||||
|
|
|
@ -3223,11 +3223,7 @@ void AActor::Destroy ()
|
||||||
flags |= MF_NOSECTOR|MF_NOBLOCKMAP;
|
flags |= MF_NOSECTOR|MF_NOBLOCKMAP;
|
||||||
|
|
||||||
// Delete all nodes on the current sector_list phares 3/16/98
|
// Delete all nodes on the current sector_list phares 3/16/98
|
||||||
if (sector_list)
|
P_DelSector_List();
|
||||||
{
|
|
||||||
P_DelSeclist (sector_list);
|
|
||||||
sector_list = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// stop any playing sound
|
// stop any playing sound
|
||||||
S_RelinkSound (this, NULL);
|
S_RelinkSound (this, NULL);
|
||||||
|
|
|
@ -2926,12 +2926,6 @@ void P_FreeLevelData ()
|
||||||
delete[] PolyBlockMap;
|
delete[] PolyBlockMap;
|
||||||
PolyBlockMap = NULL;
|
PolyBlockMap = NULL;
|
||||||
}
|
}
|
||||||
po_NumPolyobjs = 0;
|
|
||||||
if (polyobjs != NULL)
|
|
||||||
{
|
|
||||||
delete[] polyobjs;
|
|
||||||
polyobjs = NULL;
|
|
||||||
}
|
|
||||||
if (rejectmatrix != NULL)
|
if (rejectmatrix != NULL)
|
||||||
{
|
{
|
||||||
delete[] rejectmatrix;
|
delete[] rejectmatrix;
|
||||||
|
@ -2972,6 +2966,7 @@ void P_FreeLevelData ()
|
||||||
delete[] polyobjs;
|
delete[] polyobjs;
|
||||||
polyobjs = NULL;
|
polyobjs = NULL;
|
||||||
}
|
}
|
||||||
|
po_NumPolyobjs = 0;
|
||||||
if (zones != NULL)
|
if (zones != NULL)
|
||||||
{
|
{
|
||||||
delete[] zones;
|
delete[] zones;
|
||||||
|
|
Loading…
Reference in a new issue