mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
881731d76b
7 changed files with 33 additions and 28 deletions
|
@ -662,7 +662,7 @@ static EColorRange ParseOptionColor(FScanner &sc, FOptionMenuDescriptor *desc)
|
|||
if (sc.CheckString(","))
|
||||
{
|
||||
sc.MustGetString();
|
||||
EColorRange cr = V_FindFontColor(sc.String);
|
||||
cr = V_FindFontColor(sc.String);
|
||||
if (cr == CR_UNTRANSLATED && !sc.Compare("untranslated") && isdigit(sc.String[0]))
|
||||
{
|
||||
if (strtol(sc.String, NULL, 0)) cr = OptionSettings.mFontColorHeader;
|
||||
|
|
|
@ -3719,6 +3719,7 @@ enum
|
|||
APROP_DamageMultiplier=43,
|
||||
APROP_MaxStepHeight = 44,
|
||||
APROP_MaxDropOffHeight= 45,
|
||||
APROP_DamageType = 46,
|
||||
};
|
||||
|
||||
// These are needed for ACS's APROP_RenderStyle
|
||||
|
@ -3978,6 +3979,9 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
|
|||
actor->MaxDropOffHeight = ACSToDouble(value);
|
||||
break;
|
||||
|
||||
case APROP_DamageType:
|
||||
actor->DamageType = FBehavior::StaticLookupString(value);
|
||||
break;
|
||||
|
||||
default:
|
||||
// do nothing.
|
||||
|
@ -4081,6 +4085,7 @@ int DLevelScript::GetActorProperty (int tid, int property)
|
|||
case APROP_Friction: return DoubleToACS(actor->Friction);
|
||||
case APROP_MaxStepHeight: return DoubleToACS(actor->MaxStepHeight);
|
||||
case APROP_MaxDropOffHeight: return DoubleToACS(actor->MaxDropOffHeight);
|
||||
case APROP_DamageType: return GlobalACSStrings.AddString(actor->DamageType);
|
||||
|
||||
default: return 0;
|
||||
}
|
||||
|
@ -4153,6 +4158,7 @@ int DLevelScript::CheckActorProperty (int tid, int property, int value)
|
|||
case APROP_ActiveSound: string = actor->ActiveSound; break;
|
||||
case APROP_Species: string = actor->GetSpecies(); break;
|
||||
case APROP_NameTag: string = actor->GetTag(); break;
|
||||
case APROP_DamageType: string = actor->DamageType; break;
|
||||
}
|
||||
if (string == NULL) string = "";
|
||||
return (!stricmp(string, FBehavior::StaticLookupString(value)));
|
||||
|
|
|
@ -1085,9 +1085,8 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Lower)
|
|||
}
|
||||
if (player->playerstate == PST_DEAD)
|
||||
{ // Player is dead, so don't bring up a pending weapon
|
||||
psp->y = WEAPONBOTTOM;
|
||||
|
||||
// Player is dead, so keep the weapon off screen
|
||||
P_SetPsprite(player, PSP_FLASH, nullptr);
|
||||
psp->SetState(nullptr);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1171,50 +1170,39 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ClearOverlays)
|
|||
PARAM_INT_OPT(stop) { stop = 0; }
|
||||
PARAM_BOOL_OPT(safety) { safety = true; }
|
||||
|
||||
if (!self->player)
|
||||
if (self->player == nullptr)
|
||||
ACTION_RETURN_INT(0);
|
||||
|
||||
player_t *player = self->player;
|
||||
if (!start && !stop)
|
||||
{
|
||||
start = INT_MIN;
|
||||
stop = safety ? PSP_TARGETCENTER - 1 : INT_MAX;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
DPSprite *pspr = player->psprites;
|
||||
int startID = (pspr != nullptr) ? pspr->GetID() : start;
|
||||
bool first = true;
|
||||
while (pspr != nullptr)
|
||||
{
|
||||
if (pspr->GetID() == startID)
|
||||
{
|
||||
if (first)
|
||||
first = false;
|
||||
else
|
||||
break;
|
||||
}
|
||||
int id = pspr->GetID();
|
||||
unsigned int count = 0;
|
||||
int id;
|
||||
|
||||
//Do not wipe out layer 0. Ever.
|
||||
if (!id || id < start)
|
||||
for (DPSprite *pspr = self->player->psprites; pspr != nullptr; pspr = pspr->GetNext())
|
||||
{
|
||||
id = pspr->GetID();
|
||||
|
||||
if (id < start || id == 0)
|
||||
continue;
|
||||
if (id > stop)
|
||||
else if (id > stop)
|
||||
break;
|
||||
|
||||
if (safety)
|
||||
{
|
||||
if (id >= PSP_TARGETCENTER)
|
||||
break;
|
||||
else if ((id >= PSP_STRIFEHANDS && id <= PSP_WEAPON) || (id == PSP_FLASH))
|
||||
else if (id == PSP_STRIFEHANDS || id == PSP_WEAPON || id == PSP_FLASH)
|
||||
continue;
|
||||
}
|
||||
|
||||
// [MC]Don't affect non-hardcoded layers unless it's really desired.
|
||||
pspr->SetState(nullptr);
|
||||
count++;
|
||||
pspr = pspr->GetNext();
|
||||
}
|
||||
|
||||
ACTION_RETURN_INT(count);
|
||||
}
|
||||
|
||||
|
|
|
@ -220,8 +220,8 @@ int OriginalMain(int argc, char** argv)
|
|||
|
||||
|
||||
@interface ApplicationController : NSResponder
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
<NSFileManagerDelegate>
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
|
||||
<NSApplicationDelegate>
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1677,7 +1677,7 @@ void R_DrawTiltedPlane (visplane_t *pl, double _xscale, double _yscale, fixed_t
|
|||
// the textures a constant size across the surface's plane instead.
|
||||
cosine = cos(planeang), sine = sin(planeang);
|
||||
m[1] = pl->height.ZatPoint(ViewPos.X + yscale * sine, ViewPos.Y + yscale * cosine) - zeroheight;
|
||||
n[1] = pl->height.ZatPoint(ViewPos.X - xscale * cosine, ViewPos.Y + xscale * sine) - zeroheight;
|
||||
n[1] = -(pl->height.ZatPoint(ViewPos.X - xscale * cosine, ViewPos.Y + xscale * sine) - zeroheight);
|
||||
|
||||
plane_su = p ^ m;
|
||||
plane_sv = p ^ n;
|
||||
|
|
|
@ -6129,6 +6129,7 @@ enum DMSS
|
|||
DMSS_EXFILTER = 64, //Changes filter into a blacklisted class instead of whitelisted.
|
||||
DMSS_EXSPECIES = 128, // ^ but with species instead.
|
||||
DMSS_EITHER = 256, //Allow either type or species to be affected.
|
||||
DMSS_INFLICTORDMGTYPE = 512, //Ignore the passed damagetype and use the inflictor's instead.
|
||||
};
|
||||
|
||||
static void DoDamage(AActor *dmgtarget, AActor *inflictor, AActor *source, int amount, FName DamageType, int flags, PClassActor *filter, FName species)
|
||||
|
@ -6153,6 +6154,9 @@ static void DoDamage(AActor *dmgtarget, AActor *inflictor, AActor *source, int a
|
|||
|
||||
if (amount > 0)
|
||||
{ //Should wind up passing them through just fine.
|
||||
if (flags & DMSS_INFLICTORDMGTYPE)
|
||||
DamageType = inflictor->DamageType;
|
||||
|
||||
P_DamageMobj(dmgtarget, inflictor, source, amount, DamageType, dmgFlags);
|
||||
}
|
||||
else if (amount < 0)
|
||||
|
|
|
@ -38,6 +38,9 @@ const int CBAF_NORANDOM = 2;
|
|||
const int CBAF_EXPLICITANGLE = 4;
|
||||
const int CBAF_NOPITCH = 8;
|
||||
const int CBAF_NORANDOMPUFFZ = 16;
|
||||
const int CBAF_PUFFTARGET = 32;
|
||||
const int CBAF_PUFFMASTER = 64;
|
||||
const int CBAF_PUFFTRACER = 128;
|
||||
|
||||
// Flags for A_GunFlash
|
||||
const int GFF_NOEXTCHANGE = 1;
|
||||
|
@ -210,6 +213,9 @@ const int CPF_STEALARMOR = 32;
|
|||
const int FPF_AIMATANGLE = 1;
|
||||
const int FPF_TRANSFERTRANSLATION = 2;
|
||||
const int FPF_NOAUTOAIM = 4;
|
||||
const int FBF_PUFFTARGET = 64;
|
||||
const int FBF_PUFFMASTER = 128;
|
||||
const int FBF_PUFFTRACER = 256;
|
||||
|
||||
// Flags for A_Teleport
|
||||
enum
|
||||
|
@ -460,6 +466,7 @@ enum
|
|||
DMSS_EXFILTER = 0x00000040,
|
||||
DMSS_EXSPECIES = 0x00000080,
|
||||
DMSS_EITHER = 0x00000100,
|
||||
DMSS_INFLICTORDMGTYPE = 0x00000200,
|
||||
};
|
||||
|
||||
// Flags for A_AlertMonsters
|
||||
|
|
Loading…
Reference in a new issue