mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-03 06:11:03 +00:00
- Recognize the new lightmap UDMF keywords
- Add dummy actors to hold the UDMF keys for lightmapping. These actors will despawn at map start - Make light probe despawn at map start as well
This commit is contained in:
parent
ae50fcdf8b
commit
70b72a2157
6 changed files with 71 additions and 11 deletions
|
@ -690,6 +690,19 @@ xx(HealthCeilingGroup)
|
||||||
xx(Health3DGroup)
|
xx(Health3DGroup)
|
||||||
xx(HealthGroup)
|
xx(HealthGroup)
|
||||||
|
|
||||||
|
// Lightmap keywords
|
||||||
|
//xx(lightcolor) // already defined
|
||||||
|
xx(lightintensity)
|
||||||
|
xx(lightdistance)
|
||||||
|
xx(lightinnerangle)
|
||||||
|
xx(lightouterangle)
|
||||||
|
xx(lightcolorfloor)
|
||||||
|
xx(lightintensityfloor)
|
||||||
|
xx(lightdistancefloor)
|
||||||
|
xx(lightcolorceiling)
|
||||||
|
xx(lightintensityceiling)
|
||||||
|
xx(lightdistanceceiling)
|
||||||
|
|
||||||
// USDF keywords
|
// USDF keywords
|
||||||
xx(Amount)
|
xx(Amount)
|
||||||
xx(Text)
|
xx(Text)
|
||||||
|
|
|
@ -752,6 +752,14 @@ public:
|
||||||
th->friendlyseeblocks = CheckInt(key);
|
th->friendlyseeblocks = CheckInt(key);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NAME_Lightcolor:
|
||||||
|
case NAME_lightintensity:
|
||||||
|
case NAME_lightdistance:
|
||||||
|
case NAME_lightinnerangle:
|
||||||
|
case NAME_lightouterangle:
|
||||||
|
CHECK_N(Zd | Zdt)
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
CHECK_N(Zd | Zdt)
|
CHECK_N(Zd | Zdt)
|
||||||
if (0 == strnicmp("user_", key.GetChars(), 5))
|
if (0 == strnicmp("user_", key.GetChars(), 5))
|
||||||
|
@ -1122,6 +1130,12 @@ public:
|
||||||
ld->healthgroup = CheckInt(key);
|
ld->healthgroup = CheckInt(key);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NAME_Lightcolor:
|
||||||
|
case NAME_lightintensity:
|
||||||
|
case NAME_lightdistance:
|
||||||
|
CHECK_N(Zd | Zdt)
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (strnicmp("user_", key.GetChars(), 5))
|
if (strnicmp("user_", key.GetChars(), 5))
|
||||||
DPrintf(DMSG_WARNING, "Unknown UDMF linedef key %s\n", key.GetChars());
|
DPrintf(DMSG_WARNING, "Unknown UDMF linedef key %s\n", key.GetChars());
|
||||||
|
@ -1948,6 +1962,15 @@ public:
|
||||||
sec->health3dgroup = CheckInt(key);
|
sec->health3dgroup = CheckInt(key);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NAME_lightcolorfloor:
|
||||||
|
case NAME_lightintensityfloor:
|
||||||
|
case NAME_lightdistancefloor:
|
||||||
|
case NAME_lightcolorceiling:
|
||||||
|
case NAME_lightintensityceiling:
|
||||||
|
case NAME_lightdistanceceiling:
|
||||||
|
CHECK_N(Zd | Zdt)
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (strnicmp("user_", key.GetChars(), 5))
|
if (strnicmp("user_", key.GetChars(), 5))
|
||||||
DPrintf(DMSG_WARNING, "Unknown UDMF sector key %s\n", key.GetChars());
|
DPrintf(DMSG_WARNING, "Unknown UDMF sector key %s\n", key.GetChars());
|
||||||
|
|
|
@ -137,6 +137,8 @@ DoomEdNums
|
||||||
9873 = SectorSpotLightAttenuated
|
9873 = SectorSpotLightAttenuated
|
||||||
9874 = SpotLightFlickerRandomAttenuated
|
9874 = SpotLightFlickerRandomAttenuated
|
||||||
9875 = LightProbe
|
9875 = LightProbe
|
||||||
|
9876 = PointLightStatic
|
||||||
|
9881 = SpotLightStatic
|
||||||
9982 = SecActEyesAboveC
|
9982 = SecActEyesAboveC
|
||||||
9983 = SecActEyesBelowC
|
9983 = SecActEyesBelowC
|
||||||
9988 = CustomSprite
|
9988 = CustomSprite
|
||||||
|
|
|
@ -90,7 +90,7 @@ version "4.6"
|
||||||
#include "zscript/actors/shared/fastprojectile.zs"
|
#include "zscript/actors/shared/fastprojectile.zs"
|
||||||
#include "zscript/actors/shared/randomspawner.zs"
|
#include "zscript/actors/shared/randomspawner.zs"
|
||||||
#include "zscript/actors/shared/dynlights.zs"
|
#include "zscript/actors/shared/dynlights.zs"
|
||||||
#include "zscript/actors/shared/lightprobe.zs"
|
#include "zscript/actors/shared/staticlights.zs"
|
||||||
|
|
||||||
#include "zscript/actors/doom/doomplayer.zs"
|
#include "zscript/actors/doom/doomplayer.zs"
|
||||||
#include "zscript/actors/doom/possessed.zs"
|
#include "zscript/actors/doom/possessed.zs"
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
class LightProbe : Actor native
|
|
||||||
{
|
|
||||||
States
|
|
||||||
{
|
|
||||||
Spawn:
|
|
||||||
LPRO A 0;
|
|
||||||
Stop;
|
|
||||||
}
|
|
||||||
}
|
|
31
wadsrc/static/zscript/actors/shared/staticlights.zs
Normal file
31
wadsrc/static/zscript/actors/shared/staticlights.zs
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
// Light probes provide ZDRay points of light to sample lighting data from.
|
||||||
|
// Will despawn from the world as they serve no purpose at runtime.
|
||||||
|
// Currently used to light Actor sprites.
|
||||||
|
|
||||||
|
class LightProbe : Actor native
|
||||||
|
{
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
LPRO A 0;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dummy Actors used to hold UDMF keys that ZDRay will parse lighting data from.
|
||||||
|
// These will simply despawn from the world at map start, as they serve no purpose at runtime.
|
||||||
|
// Currently only covers the basic point and spot lights.
|
||||||
|
// Lightmaps currently do not animate, so the various animated lights (pulsating, flickering etc) are skipped for now.
|
||||||
|
|
||||||
|
class StaticLightBase : Actor
|
||||||
|
{
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
TNT1 A 0;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PointLightStatic : StaticLightBase {}
|
||||||
|
class SpotLightStatic : StaticLightBase {}
|
Loading…
Reference in a new issue