mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 05:01:41 +00:00
- Fixed: Textures with dimensions <= 0 are invalid and should be treated as NULL
textures. They also must be set to dimensions other than (0,0) to avoid division by zero errors. - Fixed: Random spawners did not handle the MF_DROPPED flag. SVN r1602 (trunk)
This commit is contained in:
parent
0c4c90ac89
commit
8034b0558e
3 changed files with 17 additions and 2 deletions
|
@ -8,6 +8,10 @@
|
|||
mouse input would be frozen until the mouse was ungrabbed again.
|
||||
|
||||
May 23, 2009 (Changes by Graf Zahl)
|
||||
- Fixed: Textures with dimensions <= 0 are invalid and should be treated as NULL
|
||||
textures. They also must be set to dimensions other than (0,0) to avoid division
|
||||
by zero errors.
|
||||
- Fixed: Random spawners did not handle the MF_DROPPED flag.
|
||||
- Fixed: When setting up a deep water sector with Transfer_Heights the floorclip
|
||||
information of all actors in the sector needs to be updated.
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ class ARandomSpawner : public AActor
|
|||
newmobj->target = target;
|
||||
newmobj->tracer = tracer;
|
||||
newmobj->CopyFriendliness(this, false);
|
||||
if (!(flags & MF_DROPPED)) newmobj->flags &= ~MF_DROPPED;
|
||||
// Special1 is used to count how many recursions we're in.
|
||||
if (newmobj->IsKindOf(PClass::FindClass("RandomSpawner")))
|
||||
newmobj->special1 = ++special1;
|
||||
|
|
|
@ -1146,7 +1146,7 @@ FMultiPatchTexture::FMultiPatchTexture (FScanner &sc, int usetype)
|
|||
sc.MustGetNumber();
|
||||
Height = sc.Number;
|
||||
UseType = usetype;
|
||||
|
||||
|
||||
if (sc.CheckString("{"))
|
||||
{
|
||||
while (!sc.CheckString("}"))
|
||||
|
@ -1200,7 +1200,7 @@ FMultiPatchTexture::FMultiPatchTexture (FScanner &sc, int usetype)
|
|||
Parts = new TexPart[NumParts];
|
||||
memcpy(Parts, &parts[0], NumParts * sizeof(*Parts));
|
||||
|
||||
CalcBitSize ();
|
||||
//CalcBitSize ();
|
||||
|
||||
// If this texture is just a wrapper around a single patch, we can simply
|
||||
// forward GetPixels() and GetColumn() calls to that patch.
|
||||
|
@ -1216,6 +1216,16 @@ FMultiPatchTexture::FMultiPatchTexture (FScanner &sc, int usetype)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Width <= 0 || Height <= 0)
|
||||
{
|
||||
UseType = FTexture::TEX_Null;
|
||||
Printf("Texture %s has invalid dimensions (%d, %d)\n", Name, Width, Height);
|
||||
Width = Height = 1;
|
||||
}
|
||||
CalcBitSize ();
|
||||
|
||||
|
||||
sc.SetCMode(false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue