mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- added DAMAGE_NO_ARMOR flag for ACS's SectorDamage function.
This commit is contained in:
parent
89a43feb7a
commit
8dac678200
5 changed files with 23 additions and 23 deletions
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ struct DrawParms
|
|||
uint32 colorOverlay;
|
||||
INTBOOL alphaChannel;
|
||||
INTBOOL flipX;
|
||||
float shadowAlpha;
|
||||
//float shadowAlpha;
|
||||
int shadowColor;
|
||||
INTBOOL keepratio;
|
||||
INTBOOL masked;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue