mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- Fixed: The game would crash after informing you of a duplicate class registration
because PClass::CreateDerivedClass() did not initialize everything before calling InsertIntoHash(). - Fixed: Forcefully removing a weapon from a player's inventory would not reset the player's refire counter. - Fixed: FreeKeySections() was called before M_SaveDefaults() during shutdown, so all custom keys would go to a "(null)" section instead of their intended section. SVN r248 (trunk)
This commit is contained in:
parent
18af8a57cf
commit
56427d1b1c
5 changed files with 19 additions and 8 deletions
|
@ -1,3 +1,13 @@
|
|||
July 12, 2006
|
||||
- Fixed: The game would crash after informing you of a duplicate class registration
|
||||
because PClass::CreateDerivedClass() did not initialize everything before calling
|
||||
InsertIntoHash().
|
||||
- Fixed: Forcefully removing a weapon from a player's inventory would not reset
|
||||
the player's refire counter.
|
||||
- Fixed: FreeKeySections() was called before M_SaveDefaults() during shutdown,
|
||||
so all custom keys would go to a "(null)" section instead of their intended
|
||||
section.
|
||||
|
||||
July 11, 2006
|
||||
- Restored the previous level flag values to avoid needlessly breaking some
|
||||
savegames at this point in time.
|
||||
|
|
|
@ -187,7 +187,6 @@ PClass *PClass::CreateDerivedClass (FName name, unsigned int size)
|
|||
type->Pointers = NULL;
|
||||
type->ConstructNative = ConstructNative;
|
||||
type->ClassIndex = m_Types.Push (type);
|
||||
type->InsertIntoHash();
|
||||
type->Meta = Meta;
|
||||
type->Defaults = new BYTE[size];
|
||||
memcpy (type->Defaults, Defaults, Size);
|
||||
|
@ -197,6 +196,8 @@ PClass *PClass::CreateDerivedClass (FName name, unsigned int size)
|
|||
}
|
||||
type->FlatPointers = NULL;
|
||||
type->bRuntimeClass = true;
|
||||
type->ActorInfo = NULL;
|
||||
type->InsertIntoHash();
|
||||
|
||||
// If this class has an actor info, then any classes derived from it
|
||||
// also need an actor info.
|
||||
|
@ -212,10 +213,6 @@ PClass *PClass::CreateDerivedClass (FName name, unsigned int size)
|
|||
info->Replacement = NULL;
|
||||
m_RuntimeActors.Push (type);
|
||||
}
|
||||
else
|
||||
{
|
||||
type->ActorInfo = NULL;
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,6 +81,8 @@ CVAR(Bool, screenshot_quiet, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
|||
CVAR(String, screenshot_type, "png", CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||
CVAR(String, screenshot_dir, "", CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
|
||||
|
||||
extern void FreeKeySections();
|
||||
|
||||
static long ParseCommandLine (const char *args, int *argc, char **argv);
|
||||
|
||||
//
|
||||
|
@ -358,6 +360,7 @@ void M_LoadDefaults ()
|
|||
{
|
||||
GameConfig = new FGameConfigFile;
|
||||
GameConfig->DoGlobalSetup ();
|
||||
atterm (FreeKeySections);
|
||||
atterm (M_SaveDefaults);
|
||||
}
|
||||
|
||||
|
|
|
@ -2938,6 +2938,7 @@ void M_SaveCustomKeys (FConfigFile *config, char *section, char *subsection)
|
|||
|
||||
if (item->type == whitetext)
|
||||
{
|
||||
assert (item->e.command != NULL);
|
||||
sprintf (subsection, "%s.Bindings", item->e.command);
|
||||
M_DoSaveKeys (config, section, (int)i, false);
|
||||
sprintf (subsection, "%s.DoubleBindings", item->e.command);
|
||||
|
@ -2952,7 +2953,7 @@ void M_SaveCustomKeys (FConfigFile *config, char *section, char *subsection)
|
|||
|
||||
static int AddKeySpot;
|
||||
|
||||
static void FreeKeySections()
|
||||
void FreeKeySections()
|
||||
{
|
||||
const unsigned int numStdControls = countof(ControlsItems);
|
||||
unsigned int i;
|
||||
|
@ -3008,7 +3009,6 @@ CCMD (addkeysection)
|
|||
}
|
||||
}
|
||||
|
||||
atterm (FreeKeySections);
|
||||
if (i == last)
|
||||
{ // Add the new section
|
||||
// Limit the ini name to 32 chars
|
||||
|
|
|
@ -330,9 +330,10 @@ void APlayerPawn::RemoveInventory (AInventory *item)
|
|||
}
|
||||
if (item == player->ReadyWeapon)
|
||||
{
|
||||
// If the current weapon is removed, pick a new one.
|
||||
// If the current weapon is removed, clear the refire counter and pick a new one.
|
||||
pickWeap = true;
|
||||
player->ReadyWeapon = NULL;
|
||||
player->refire = 0;
|
||||
}
|
||||
}
|
||||
Super::RemoveInventory (item);
|
||||
|
|
Loading…
Reference in a new issue