mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-06-02 09:51:24 +00:00
- fixed: Trying to pick up an object of the Ammo base class caused a crash.
SVN r1804 (trunk)
This commit is contained in:
parent
74e3502185
commit
b07445d149
2 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
September 6, 2009 (Changes by Graf Zahl)
|
September 6, 2009 (Changes by Graf Zahl)
|
||||||
|
- fixed: Trying to pick up an object of the Ammo base class caused a crash.
|
||||||
- changed line_t's sidenum into sidedef pointers.
|
- changed line_t's sidenum into sidedef pointers.
|
||||||
- changed side_t's linenum into a linedef pointer.
|
- changed side_t's linenum into a linedef pointer.
|
||||||
- Added PinkSilver's SetActorVelocity code submission (with optimizations.)
|
- Added PinkSilver's SetActorVelocity code submission (with optimizations.)
|
||||||
|
|
|
@ -55,7 +55,7 @@ const PClass *AAmmo::GetParentAmmo () const
|
||||||
{
|
{
|
||||||
const PClass *type = GetClass ();
|
const PClass *type = GetClass ();
|
||||||
|
|
||||||
while (type->ParentClass != RUNTIME_CLASS(AAmmo))
|
while (type->ParentClass != RUNTIME_CLASS(AAmmo) && type->ParentClass != NULL)
|
||||||
{
|
{
|
||||||
type = type->ParentClass;
|
type = type->ParentClass;
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ AInventory *AAmmo::CreateCopy (AActor *other)
|
||||||
amount = FixedMul(amount, G_SkillProperty(SKILLP_AmmoFactor));
|
amount = FixedMul(amount, G_SkillProperty(SKILLP_AmmoFactor));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetClass()->ParentClass != RUNTIME_CLASS(AAmmo))
|
if (GetClass()->ParentClass != RUNTIME_CLASS(AAmmo) && GetClass() != RUNTIME_CLASS(AAmmo))
|
||||||
{
|
{
|
||||||
const PClass *type = GetParentAmmo();
|
const PClass *type = GetParentAmmo();
|
||||||
assert (type->ActorInfo != NULL);
|
assert (type->ActorInfo != NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue