* Updated to ZDoom 3938:

- Fixed: Player sounds that explicitly use dsempty will now properly silence the sound instead of looking for a more audible version.
- Remove deleted file a_macil.cpp from the project file.
- Use an FString to store demoname instead of a fixed-size array.
- Fixed: Masked mid textures should get their light level from the frontsector they reference, not from the sector they appear in.
- Fixed: Corpse queue accounting went awry once things started being kicked out of it.
- Added a new UDMF sidedef flag: lightfog.

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1464 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
gez 2012-11-03 11:07:41 +00:00
parent e77aa5bcfc
commit 83db0838d1
12 changed files with 52 additions and 53 deletions

View file

@ -6611,42 +6611,6 @@
/>
</FileConfiguration>
</File>
<File
RelativePath=".\src\g_strife\a_macil.cpp"
>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath=".\src\g_strife\a_oracle.cpp"
>

View file

@ -141,6 +141,9 @@ Note: All <bool> fields default to false unless mentioned otherwise.
light = <integer>; // This side's light level. Default is 0.
lightabsolute = <bool>; // true = 'light' is an absolute value. Default is
// relative to the owning sector's light level.
lightfog = <bool>; // true = This side's relative lighting is used even in
// foggy sectors. Default is to disable relative
// lighting in foggy sectors.
nofakecontrast = <bool>; // Disables use of fake contrast on this sidedef.
smoothlighting = <bool>; // Use smooth fake contrast.
clipmidtex = <bool>; // Side's mid textures are clipped to floor and ceiling.

View file

@ -161,7 +161,7 @@ int consoleplayer; // player taking events
int gametic;
CVAR(Bool, demo_compress, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG);
char demoname[256];
FString demoname;
bool demorecording;
bool demoplayback;
bool netdemo;
@ -2271,7 +2271,7 @@ void G_WriteDemoTiccmd (ticcmd_t *cmd, int player, int buf)
void G_RecordDemo (const char* name)
{
usergame = false;
strcpy (demoname, name);
demoname = name;
FixPathSeperator (demoname);
DefaultExtension (demoname, ".lmp");
maxdemosize = 0x20000;
@ -2710,11 +2710,18 @@ bool G_CheckDemoStatus (void)
formlen = demobuffer + 4;
WriteLong (int(demo_p - demobuffer - 8), &formlen);
M_WriteFile (demoname, demobuffer, int(demo_p - demobuffer));
bool saved = M_WriteFile (demoname, demobuffer, int(demo_p - demobuffer));
M_Free (demobuffer);
demorecording = false;
stoprecording = false;
Printf ("Demo %s recorded\n", demoname);
if (saved)
{
Printf ("Demo %s recorded\n", demoname.GetChars());
}
else
{
Printf ("Demo %s could not be saved\n", demoname.GetChars());
}
}
return false;

View file

@ -350,7 +350,6 @@ CUSTOM_CVAR(Int, sv_corpsequeuesize, 64, CVAR_ARCHIVE|CVAR_SERVERINFO)
while (first != NULL && first->Count > (DWORD)self)
{
DCorpsePointer *next = iterator.Next ();
next->Count = first->Count;
first->Destroy ();
first = next;
}
@ -373,9 +372,8 @@ DCorpsePointer::DCorpsePointer (AActor *ptr)
if (first->Count >= (DWORD)sv_corpsequeuesize)
{
DCorpsePointer *next = iterator.Next ();
next->Count = first->Count;
first->Destroy ();
return;
first = next;
}
}
++first->Count;

View file

@ -448,6 +448,7 @@ xx(scalex_bottom)
xx(scaley_bottom)
xx(light)
xx(lightabsolute)
xx(lightfog)
xx(nofakecontrast)
xx(smoothlighting)
xx(blockprojectiles)

View file

@ -996,10 +996,10 @@ int side_t::GetLightLevel (bool foggy, int baselight, bool noabsolute, int *pfak
baselight += rel;
}
}
if (!(Flags & WALLF_ABSLIGHTING))
{
baselight = clamp(baselight + this->Light, 0, 255);
}
}
if (!(Flags & WALLF_ABSLIGHTING) && (!foggy || (Flags & WALLF_LIGHT_FOG)))
{
baselight = clamp(baselight + this->Light, 0, 255);
}
return baselight;
}

View file

@ -1053,6 +1053,10 @@ public:
Flag(sd->Flags, WALLF_ABSLIGHTING, key);
continue;
case NAME_lightfog:
Flag(sd->Flags, WALLF_LIGHT_FOG, key);
continue;
case NAME_nofakecontrast:
Flag(sd->Flags, WALLF_NOFAKECONTRAST, key);
continue;

View file

@ -815,6 +815,7 @@ enum
WALLF_CLIP_MIDTEX = 16, // Like the line counterpart, but only for this side.
WALLF_WRAP_MIDTEX = 32, // Like the line counterpart, but only for this side.
WALLF_POLYOBJ = 64, // This wall belongs to a polyobject.
WALLF_LIGHT_FOG = 128, // This wall's Light is used even in fog.
};
struct side_t

View file

@ -2427,7 +2427,20 @@ void R_StoreWallRange (int start, int stop)
}
ds_p->light = rw_light;
ds_p->lightstep = rw_lightstep;
ds_p->shade = wallshade;
// Masked midtextures should get the light level from the sector they reference,
// not from the current subsector, which is what the current wallshade value
// comes from. We make an exeption for polyobjects, however, since their "home"
// sector should be whichever one they move into.
if (curline->sidedef->Flags & WALLF_POLYOBJ)
{
ds_p->shade = wallshade;
}
else
{
ds_p->shade = LIGHT2SHADE(curline->sidedef->GetLightLevel(foggy, curline->frontsector->lightlevel)
+ r_actualextralight);
}
if (ds_p->bFogBoundary || ds_p->maskedtexturecol != -1)
{

View file

@ -519,6 +519,7 @@ int S_AddSoundLump (const char *logicalname, int lump)
newsfx.bUsed = false;
newsfx.bSingular = false;
newsfx.bTentative = false;
newsfx.bPlayerSilent = false;
newsfx.link = sfxinfo_t::NO_LINK;
newsfx.Rolloff.RolloffType = ROLLOFF_Doom;
newsfx.Rolloff.MinDistance = 0;
@ -1110,10 +1111,14 @@ static void S_AddSNDINFO (int lump)
case SI_PlayerSound: {
// $playersound <player class> <gender> <logical name> <lump name>
FString pclass;
int gender, refid;
int gender, refid, sfxnum;
S_ParsePlayerSoundCommon (sc, pclass, gender, refid);
S_AddPlayerSound (pclass, gender, refid, sc.String);
sfxnum = S_AddPlayerSound (pclass, gender, refid, sc.String);
if (0 == stricmp(sc.String, "dsempty"))
{
S_sfx[sfxnum].bPlayerSilent = true;
}
}
break;
@ -1665,7 +1670,9 @@ static int S_LookupPlayerSound (int classidx, int gender, FSoundID refid)
// If we're not done parsing SNDINFO yet, assume that the target sound is valid
if (PlayerClassesIsSorted &&
(sndnum == 0 ||
((S_sfx[sndnum].lumpnum == -1 || S_sfx[sndnum].lumpnum == sfx_empty) && S_sfx[sndnum].link == sfxinfo_t::NO_LINK)))
((S_sfx[sndnum].lumpnum == -1 || S_sfx[sndnum].lumpnum == sfx_empty) &&
S_sfx[sndnum].link == sfxinfo_t::NO_LINK &&
!S_sfx[sndnum].bPlayerSilent)))
{ // This sound is unavailable.
if (ingender != 0)
{ // Try "male"

View file

@ -57,6 +57,7 @@ struct sfxinfo_t
WORD bUsed:1;
WORD bSingular:1;
WORD bTentative:1;
WORD bPlayerSilent:1; // This player sound is intentionally silent.
int LoopStart; // -1 means no specific loop defined

View file

@ -3,5 +3,5 @@
// This file was automatically generated by the
// updaterevision tool. Do not edit by hand.
#define ZD_SVN_REVISION_STRING "3932"
#define ZD_SVN_REVISION_NUMBER 3932
#define ZD_SVN_REVISION_STRING "3938"
#define ZD_SVN_REVISION_NUMBER 3938