mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +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(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
|
||||
xx(Amount)
|
||||
xx(Text)
|
||||
|
|
|
@ -752,6 +752,14 @@ public:
|
|||
th->friendlyseeblocks = CheckInt(key);
|
||||
break;
|
||||
|
||||
case NAME_Lightcolor:
|
||||
case NAME_lightintensity:
|
||||
case NAME_lightdistance:
|
||||
case NAME_lightinnerangle:
|
||||
case NAME_lightouterangle:
|
||||
CHECK_N(Zd | Zdt)
|
||||
break;
|
||||
|
||||
default:
|
||||
CHECK_N(Zd | Zdt)
|
||||
if (0 == strnicmp("user_", key.GetChars(), 5))
|
||||
|
@ -1122,6 +1130,12 @@ public:
|
|||
ld->healthgroup = CheckInt(key);
|
||||
break;
|
||||
|
||||
case NAME_Lightcolor:
|
||||
case NAME_lightintensity:
|
||||
case NAME_lightdistance:
|
||||
CHECK_N(Zd | Zdt)
|
||||
break;
|
||||
|
||||
default:
|
||||
if (strnicmp("user_", key.GetChars(), 5))
|
||||
DPrintf(DMSG_WARNING, "Unknown UDMF linedef key %s\n", key.GetChars());
|
||||
|
@ -1947,7 +1961,16 @@ public:
|
|||
case NAME_Health3DGroup:
|
||||
sec->health3dgroup = CheckInt(key);
|
||||
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:
|
||||
if (strnicmp("user_", key.GetChars(), 5))
|
||||
DPrintf(DMSG_WARNING, "Unknown UDMF sector key %s\n", key.GetChars());
|
||||
|
|
|
@ -137,6 +137,8 @@ DoomEdNums
|
|||
9873 = SectorSpotLightAttenuated
|
||||
9874 = SpotLightFlickerRandomAttenuated
|
||||
9875 = LightProbe
|
||||
9876 = PointLightStatic
|
||||
9881 = SpotLightStatic
|
||||
9982 = SecActEyesAboveC
|
||||
9983 = SecActEyesBelowC
|
||||
9988 = CustomSprite
|
||||
|
|
|
@ -90,7 +90,7 @@ version "4.6"
|
|||
#include "zscript/actors/shared/fastprojectile.zs"
|
||||
#include "zscript/actors/shared/randomspawner.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/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