mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
Add light probe actor
This commit is contained in:
parent
8a2f445dd6
commit
d2b8f1aaff
8 changed files with 79 additions and 0 deletions
|
@ -976,6 +976,7 @@ set (PCH_SOURCES
|
||||||
r_data/colormaps.cpp
|
r_data/colormaps.cpp
|
||||||
r_data/gldefs.cpp
|
r_data/gldefs.cpp
|
||||||
r_data/a_dynlightdata.cpp
|
r_data/a_dynlightdata.cpp
|
||||||
|
r_data/a_lightprobe.cpp
|
||||||
r_data/r_translate.cpp
|
r_data/r_translate.cpp
|
||||||
r_data/sprites.cpp
|
r_data/sprites.cpp
|
||||||
r_data/portalgroups.cpp
|
r_data/portalgroups.cpp
|
||||||
|
|
|
@ -1078,6 +1078,7 @@ xx(SpotOuterAngle)
|
||||||
xx(lightflags)
|
xx(lightflags)
|
||||||
xx(lighttype)
|
xx(lighttype)
|
||||||
xx(InternalDynamicLight)
|
xx(InternalDynamicLight)
|
||||||
|
xx(LightProbe)
|
||||||
xx(_a_chase_default)
|
xx(_a_chase_default)
|
||||||
xx(MapMarker)
|
xx(MapMarker)
|
||||||
xx(Spawn2)
|
xx(Spawn2)
|
||||||
|
|
31
src/r_data/a_lightprobe.cpp
Normal file
31
src/r_data/a_lightprobe.cpp
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
/*
|
||||||
|
** Light Probe Actor
|
||||||
|
** Copyright (c) 2021 Nash Muhandes, Magnus Norddahl
|
||||||
|
**
|
||||||
|
** This software is provided 'as-is', without any express or implied
|
||||||
|
** warranty. In no event will the authors be held liable for any damages
|
||||||
|
** arising from the use of this software.
|
||||||
|
**
|
||||||
|
** Permission is granted to anyone to use this software for any purpose,
|
||||||
|
** including commercial applications, and to alter it and redistribute it
|
||||||
|
** freely, subject to the following restrictions:
|
||||||
|
**
|
||||||
|
** 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
** claim that you wrote the original software. If you use this software
|
||||||
|
** in a product, an acknowledgment in the product documentation would be
|
||||||
|
** appreciated but is not required.
|
||||||
|
** 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
** misrepresented as being the original software.
|
||||||
|
** 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "actor.h"
|
||||||
|
#include "a_lightprobe.h"
|
||||||
|
|
||||||
|
IMPLEMENT_CLASS(ALightProbe, false, false)
|
||||||
|
|
||||||
|
void ALightProbe::Tick()
|
||||||
|
{
|
||||||
|
Super::Tick();
|
||||||
|
}
|
35
src/r_data/a_lightprobe.h
Normal file
35
src/r_data/a_lightprobe.h
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
** Light Probe Actor
|
||||||
|
** Copyright (c) 2021 Nash Muhandes, Magnus Norddahl
|
||||||
|
**
|
||||||
|
** This software is provided 'as-is', without any express or implied
|
||||||
|
** warranty. In no event will the authors be held liable for any damages
|
||||||
|
** arising from the use of this software.
|
||||||
|
**
|
||||||
|
** Permission is granted to anyone to use this software for any purpose,
|
||||||
|
** including commercial applications, and to alter it and redistribute it
|
||||||
|
** freely, subject to the following restrictions:
|
||||||
|
**
|
||||||
|
** 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
** claim that you wrote the original software. If you use this software
|
||||||
|
** in a product, an acknowledgment in the product documentation would be
|
||||||
|
** appreciated but is not required.
|
||||||
|
** 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
** misrepresented as being the original software.
|
||||||
|
** 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __A_LIGHTPROBE_H__
|
||||||
|
#define __A_LIGHTPROBE_H__
|
||||||
|
|
||||||
|
class AActor;
|
||||||
|
|
||||||
|
class ALightProbe : public AActor
|
||||||
|
{
|
||||||
|
DECLARE_CLASS(ALightProbe, AActor)
|
||||||
|
|
||||||
|
public:
|
||||||
|
void Tick();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //__A_LIGHTPROBE_H__
|
|
@ -136,6 +136,7 @@ DoomEdNums
|
||||||
9872 = SpotLightFlickerAttenuated
|
9872 = SpotLightFlickerAttenuated
|
||||||
9873 = SectorSpotLightAttenuated
|
9873 = SectorSpotLightAttenuated
|
||||||
9874 = SpotLightFlickerRandomAttenuated
|
9874 = SpotLightFlickerRandomAttenuated
|
||||||
|
9875 = LightProbe
|
||||||
9982 = SecActEyesAboveC
|
9982 = SecActEyesAboveC
|
||||||
9983 = SecActEyesBelowC
|
9983 = SecActEyesBelowC
|
||||||
9988 = CustomSprite
|
9988 = CustomSprite
|
||||||
|
|
BIN
wadsrc/static/sprites/LPROA0.png
Normal file
BIN
wadsrc/static/sprites/LPROA0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
|
@ -90,6 +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/doom/doomplayer.zs"
|
#include "zscript/actors/doom/doomplayer.zs"
|
||||||
#include "zscript/actors/doom/possessed.zs"
|
#include "zscript/actors/doom/possessed.zs"
|
||||||
|
|
9
wadsrc/static/zscript/actors/shared/lightprobe.zs
Normal file
9
wadsrc/static/zscript/actors/shared/lightprobe.zs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
class LightProbe : Actor native
|
||||||
|
{
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
LPRO A -1 Bright;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue