mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- Copied railgun sound fix from Skulltag.
- Made infighting a level flag. The old method still exists but the level flags will take precedence if set. SVN r532 (trunk)
This commit is contained in:
parent
ea2ea7dbf0
commit
f4dcfad331
9 changed files with 60 additions and 13 deletions
|
@ -1,3 +1,10 @@
|
|||
May 20, 2007 (Changes by Graf Zahl)
|
||||
- Copied railgun sound fix from Skulltag.
|
||||
|
||||
May 19, 2007 (Changes by Graf Zahl)
|
||||
- Made infighting a level flag. The old method still exists but the level flags
|
||||
will take precedence if set.
|
||||
|
||||
May 13, 2007 (Changes by Graf Zahl)
|
||||
- fixed: meleethreshold only has meaning when the attacking monster actually
|
||||
has a melee attack.
|
||||
|
|
|
@ -284,6 +284,9 @@ static const char *MapInfoMapLevel[] =
|
|||
"compat_invisibility",
|
||||
"bordertexture",
|
||||
"f1", // [RC] F1 help
|
||||
"noinfighting",
|
||||
"normalinfighting",
|
||||
"totalinfighting",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -419,6 +422,9 @@ MapHandlers[] =
|
|||
{ MITYPE_COMPATFLAG, COMPATF_INVISIBILITY},
|
||||
{ MITYPE_LUMPNAME, lioffset(bordertexture), 0 },
|
||||
{ MITYPE_F1, lioffset(f1), 0, },
|
||||
{ MITYPE_SCFLAGS, LEVEL_NOINFIGHTING, ~LEVEL_TOTALINFIGHTING },
|
||||
{ MITYPE_SCFLAGS, 0, ~(LEVEL_NOINFIGHTING|LEVEL_TOTALINFIGHTING)},
|
||||
{ MITYPE_SCFLAGS, LEVEL_TOTALINFIGHTING, ~LEVEL_NOINFIGHTING },
|
||||
};
|
||||
|
||||
static const char *MapInfoClusterLevel[] =
|
||||
|
@ -2220,7 +2226,7 @@ void G_InitLevelLocals ()
|
|||
|
||||
BaseBlendA = 0.0f; // Remove underwater blend effect, if any
|
||||
NormalLight.Maps = realcolormaps;
|
||||
//NormalLight.Color = PalEntry (255, 255, 255);
|
||||
|
||||
// [BB] Instead of just setting the color, we also have reset Desaturate and build the lights.
|
||||
NormalLight.ChangeColor (PalEntry (255, 255, 255), 0);
|
||||
|
||||
|
|
|
@ -107,6 +107,8 @@
|
|||
#define LEVEL_CROUCH_YES UCONST64(0x100000000000)
|
||||
|
||||
#define LEVEL_PAUSE_MUSIC_IN_MENUS UCONST64(0x200000000000)
|
||||
#define LEVEL_TOTALINFIGHTING UCONST64(0x400000000000)
|
||||
#define LEVEL_NOINFIGHTING UCONST64(0x800000000000)
|
||||
|
||||
struct acsdefered_s;
|
||||
|
||||
|
|
|
@ -1225,12 +1225,13 @@ void M_OptInit (void)
|
|||
|
||||
void M_InitVideoModesMenu ()
|
||||
{
|
||||
int dummy1, dummy2;
|
||||
size_t currval = 0;
|
||||
char name[24];
|
||||
//int dummy1, dummy2;
|
||||
//size_t currval = 0;
|
||||
//char name[24];
|
||||
|
||||
M_RefreshModesList();
|
||||
|
||||
/*
|
||||
for (unsigned int i = 1; i < 32 && currval < countof(Depths); i++)
|
||||
{
|
||||
Video->StartModeIterator (i, screen->IsFullscreen());
|
||||
|
@ -1243,6 +1244,7 @@ void M_InitVideoModesMenu ()
|
|||
currval++;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//ModesItems[VM_DEPTHITEM].b.min = (float)currval;
|
||||
|
||||
|
|
|
@ -462,8 +462,9 @@ void P_DrawRailTrail (AActor *source, const FVector3 &start, const FVector3 &end
|
|||
else
|
||||
{
|
||||
// Only consider sound in 2D (for now, anyway)
|
||||
// [BB] You have to devide by lengthsquared here, not multiply with it.
|
||||
r = ((start.Y - FIXED2FLOAT(mo->y)) * (-dir.Y) -
|
||||
(start.X - FIXED2FLOAT(mo->x)) * (dir.X)) * length * length;
|
||||
(start.X - FIXED2FLOAT(mo->x)) * (dir.X)) / lengthsquared;
|
||||
|
||||
dirz = dir.Z;
|
||||
dir.Z = 0;
|
||||
|
|
|
@ -230,17 +230,34 @@ void DElevator::Tick ()
|
|||
{
|
||||
EResult res;
|
||||
|
||||
fixed_t oldfloor, oldceiling;
|
||||
|
||||
oldfloor = m_Sector->floorplane.d;
|
||||
oldceiling = m_Sector->ceilingplane.d;
|
||||
|
||||
if (m_Direction < 0) // moving down
|
||||
{
|
||||
res = MoveCeiling (m_Speed, m_CeilingDestDist, m_Direction);
|
||||
if (res == ok || res == pastdest)
|
||||
MoveFloor (m_Speed, m_FloorDestDist, m_Direction);
|
||||
{
|
||||
res = MoveFloor (m_Speed, m_FloorDestDist, m_Direction);
|
||||
if (res == crushed)
|
||||
{
|
||||
MoveCeiling (m_Speed, oldceiling, -m_Direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // up
|
||||
{
|
||||
res = MoveFloor (m_Speed, m_FloorDestDist, m_Direction);
|
||||
if (res == ok || res == pastdest)
|
||||
MoveCeiling (m_Speed, m_CeilingDestDist, m_Direction);
|
||||
{
|
||||
res = MoveCeiling (m_Speed, m_CeilingDestDist, m_Direction);
|
||||
if (res == crushed)
|
||||
{
|
||||
MoveFloor (m_Speed, oldfloor, -m_Direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (res == pastdest) // if destination height acheived
|
||||
|
|
|
@ -1241,10 +1241,15 @@ bool AActor::OkayToSwitchTarget (AActor *other)
|
|||
{ // [RH] Friendlies don't target other friendlies
|
||||
return false;
|
||||
}
|
||||
if ((gameinfo.gametype == GAME_Strife || infighting < 0) &&
|
||||
other->player == NULL && !IsHostile (other))
|
||||
|
||||
int infight;
|
||||
if (level.flags & LEVEL_TOTALINFIGHTING) infight=1;
|
||||
else if (level.flags & LEVEL_NOINFIGHTING) infight=-1;
|
||||
else infight = infighting;
|
||||
|
||||
if (infight < 0 && other->player == NULL && !IsHostile (other))
|
||||
{
|
||||
return false; // Strife & infighting off: Non-friendlies don't target other non-friendlies
|
||||
return false; // infighting off: Non-friendlies don't target other non-friendlies
|
||||
}
|
||||
if (TIDtoHate != 0 && TIDtoHate == other->TIDtoHate)
|
||||
return false; // [RH] Don't target "teammates"
|
||||
|
|
|
@ -939,6 +939,7 @@ bool PIT_CheckThing (AActor *thing)
|
|||
// [Graf Zahl] Why do I have the feeling that this didn't really work anymore now
|
||||
// that ZDoom supports friendly monsters?
|
||||
|
||||
|
||||
if (tmthing->target != NULL)
|
||||
{
|
||||
if (thing == tmthing->target)
|
||||
|
@ -950,7 +951,12 @@ bool PIT_CheckThing (AActor *thing)
|
|||
// to harm / be harmed by anything.
|
||||
if (!thing->player && !tmthing->target->player)
|
||||
{
|
||||
if (infighting < 0)
|
||||
int infight;
|
||||
if (level.flags & LEVEL_TOTALINFIGHTING) infight=1;
|
||||
else if (level.flags & LEVEL_NOINFIGHTING) infight=-1;
|
||||
else infight = infighting;
|
||||
|
||||
if (infight < 0)
|
||||
{
|
||||
// -1: Monsters cannot hurt each other, but make exceptions for
|
||||
// friendliness and hate status.
|
||||
|
@ -973,7 +979,7 @@ bool PIT_CheckThing (AActor *thing)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (infighting == 0)
|
||||
else if (infight == 0)
|
||||
{
|
||||
// 0: Monsters cannot hurt same species except
|
||||
// cases where they are clearly supposed to do that
|
||||
|
@ -1001,7 +1007,7 @@ bool PIT_CheckThing (AActor *thing)
|
|||
}
|
||||
}
|
||||
}
|
||||
// else if (infighting==1) any shot hurts anything - no further tests
|
||||
// else if (infight==1) any shot hurts anything - no further tests
|
||||
}
|
||||
}
|
||||
if (!(thing->flags & MF_SHOOTABLE))
|
||||
|
|
|
@ -5,6 +5,7 @@ forcenoskystretch
|
|||
strifefallingdamage
|
||||
nointermission
|
||||
clipmidtextures
|
||||
noinfighting
|
||||
|
||||
map MAP01 "AREA 1: sanctuary"
|
||||
next MAP02
|
||||
|
|
Loading…
Reference in a new issue