- added DAMAGE_NO_ARMOR flag for ACS's SectorDamage function.

This commit is contained in:
Christoph Oelckers 2017-02-25 19:10:49 +01:00
parent 89a43feb7a
commit 8dac678200
5 changed files with 23 additions and 23 deletions

View File

@ -466,7 +466,8 @@ static void DoSectorDamage(AActor *actor, sector_t *sec, int amount, FName type,
return;
}
P_DamageMobj (actor, NULL, NULL, amount, type);
int dflags = (flags & DAMAGE_NO_ARMOR) ? DMG_NO_ARMOR : 0;
P_DamageMobj (actor, NULL, NULL, amount, type, dflags);
}
void P_SectorDamage(int tag, int amount, FName type, PClassActor *protectClass, int flags)

View File

@ -76,6 +76,7 @@ const double CARRYFACTOR = 3 / 32.;
#define DAMAGE_NONPLAYERS 2
#define DAMAGE_IN_AIR 4
#define DAMAGE_SUBCLASSES_PROTECT 8
#define DAMAGE_NO_ARMOR 16
// [RH] If a deathmatch game, checks to see if noexit is enabled.

View File

@ -572,7 +572,7 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, DWORD tag,
parms->colorOverlay = 0;
parms->alphaChannel = false;
parms->flipX = false;
parms->shadowAlpha = 0;
//parms->shadowAlpha = 0;
parms->shadowColor = 0;
parms->virtWidth = this->GetWidth();
parms->virtHeight = this->GetHeight();
@ -845,7 +845,7 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, DWORD tag,
break;
case DTA_ShadowAlpha:
parms->shadowAlpha = (float)MIN(1., ListGetDouble(tags));
//parms->shadowAlpha = (float)MIN(1., ListGetDouble(tags));
break;
case DTA_ShadowColor:
@ -856,12 +856,12 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, DWORD tag,
boolval = ListGetInt(tags);
if (boolval)
{
parms->shadowAlpha = 0.5;
//parms->shadowAlpha = 0.5;
parms->shadowColor = 0;
}
else
{
parms->shadowAlpha = 0;
//parms->shadowAlpha = 0;
}
break;

View File

@ -162,7 +162,7 @@ struct DrawParms
uint32 colorOverlay;
INTBOOL alphaChannel;
INTBOOL flipX;
float shadowAlpha;
//float shadowAlpha;
int shadowColor;
INTBOOL keepratio;
INTBOOL masked;

View File

@ -738,6 +738,7 @@ public:
bool noautostartmap;
int dofrags;
int ng_state;
float shadowalpha;
//
// GRAPHICS
@ -777,23 +778,6 @@ public:
//====================================================================
//
// Draws a single character with a shadow
//
//====================================================================
int WI_DrawCharPatch (FFont *font, int charcode, int x, int y, EColorRange translation=CR_UNTRANSLATED, bool nomove=false)
{
int width;
font->GetChar(charcode, &width);
screen->DrawChar(font, translation, x, y, charcode,
nomove ? DTA_CleanNoMove : DTA_Clean, true,
DTA_ShadowAlpha, (gameinfo.gametype & GAME_DoomChex) ? 0 : 0.5,
TAG_DONE);
return x - width;
}
//====================================================================
//
// CheckRealHeight
@ -830,6 +814,20 @@ public:
return maxy;
}
//====================================================================
//
// Draws a single character with a shadow
//
//====================================================================
int WI_DrawCharPatch(FFont *font, int charcode, int x, int y, EColorRange translation = CR_UNTRANSLATED, bool nomove = false)
{
int width;
font->GetChar(charcode, &width);
screen->DrawChar(font, translation, x, y, charcode, nomove ? DTA_CleanNoMove : DTA_Clean, true, TAG_DONE);
return x - width;
}
//====================================================================
//
// Draws a level name with the big font