mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
Conflicts: src/v_video.cpp
This commit is contained in:
commit
60d9f38084
8 changed files with 26 additions and 14 deletions
|
@ -950,6 +950,8 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
int fakeDamage = 0;
|
||||
int holdDamage = 0;
|
||||
|
||||
if (damage < 0) damage = 0;
|
||||
|
||||
if (target == NULL || !((target->flags & MF_SHOOTABLE) || (target->flags6 & MF6_VULNERABLE)))
|
||||
{ // Shouldn't happen
|
||||
return -1;
|
||||
|
@ -1038,6 +1040,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
// Invulnerable, and won't wake up
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (damage < TELEFRAG_DAMAGE) // TELEFRAG_DAMAGE may not be reduced at all or it may not guarantee its effect.
|
||||
{
|
||||
player = target->player;
|
||||
|
@ -1116,6 +1119,10 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
if (target->flags5 & MF5_NODAMAGE)
|
||||
{
|
||||
damage = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (damage < 0)
|
||||
|
|
|
@ -4790,7 +4790,7 @@ void P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bo
|
|||
points *= thing->GetClass()->Meta.GetMetaFixed(AMETA_RDFactor, FRACUNIT) / (double)FRACUNIT;
|
||||
|
||||
// points and bombdamage should be the same sign
|
||||
if (((bombspot->flags7 & MF7_CAUSEPAIN) || (points * bombdamage) > 0) && P_CheckSight(thing, bombspot, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY))
|
||||
if (((points * bombdamage) > 0) && P_CheckSight(thing, bombspot, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY))
|
||||
{ // OK to damage; target is in direct path
|
||||
double velz;
|
||||
double thrust;
|
||||
|
|
|
@ -6159,11 +6159,6 @@ int AActor::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FN
|
|||
{
|
||||
FState *death;
|
||||
|
||||
if (flags5 & MF5_NODAMAGE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// If the actor does not have a corresponding death state, then it does not take damage.
|
||||
// Note that DeathState matches every kind of damagetype, so an actor has that, it can
|
||||
// be hurt with any type of damage. Exception: Massacre damage always succeeds, because
|
||||
|
|
|
@ -84,7 +84,7 @@ void FSoftwareRenderer::PrecacheTexture(FTexture *tex, int cache)
|
|||
{
|
||||
if (tex != NULL)
|
||||
{
|
||||
if (cache & 1)
|
||||
if (cache & FTextureManager::HIT_Columnmode)
|
||||
{
|
||||
const FTexture::Span *spanp;
|
||||
tex->GetColumn(0, &spanp);
|
||||
|
|
|
@ -1248,7 +1248,7 @@ void FTextureManager::PrecacheLevel (void)
|
|||
|
||||
for (unsigned i = 0; i < level.info->PrecacheTextures.Size(); i++)
|
||||
{
|
||||
hitlist[level.info->PrecacheTextures[i].GetIndex()] |= 1;
|
||||
hitlist[level.info->PrecacheTextures[i].GetIndex()] |= FTextureManager::HIT_Wall;
|
||||
}
|
||||
|
||||
for (int i = cnt - 1; i >= 0; i--)
|
||||
|
|
|
@ -433,6 +433,16 @@ public:
|
|||
TEXMAN_DontCreate = 32
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
HIT_Wall = 1,
|
||||
HIT_Flat = 2,
|
||||
HIT_Sky = 4,
|
||||
HIT_Sprite = 8,
|
||||
|
||||
HIT_Columnmode = HIT_Wall|HIT_Sky|HIT_Sprite
|
||||
};
|
||||
|
||||
FTextureID CheckForTexture (const char *name, int usetype, BITFIELD flags=TEXMAN_TryAny);
|
||||
FTextureID GetTexture (const char *name, int usetype, BITFIELD flags=0);
|
||||
int ListTextures (const char *name, TArray<FTextureID> &list);
|
||||
|
|
|
@ -1245,7 +1245,7 @@ void DFrameBuffer::GetHitlist(BYTE *hitlist)
|
|||
FTextureID pic = frame->Texture[k];
|
||||
if (pic.isValid())
|
||||
{
|
||||
hitlist[pic.GetIndex()] = 5;
|
||||
hitlist[pic.GetIndex()] = HIT_Sprite;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1257,14 +1257,14 @@ void DFrameBuffer::GetHitlist(BYTE *hitlist)
|
|||
for (i = numsectors - 1; i >= 0; i--)
|
||||
{
|
||||
hitlist[sectors[i].GetTexture(sector_t::floor).GetIndex()] =
|
||||
hitlist[sectors[i].GetTexture(sector_t::ceiling).GetIndex()] |= 2;
|
||||
hitlist[sectors[i].GetTexture(sector_t::ceiling).GetIndex()] |= HIT_Flat;
|
||||
}
|
||||
|
||||
for (i = numsides - 1; i >= 0; i--)
|
||||
{
|
||||
hitlist[sides[i].GetTexture(side_t::top).GetIndex()] =
|
||||
hitlist[sides[i].GetTexture(side_t::mid).GetIndex()] =
|
||||
hitlist[sides[i].GetTexture(side_t::bottom).GetIndex()] |= 3;
|
||||
hitlist[sides[i].GetTexture(side_t::bottom).GetIndex()] |= HIT_Wall;
|
||||
}
|
||||
|
||||
// Sky texture is always present.
|
||||
|
@ -1276,11 +1276,11 @@ void DFrameBuffer::GetHitlist(BYTE *hitlist)
|
|||
|
||||
if (sky1texture.isValid())
|
||||
{
|
||||
hitlist[sky1texture.GetIndex()] |= 3;
|
||||
hitlist[sky1texture.GetIndex()] |= HIT_Sky;
|
||||
}
|
||||
if (sky2texture.isValid())
|
||||
{
|
||||
hitlist[sky2texture.GetIndex()] |= 3;
|
||||
hitlist[sky2texture.GetIndex()] |= HIT_Sky;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ ACTOR Actor native //: Thinker
|
|||
action native A_GiveToSiblings(class<Inventory> itemtype, int amount = 0);
|
||||
action native A_TakeFromChildren(class<Inventory> itemtype, int amount = 0);
|
||||
action native A_TakeFromSiblings(class<Inventory> itemtype, int amount = 0);
|
||||
action native A_SetTeleFog(class<TeleportFog> oldpos, class<TeleportFog> newpos);
|
||||
action native A_SetTeleFog(class<Actor> oldpos, class<Actor> newpos);
|
||||
action native A_SwapTeleFog();
|
||||
action native A_SetFloatBobPhase(int bob);
|
||||
action native A_SetHealth(int health, int ptr = AAPTR_DEFAULT);
|
||||
|
|
Loading…
Reference in a new issue