mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- fixed: Textures marked as complex must not redirect to the base patch.
- fixed: Alpha for composite textures was not applied. - fixed: The CentaurMash didn't inherit from the Centaur. - added some NULL pointer checks to the sound code. SVN r1075 (trunk)
This commit is contained in:
parent
5dc42121b7
commit
6d9b897681
4 changed files with 23 additions and 14 deletions
|
@ -1,3 +1,9 @@
|
|||
July 20, 2008 (Changes by Graf Zahl)
|
||||
- fixed: Textures marked as complex must not redirect to the base patch.
|
||||
- fixed: Alpha for composite textures was not applied.
|
||||
- fixed: The CentaurMash didn't inherit from the Centaur.
|
||||
- added some NULL pointer checks to the sound code.
|
||||
|
||||
July 19, 2008 (Changes by Graf Zahl)
|
||||
- Fixed: When Heretic's Mace was replaced by a non-child class A_SpawnMace still
|
||||
treated it as a mace and wrote into some undefined memory.
|
||||
|
|
|
@ -647,9 +647,12 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector,
|
|||
break;
|
||||
|
||||
case SOURCE_Actor:
|
||||
x = actor->x;
|
||||
y = actor->z;
|
||||
z = actor->y;
|
||||
if (actor != NULL)
|
||||
{
|
||||
x = actor->x;
|
||||
y = actor->z;
|
||||
z = actor->y;
|
||||
}
|
||||
break;
|
||||
|
||||
case SOURCE_Sector:
|
||||
|
@ -691,9 +694,12 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector,
|
|||
// Only actors maintain velocity information.
|
||||
if (type == SOURCE_Actor)
|
||||
{
|
||||
vel->X = FIXED2FLOAT(actor->momx) * TICRATE;
|
||||
vel->Y = FIXED2FLOAT(actor->momz) * TICRATE;
|
||||
vel->Z = FIXED2FLOAT(actor->momy) * TICRATE;
|
||||
if (actor != NULL)
|
||||
{
|
||||
vel->X = FIXED2FLOAT(actor->momx) * TICRATE;
|
||||
vel->Y = FIXED2FLOAT(actor->momz) * TICRATE;
|
||||
vel->Z = FIXED2FLOAT(actor->momy) * TICRATE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1083,7 +1089,7 @@ void S_RestartSound(FSoundChan *chan)
|
|||
// be set.
|
||||
if (ochan->SourceType == SOURCE_Actor)
|
||||
{
|
||||
ochan->Actor->SoundChans |= 1 << ochan->EntChannel;
|
||||
if (ochan->Actor != NULL) ochan->Actor->SoundChans |= 1 << ochan->EntChannel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -574,7 +574,6 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rota
|
|||
if (b.a == 0 && b.r != BLEND_NONE)
|
||||
{
|
||||
info.blend = EBlend(b.r);
|
||||
inf = &info;
|
||||
}
|
||||
else if (b.a != 0)
|
||||
{
|
||||
|
@ -584,7 +583,6 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rota
|
|||
info.blendcolor[1] = b.g * FRACUNIT / 255;
|
||||
info.blendcolor[2] = b.b * FRACUNIT / 255;
|
||||
info.blend = BLEND_MODULATE;
|
||||
inf = &info;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -594,10 +592,9 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rota
|
|||
info.blendcolor[2] = b.b * (FRACUNIT-info.blendcolor[3]);
|
||||
|
||||
info.blend = BLEND_OVERLAY;
|
||||
inf = &info;
|
||||
}
|
||||
}
|
||||
ret = Parts[i].Texture->CopyTrueColorPixels(bmp, x+Parts[i].OriginX, y+Parts[i].OriginY, Parts[i].Rotate, inf);
|
||||
ret = Parts[i].Texture->CopyTrueColorPixels(bmp, x+Parts[i].OriginX, y+Parts[i].OriginY, Parts[i].Rotate, &info);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1121,7 +1118,6 @@ void FMultiPatchTexture::ParsePatch(FScanner &sc, TexPart & part)
|
|||
part.Blend.a = clamp<int>(int(sc.Float*255), 1, 254);
|
||||
}
|
||||
else part.Blend.a = 255;
|
||||
bComplex = true;
|
||||
}
|
||||
else if (sc.Compare("alpha"))
|
||||
{
|
||||
|
@ -1230,7 +1226,8 @@ FMultiPatchTexture::FMultiPatchTexture (FScanner &sc, int usetype)
|
|||
if (Parts->OriginX == 0 && Parts->OriginY == 0 &&
|
||||
Parts->Texture->GetWidth() == Width &&
|
||||
Parts->Texture->GetHeight() == Height &&
|
||||
Parts->Rotate == 0)
|
||||
Parts->Rotate == 0 &&
|
||||
!bComplex)
|
||||
{
|
||||
bRedirect = true;
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ ACTOR CentaurLeader : Centaur 115
|
|||
// The mashed centaur is only placed through ACS. Nowhere in the game source
|
||||
// is it ever referenced.
|
||||
|
||||
ACTOR CentaurMash
|
||||
ACTOR CentaurMash : Centaur
|
||||
{
|
||||
Game Hexen
|
||||
SpawnID 103
|
||||
|
|
Loading…
Reference in a new issue