* Updated to ZDoom r3705:

- Fixed: FDecalGroup::GetDecal() crashed if there were no decals defined for the group.
- Fixed: A_Saw used the target acquired by P_AimLineAttack for determining if it hit something, not the actual victim of the attack. This is particularly incorrect if the target is a ghost or a spectral monster.
- Unset CF_FLY cheat flag when a player is spawned.
- Fixed: The D3D FlatFill function ignored the alpha channel, unlike its counterpart in the paletted renderer.

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1411 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
gez 2012-06-24 08:12:37 +00:00
parent cba384e13b
commit 4a49af9e41
6 changed files with 16 additions and 12 deletions

View file

@ -1121,16 +1121,19 @@ FDecalLib::FTranslation *FDecalLib::FTranslation::LocateTranslation (DWORD start
const FDecalTemplate *FDecalGroup::GetDecal () const
{
const FDecalBase *decal = Choices.PickEntry ();
const FDecalBase *remember;
const FDecalBase *remember = decal;
// Repeatedly GetDecal() until the result is constant, since
// the choice might be another FDecalGroup.
do
if (decal != NULL)
{
remember = decal;
decal = decal->GetDecal ();
} while (decal != remember);
return static_cast<const FDecalTemplate *>(decal);
do
{
remember = decal;
decal = decal->GetDecal ();
} while (decal != NULL && decal != remember);
}
return static_cast<const FDecalTemplate *>(remember);
}
FDecalAnimator::FDecalAnimator (const char *name)

View file

@ -151,7 +151,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw)
return;
}
P_LineAttack (self, angle, Range, slope, damage, NAME_Melee, pufftype);
P_LineAttack (self, angle, Range, slope, damage, NAME_Melee, pufftype, false, &linetarget);
if (!linetarget)
{

View file

@ -4235,6 +4235,7 @@ APlayerPawn *P_SpawnPlayer (FMapThing *mthing, bool tempplayer)
p->mo->ResetAirSupply(false);
p->Uncrouch();
p->MinPitch = p->MaxPitch = 0; // will be filled in by PostBeginPlay()/netcode
p->cheats &= ~CF_FLY;
p->velx = p->vely = 0; // killough 10/98: initialize bobbing to 0.

View file

@ -3,5 +3,5 @@
// This file was automatically generated by the
// updaterevision tool. Do not edit by hand.
#define ZD_SVN_REVISION_STRING "3700"
#define ZD_SVN_REVISION_NUMBER 3700
#define ZD_SVN_REVISION_STRING "3705"
#define ZD_SVN_REVISION_NUMBER 3705

View file

@ -111,7 +111,7 @@ T TWeightedList<T>::PickEntry () const
{
choice = choice->Next;
}
return choice->Value;
return choice != NULL ? choice->Value : NULL;
}
template<class T>

View file

@ -3170,12 +3170,12 @@ void D3DFB::FlatFill(int left, int top, int right, int bottom, FTexture *src, bo
quad->Group1 = 0;
if (tex->GetTexFormat() == D3DFMT_L8 && !tex->IsGray)
{
quad->Flags = BQF_WrapUV | BQF_GamePalette | BQF_DisableAlphaTest;
quad->Flags = BQF_WrapUV | BQF_GamePalette; // | BQF_DisableAlphaTest;
quad->ShaderNum = BQS_PalTex;
}
else
{
quad->Flags = BQF_WrapUV | BQF_DisableAlphaTest;
quad->Flags = BQF_WrapUV; // | BQF_DisableAlphaTest;
quad->ShaderNum = BQS_Plain;
}
quad->Palette = NULL;