mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 14:22:13 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
0ff061b928
10 changed files with 70 additions and 25 deletions
|
@ -723,7 +723,7 @@ void AddCommandString (char *cmd, int keynum)
|
|||
// Note that deferred commands lose track of which key
|
||||
// (if any) they were pressed from.
|
||||
*brkpt = ';';
|
||||
new DWaitingCommand (brkpt, tics+1);
|
||||
new DWaitingCommand (brkpt, tics);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -81,6 +81,7 @@ enum
|
|||
CP_SECTORFLOOROFFSET,
|
||||
CP_SETWALLYSCALE,
|
||||
CP_SETTHINGZ,
|
||||
CP_SETTAG,
|
||||
};
|
||||
|
||||
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
||||
|
@ -307,6 +308,15 @@ void ParseCompatibility()
|
|||
sc.MustGetFloat();
|
||||
CompatParams.Push(FLOAT2FIXED(sc.Float));
|
||||
}
|
||||
else if (sc.Compare("setsectortag"))
|
||||
{
|
||||
if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size();
|
||||
CompatParams.Push(CP_SETTAG);
|
||||
sc.MustGetNumber();
|
||||
CompatParams.Push(sc.Number);
|
||||
sc.MustGetNumber();
|
||||
CompatParams.Push(sc.Number);
|
||||
}
|
||||
else
|
||||
{
|
||||
sc.UnGet();
|
||||
|
@ -520,6 +530,14 @@ void SetCompatibilityParams()
|
|||
i += 3;
|
||||
break;
|
||||
}
|
||||
case CP_SETTAG:
|
||||
{
|
||||
if ((unsigned)CompatParams[i + 1] < (unsigned)numsectors)
|
||||
{
|
||||
sectors[CompatParams[i + 1]].tag = CompatParams[i + 2];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,6 +107,8 @@ enum SAW_Flags
|
|||
SF_RANDOMLIGHTHIT = 4,
|
||||
SF_NOUSEAMMOMISS = 8,
|
||||
SF_NOUSEAMMO = 16,
|
||||
SF_NOPULLIN = 32,
|
||||
SF_NOTURN = 64,
|
||||
};
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw)
|
||||
|
@ -187,23 +189,27 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw)
|
|||
S_Sound (self, CHAN_WEAPON, hitsound, 1, ATTN_NORM);
|
||||
|
||||
// turn to face target
|
||||
angle = R_PointToAngle2 (self->x, self->y,
|
||||
linetarget->x, linetarget->y);
|
||||
if (angle - self->angle > ANG180)
|
||||
if (!(Flags & SF_NOTURN))
|
||||
{
|
||||
if (angle - self->angle < (angle_t)(-ANG90/20))
|
||||
self->angle = angle + ANG90/21;
|
||||
angle = R_PointToAngle2(self->x, self->y,
|
||||
linetarget->x, linetarget->y);
|
||||
if (angle - self->angle > ANG180)
|
||||
{
|
||||
if (angle - self->angle < (angle_t)(-ANG90 / 20))
|
||||
self->angle = angle + ANG90 / 21;
|
||||
else
|
||||
self->angle -= ANG90 / 20;
|
||||
}
|
||||
else
|
||||
self->angle -= ANG90/20;
|
||||
{
|
||||
if (angle - self->angle > ANG90 / 20)
|
||||
self->angle = angle - ANG90 / 21;
|
||||
else
|
||||
self->angle += ANG90 / 20;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (angle - self->angle > ANG90/20)
|
||||
self->angle = angle - ANG90/21;
|
||||
else
|
||||
self->angle += ANG90/20;
|
||||
}
|
||||
self->flags |= MF_JUSTATTACKED;
|
||||
if (!(Flags & SF_NOPULLIN))
|
||||
self->flags |= MF_JUSTATTACKED;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -525,7 +525,7 @@ level_info_t *CheckLevelRedirect (level_info_t *info);
|
|||
|
||||
FString CalcMapName (int episode, int level);
|
||||
|
||||
void G_ParseMapInfo (const char *basemapinfo);
|
||||
void G_ParseMapInfo (FString basemapinfo);
|
||||
|
||||
void G_ClearSnapshots (void);
|
||||
void P_RemoveDefereds ();
|
||||
|
|
|
@ -1886,7 +1886,7 @@ static void ClearMapinfo()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void G_ParseMapInfo (const char *basemapinfo)
|
||||
void G_ParseMapInfo (FString basemapinfo)
|
||||
{
|
||||
int lump, lastlump = 0;
|
||||
level_info_t gamedefaults;
|
||||
|
@ -1895,7 +1895,7 @@ void G_ParseMapInfo (const char *basemapinfo)
|
|||
atterm(ClearMapinfo);
|
||||
|
||||
// Parse the default MAPINFO for the current game. This lump *MUST* come from zdoom.pk3.
|
||||
if (basemapinfo != NULL)
|
||||
if (basemapinfo.IsNotEmpty())
|
||||
{
|
||||
FMapInfoParser parse;
|
||||
level_info_t defaultinfo;
|
||||
|
@ -1903,7 +1903,7 @@ void G_ParseMapInfo (const char *basemapinfo)
|
|||
if (Wads.GetLumpFile(baselump) > 0)
|
||||
{
|
||||
I_FatalError("File %s is overriding core lump %s.",
|
||||
Wads.GetWadFullName(Wads.GetLumpFile(baselump)), basemapinfo);
|
||||
Wads.GetWadFullName(Wads.GetLumpFile(baselump)), basemapinfo.GetChars());
|
||||
}
|
||||
parse.ParseMapInfo(baselump, gamedefaults, defaultinfo);
|
||||
}
|
||||
|
|
|
@ -3747,16 +3747,16 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
|
|||
break;
|
||||
|
||||
case APROP_Friendly:
|
||||
if (actor->CountsAsKill()) level.total_monsters--;
|
||||
if (value)
|
||||
{
|
||||
if (actor->CountsAsKill()) level.total_monsters--;
|
||||
actor->flags |= MF_FRIENDLY;
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->flags &= ~MF_FRIENDLY;
|
||||
if (actor->CountsAsKill()) level.total_monsters++;
|
||||
}
|
||||
if (actor->CountsAsKill()) level.total_monsters++;
|
||||
break;
|
||||
|
||||
|
||||
|
|
|
@ -540,7 +540,7 @@ bool MIDIStreamer::IsPlaying()
|
|||
|
||||
void MIDIStreamer::MusicVolumeChanged()
|
||||
{
|
||||
if (MIDI->FakeVolume())
|
||||
if (MIDI != NULL && MIDI->FakeVolume())
|
||||
{
|
||||
float realvolume = clamp<float>(snd_musicvolume * relative_volume, 0.f, 1.f);
|
||||
Volume = clamp<DWORD>((DWORD)(realvolume * 65535.f), 0, 65535);
|
||||
|
@ -622,7 +622,7 @@ void MIDIStreamer::FluidSettingStr(const char *setting, const char *value)
|
|||
|
||||
void MIDIStreamer::OutputVolume (DWORD volume)
|
||||
{
|
||||
if (MIDI->FakeVolume())
|
||||
if (MIDI != NULL && MIDI->FakeVolume())
|
||||
{
|
||||
NewVolume = volume;
|
||||
VolumeChanged = true;
|
||||
|
|
|
@ -14,6 +14,8 @@ const int SF_RANDOMLIGHTHIT = 4;
|
|||
const int SF_RANDOMLIGHTBOTH = 6;
|
||||
const int SF_NOUSEAMMOMISS = 8;
|
||||
const int SF_NOUSEAMMO = 16;
|
||||
const int SF_NOPULLIN = 32;
|
||||
const int SF_NOTURN = 64;
|
||||
|
||||
// Flags for A_CustomMissile
|
||||
const int CMF_AIMOFFSET = 1;
|
||||
|
|
|
@ -39,8 +39,8 @@ ACTOR Revenant 66
|
|||
SKEL I 6 A_SkelFist
|
||||
Goto See
|
||||
Missile:
|
||||
SKEL J 1 BRIGHT A_FaceTarget
|
||||
SKEL J 9 BRIGHT A_FaceTarget
|
||||
SKEL J 0 BRIGHT A_FaceTarget
|
||||
SKEL J 10 BRIGHT A_FaceTarget
|
||||
SKEL K 10 A_SkelMissile
|
||||
SKEL K 10 A_FaceTarget
|
||||
Goto See
|
||||
|
|
|
@ -1,5 +1,23 @@
|
|||
// Must be sorted in identification order (easiest to recognize first!)
|
||||
|
||||
IWad
|
||||
{
|
||||
Name = "The Adventures of Square"
|
||||
Game = "Doom"
|
||||
Config = "Square"
|
||||
MustContain = "SQU-IWAD", "E1A1"
|
||||
BannerColors = "ff ff ff", "80 00 80"
|
||||
}
|
||||
|
||||
IWad
|
||||
{
|
||||
Name = "The Adventures of Square (Square-ware)"
|
||||
Game = "Doom"
|
||||
Config = "Square"
|
||||
MustContain = "SQU-SWE1", "E1A1"
|
||||
BannerColors = "ff ff ff", "80 00 80"
|
||||
}
|
||||
|
||||
IWad
|
||||
{
|
||||
Name = "Harmony"
|
||||
|
@ -361,4 +379,5 @@ Names
|
|||
"harm1.wad"
|
||||
"hacx.wad"
|
||||
"hacx2.wad"
|
||||
"square1.pk3"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue