mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- added UDMF properties for spotlights (args have all been used up for dynlights)
This commit is contained in:
parent
79440d7014
commit
7f7c720883
4 changed files with 58 additions and 0 deletions
|
@ -371,6 +371,8 @@ struct FMapThing
|
|||
int16_t roll;
|
||||
uint32_t RenderStyle;
|
||||
int FloatbobPhase;
|
||||
double SpotInnerAngle;
|
||||
double SpotOuterAngle;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@
|
|||
#include "a_morph.h"
|
||||
#include "events.h"
|
||||
#include "actorinlines.h"
|
||||
#include "a_dynlight.h"
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
|
@ -6001,6 +6002,8 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// spawn it
|
||||
double sz;
|
||||
|
||||
|
@ -6087,6 +6090,14 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
|||
mobj->fillcolor = (mthing->fillcolor & 0xffffff) | (ColorMatcher.Pick((mthing->fillcolor & 0xff0000) >> 16,
|
||||
(mthing->fillcolor & 0xff00) >> 8, (mthing->fillcolor & 0xff)) << 24);
|
||||
|
||||
if (i->IsDescendantOf(RUNTIME_CLASS(ADynamicLight)))
|
||||
{
|
||||
if (mthing->SpotInnerAngle != 0)
|
||||
((ADynamicLight*)mobj)->SpotInnerAngle = mthing->SpotInnerAngle;
|
||||
if (mthing->SpotOuterAngle != 0)
|
||||
((ADynamicLight*)mobj)->SpotOuterAngle = mthing->SpotOuterAngle;
|
||||
}
|
||||
|
||||
mobj->CallBeginPlay ();
|
||||
if (!(mobj->ObjectFlags & OF_EuthanizeMe))
|
||||
{
|
||||
|
|
|
@ -109,6 +109,11 @@ DoomEdNums
|
|||
9832 = PointLightFlickerAttenuated
|
||||
9833 = SectorPointLightAttenuated
|
||||
9834 = PointLightFlickerRandomAttenuated
|
||||
9840 = SpotLight
|
||||
9841 = SpotLightPulse
|
||||
9842 = SpotLightFlicker
|
||||
9843 = SectorSpotLight
|
||||
9844 = SpotLightFlickerRandom
|
||||
9982 = SecActEyesAboveC
|
||||
9983 = SecActEyesBelowC
|
||||
9988 = CustomSprite
|
||||
|
|
|
@ -205,6 +205,46 @@ class PointLightFlickerRandomAttenuated :PointLightFlickerRandom
|
|||
}
|
||||
}
|
||||
|
||||
class SpotLight : DynamicLight
|
||||
{
|
||||
Default
|
||||
{
|
||||
DynamicLight.Type "Point";
|
||||
+DYNAMICLIGHT.SPOT
|
||||
}
|
||||
}
|
||||
|
||||
class SpotLightPulse : SpotLight
|
||||
{
|
||||
Default
|
||||
{
|
||||
DynamicLight.Type "Pulse";
|
||||
}
|
||||
}
|
||||
|
||||
class SpotLightFlicker : SpotLight
|
||||
{
|
||||
Default
|
||||
{
|
||||
DynamicLight.Type "Flicker";
|
||||
}
|
||||
}
|
||||
|
||||
class SectorSpotLight : SpotLight
|
||||
{
|
||||
Default
|
||||
{
|
||||
DynamicLight.Type "Sector";
|
||||
}
|
||||
}
|
||||
|
||||
class SpotLightFlickerRandom : SpotLight
|
||||
{
|
||||
Default
|
||||
{
|
||||
DynamicLight.Type "RandomFlicker";
|
||||
}
|
||||
}
|
||||
|
||||
class VavoomLight : DynamicLight
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue