Internal: Fixed: builtin light alteration by actor flags logic in GetGZLightTypeByClass

This commit is contained in:
ZZYZX 2017-03-02 00:57:29 +02:00
parent 61085027c2
commit 52e771fe1d
4 changed files with 11 additions and 11 deletions

View file

@ -592,11 +592,11 @@ namespace CodeImp.DoomBuilder.Config
if(blocking > THING_BLOCKING_NONE) errorcheck = THING_ERROR_INSIDE_STUCK;
// [ZZ]
DynamicLightType = GZGeneral.GetGZLightTypeByClass(actor);
}
dynamiclighttype = GZGeneral.GetGZLightTypeByClass(actor);
}
//mxd. This tries to find all possible sprite rotations. Returns true when voxel substitute exists
internal bool SetupSpriteFrame(HashSet<string> allspritenames, HashSet<string> allvoxelnames)
//mxd. This tries to find all possible sprite rotations. Returns true when voxel substitute exists
internal bool SetupSpriteFrame(HashSet<string> allspritenames, HashSet<string> allvoxelnames)
{
// Empty, invalid or internal sprites don't have rotations
// Info: we can have either partial 5-char sprite name from DECORATE parser,

View file

@ -50,17 +50,17 @@ namespace CodeImp.DoomBuilder.GZBuilder
while (p != null)
{
idx = Array.IndexOf(gzLightClasses, p.ClassName.ToLowerInvariant());
if (idx != -1)
{
// found dynamic light type. alter it by actor flags.
// +MISSILEMORE makes it additive.
// +MISSILEEVENMORE makes it subtractive.
// +INCOMBAT makes it attenuated.
int light = gzLights[idx];
if (idx < GZ_LIGHT_TYPES[3])
{
int baseType = idx % 10;
int dispType = idx - 9800 - baseType;
int baseType = light % 10;
int dispType = light - baseType;
if (actor.GetFlagValue("MISSILEMORE", false))
dispType = 9810;
else if (actor.GetFlagValue("MISSILEEVENMORE", false))
@ -69,7 +69,7 @@ namespace CodeImp.DoomBuilder.GZBuilder
dispType = 9830;
return dispType + baseType;
}
else return gzLights[idx];
else return light;
}
p = p.BaseClass;

View file

@ -30,6 +30,6 @@ using CodeImp.DoomBuilder;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.3.0.2923")]
[assembly: AssemblyVersion("2.3.0.2924")]
[assembly: NeutralResourcesLanguageAttribute("en")]
[assembly: AssemblyHash("748fe9e")]
[assembly: AssemblyHash("6108502")]

View file

@ -29,5 +29,5 @@ using System.Resources;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.3.0.2923")]
[assembly: AssemblyVersion("2.3.0.2924")]
[assembly: NeutralResourcesLanguageAttribute("en")]