mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- Gez's latest cleanup patch.
SVN r1854 (trunk)
This commit is contained in:
parent
f3f209160e
commit
2fbcc13652
7 changed files with 29 additions and 46 deletions
|
@ -839,6 +839,6 @@ CCMD (playerinfo)
|
|||
Printf ("PlayerClass: %s (%d)\n",
|
||||
ui->PlayerClass == -1 ? "Random" : PlayerClasses[ui->PlayerClass].Type->Meta.GetMetaString (APMETA_DisplayName),
|
||||
ui->PlayerClass);
|
||||
PrintMiscActorInfo(players[i].mo);
|
||||
if (argv.argc() > 2) PrintMiscActorInfo(players[i].mo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -565,7 +565,7 @@ IMPLEMENT_CLASS (APowerInvisibility)
|
|||
IMPLEMENT_CLASS (APowerShadow)
|
||||
|
||||
// Invisibility flag combos
|
||||
#define INVISIBILITY_FLAGS1 (MF_SHADOW | MF_STEALTH)
|
||||
#define INVISIBILITY_FLAGS1 (MF_SHADOW)
|
||||
#define INVISIBILITY_FLAGS3 (MF3_GHOST)
|
||||
#define INVISIBILITY_FLAGS5 (MF5_CANTSEEK)
|
||||
|
||||
|
@ -590,24 +590,6 @@ void APowerInvisibility::InitEffect ()
|
|||
flags5 &= ~(Owner->flags5 & INVISIBILITY_FLAGS5);
|
||||
Owner->flags5 |= flags5 & INVISIBILITY_FLAGS5;
|
||||
|
||||
// Finds out what's the normal alpha and render style for the owner.
|
||||
// First assume it's what it currently is.
|
||||
//OwnersNormalStyle = Owner->RenderStyle;
|
||||
//OwnersNormalAlpha = Owner->alpha;
|
||||
// Then look if there aren't active invis powerups and look what they're saying.
|
||||
/*AInventory *item = Owner->Inventory;
|
||||
while (item != NULL)
|
||||
{
|
||||
if (item->IsKindOf(RUNTIME_CLASS(APowerInvisibility)) && item != this)
|
||||
{
|
||||
OwnersNormalStyle = static_cast<APowerInvisibility*>(item)->OwnersNormalStyle;
|
||||
OwnersNormalAlpha = static_cast<APowerInvisibility*>(item)->OwnersNormalAlpha;
|
||||
item = NULL; // No need to look further
|
||||
}
|
||||
else item = item->Inventory;
|
||||
}
|
||||
Printf("Owner's normal style is found to be %i, normal alpha is found to be %i.\n",
|
||||
OwnersNormalStyle, OwnersNormalAlpha>>FRACBITS);*/
|
||||
DoEffect();
|
||||
}
|
||||
}
|
||||
|
@ -623,7 +605,7 @@ void APowerInvisibility::DoEffect ()
|
|||
// Due to potential interference with other PowerInvisibility items
|
||||
// the effect has to be refreshed each tic.
|
||||
fixed_t ts = Strength * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT;
|
||||
Owner->alpha = clamp<fixed_t>((/*OwnersNormalAlpha*/OPAQUE - ts), 0, OPAQUE);
|
||||
Owner->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE);
|
||||
switch (Mode)
|
||||
{
|
||||
case (NAME_Fuzzy):
|
||||
|
@ -639,6 +621,7 @@ void APowerInvisibility::DoEffect ()
|
|||
Owner->RenderStyle = STYLE_Stencil;
|
||||
break;
|
||||
case (NAME_None):
|
||||
case (NAME_Cumulative):
|
||||
case (NAME_Translucent):
|
||||
Owner->RenderStyle = STYLE_Translucent;
|
||||
break;
|
||||
|
@ -663,8 +646,8 @@ void APowerInvisibility::EndEffect ()
|
|||
Owner->flags3 &= ~(flags3 & INVISIBILITY_FLAGS3);
|
||||
Owner->flags5 &= ~(flags5 & INVISIBILITY_FLAGS5);
|
||||
|
||||
Owner->RenderStyle = STYLE_Normal;//OwnersNormalStyle;
|
||||
Owner->alpha = OPAQUE;//OwnersNormalAlpha;
|
||||
Owner->RenderStyle = STYLE_Normal;
|
||||
Owner->alpha = OPAQUE;
|
||||
|
||||
// Check whether there are other invisibility items and refresh their effect.
|
||||
// If this isn't done there will be one incorrectly drawn frame when this
|
||||
|
@ -693,15 +676,15 @@ int APowerInvisibility::AlterWeaponSprite (vissprite_t *vis)
|
|||
// Blink if the powerup is wearing off
|
||||
if (changed == 0 && EffectTics < 4*32 && !(EffectTics & 8))
|
||||
{
|
||||
vis->RenderStyle = STYLE_Normal;//OwnersNormalStyle;
|
||||
vis->alpha = OPAQUE;//OwnersNormalAlpha;
|
||||
vis->RenderStyle = STYLE_Normal;
|
||||
vis->alpha = OPAQUE;
|
||||
return 1;
|
||||
}
|
||||
else if (changed == 1)
|
||||
{
|
||||
// something else set the weapon sprite back to opaque but this item is still active.
|
||||
fixed_t ts = Strength * (special1 + 1); if (ts > FRACUNIT) ts = FRACUNIT;
|
||||
vis->alpha = clamp<fixed_t>((/*OwnersNormalAlpha*/OPAQUE - ts), 0, OPAQUE);
|
||||
vis->alpha = clamp<fixed_t>((OPAQUE - ts), 0, OPAQUE);
|
||||
switch (Mode)
|
||||
{
|
||||
case (NAME_Fuzzy):
|
||||
|
|
|
@ -5476,10 +5476,7 @@ void PrintMiscActorInfo(AActor * query)
|
|||
static const char * renderstyles[]= {"None", "Normal", "Fuzzy", "SoulTrans",
|
||||
"OptFuzzy", "Stencil", "Translucent", "Add", "Shaded", "TranslucentStencil"};
|
||||
|
||||
/*
|
||||
Printf("%s %x has the following flags:\n\tflags1: %x",
|
||||
query->GetNameTag().GetChars(), query, query->flags);
|
||||
*/
|
||||
Printf("%s has the following flags:\n\tflags: %x", query->GetTag(), query->flags);
|
||||
for (flagi = 0; flagi < 31; flagi++)
|
||||
if (query->flags & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags));
|
||||
Printf("\n\tflags2: %x", query->flags2);
|
||||
|
@ -5497,23 +5494,20 @@ void PrintMiscActorInfo(AActor * query)
|
|||
Printf("\n\tflags6: %x", query->flags6);
|
||||
for (flagi = 0; flagi < 31; flagi++)
|
||||
if (query->flags6 & 1<<flagi) Printf(" %s", FLAG_NAME(1<<flagi, flags6));
|
||||
|
||||
/*
|
||||
Printf("\nIts bounce style and factors are %s and f:%f, w:%f; its bounce flags are:\n\tflagsb: %x",
|
||||
bouncestyles[bt], FIXED2FLOAT(query->bouncefactor),
|
||||
Printf("\nIts bounce style and factors are %x and f:%f, w:%f; its bounce flags are:\n\tflagsb: %x",
|
||||
query->BounceFlags, FIXED2FLOAT(query->bouncefactor),
|
||||
FIXED2FLOAT(query->wallbouncefactor), query->BounceFlags);
|
||||
for (flagi = 0; flagi < 31; flagi++)
|
||||
if (query->BounceFlags & 1<<flagi) Printf(" %s", flagnamesb[flagi]);
|
||||
/*for (flagi = 0; flagi < 31; flagi++)
|
||||
if (query->BounceFlags & 1<<flagi) Printf(" %s", flagnamesb[flagi]);*/
|
||||
Printf("\nIts render style is %i:%s with alpha %f and the following render flags:\n\tflagsr: %x",
|
||||
querystyle, (querystyle < STYLE_Count ? renderstyles[querystyle] : "Unknown"),
|
||||
FIXED2FLOAT(query->alpha), query->renderflags);
|
||||
for (flagi = 0; flagi < 31; flagi++)
|
||||
if (query->renderflags & 1<<flagi) Printf(" %s", flagnamesr[flagi]);
|
||||
*/
|
||||
/*for (flagi = 0; flagi < 31; flagi++)
|
||||
if (query->renderflags & 1<<flagi) Printf(" %s", flagnamesr[flagi]);*/
|
||||
Printf("\nIts thing special and arguments are %s(%i, %i, %i, %i, %i), and its specials are %i and %i.",
|
||||
LineSpecialsInfo[query->special]->name, query->args[0], query->args[1],
|
||||
query->args[2], query->args[3], query->args[4],
|
||||
query->special1, query->special2);
|
||||
(query->special ? LineSpecialsInfo[query->special]->name : "None"),
|
||||
query->args[0], query->args[1], query->args[2], query->args[3],
|
||||
query->args[4], query->special1, query->special2);
|
||||
Printf("\nIts coordinates are x: %f, y: %f, z:%f, floor:%f, ceiling:%f.",
|
||||
FIXED2FLOAT(query->x), FIXED2FLOAT(query->y), FIXED2FLOAT(query->z),
|
||||
FIXED2FLOAT(query->floorz), FIXED2FLOAT(query->ceilingz));
|
||||
|
|
|
@ -240,6 +240,7 @@ static FFlagDef ActorFlags[]=
|
|||
DEFINE_FLAG2(BOUNCE_Quiet, NOBOUNCESOUND, AActor, BounceFlags),
|
||||
DEFINE_FLAG2(BOUNCE_AllActors, BOUNCEONACTORS, AActor, BounceFlags),
|
||||
DEFINE_FLAG2(BOUNCE_ExplodeOnWater, EXPLODEONWATER, AActor, BounceFlags),
|
||||
DEFINE_FLAG2(BOUNCE_MBF, MBFBOUNCER, AActor, BounceFlags),
|
||||
|
||||
// Deprecated flags. Handling must be performed in HandleDeprecatedFlags
|
||||
DEFINE_DEPRECATED_FLAG(FIREDAMAGE),
|
||||
|
|
|
@ -260,7 +260,7 @@ ACTOR Actor native //: Thinker
|
|||
action native A_ChangeVelocity(float x = 0, float y = 0, float z = 0, int flags = 0);
|
||||
action native A_SetArg(int pos, int value);
|
||||
action native A_SetUserVar(int pos, int value);
|
||||
action native A_SetSpecial(int spec, int arg0, int arg1, int arg2, int arg3, int arg4);
|
||||
action native A_SetSpecial(int spec, int arg0 = 0, int arg1 = 0, int arg2 = 0, int arg3 = 0, int arg4 = 0);
|
||||
|
||||
States
|
||||
{
|
||||
|
|
|
@ -63,9 +63,15 @@ const int MRF_UNDOBYDEATH = 512;
|
|||
const int MRF_UNDOBYDEATHFORCED = 1024;
|
||||
const int MRF_UNDOBYDEATHSAVES = 2048;
|
||||
|
||||
// Flags for A_RailAttack and A_CustomRailgun
|
||||
const int RGF_SILENT = 1;
|
||||
const int RGF_NOPIERCING = 2;
|
||||
|
||||
// Flags for A_Mushroom
|
||||
const int MSF_Standard = 0;
|
||||
const int MSF_Classic = 1;
|
||||
|
||||
// Activation flags
|
||||
enum
|
||||
{
|
||||
THINGSPEC_Default = 0,
|
||||
|
@ -77,7 +83,6 @@ enum
|
|||
THINGSPEC_ClearSpecial = 32,
|
||||
};
|
||||
|
||||
|
||||
// constants for A_PlaySound
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -414,7 +414,7 @@ StateMap
|
|||
DoomUnusedStates, TNT, 1, // [MBF] S_TNT1 967
|
||||
Grenade, Grenade, 1, // [MBF] S_GRENADE 968
|
||||
Grenade, Detonate, 3, // [MBF] S_DETONATE - S_DETONATE3 969-971
|
||||
Dog, Spawn, 27, // [MBF] S_DOGS_STND - S_DOGS_RAISE6 972-998
|
||||
MBFHelperDog, Spawn, 27, // [MBF] S_DOGS_STND - S_DOGS_RAISE6 972-998
|
||||
BFG9000, OldFire, 43, // [MBF] S_OLDBFG1 - S_OLDBFG43 999-1041
|
||||
PlasmaBall1, Spawn, 7, // [MBF] S_PLS1BALL - S_PLS1EXP5 1042-1048
|
||||
PlasmaBall2, Spawn, 5, // [MBF] S_PLS2BALL - S_PLS2BALLX3 1049-1053
|
||||
|
@ -681,7 +681,7 @@ InfoNames
|
|||
PointPusher,
|
||||
PointPuller,
|
||||
// MBF additional actors:
|
||||
Dog,
|
||||
MBFHelperDog,
|
||||
PlasmaBall1,
|
||||
PlasmaBall2,
|
||||
EvilSceptre,
|
||||
|
|
Loading…
Reference in a new issue