Implement fogball class

This commit is contained in:
nashmuhandes 2023-09-10 14:27:41 +08:00 committed by Magnus Norddahl
commit 054ca24328
5 changed files with 72 additions and 0 deletions

View file

@ -861,6 +861,7 @@ set (PCH_SOURCES
playsim/mapthinkers/dsectoreffect.cpp
playsim/a_pickups.cpp
playsim/a_action.cpp
playsim/a_fogball.cpp
playsim/a_decals.cpp
playsim/a_dynlight.cpp
playsim/a_flashfader.cpp

30
src/playsim/a_fogball.cpp Normal file
View file

@ -0,0 +1,30 @@
/*
** Volumetric fog spheres AKA fogballs
** Copyright (c) 2023 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_fogball.h"
IMPLEMENT_CLASS(AFogball, false, false)
void AFogball::Tick()
{
Super::Tick();
}

32
src/playsim/a_fogball.h Normal file
View file

@ -0,0 +1,32 @@
/*
** Volumetric fog spheres AKA fogballs
** Copyright (c) 2023 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.
*/
#pragma once
#include "actor.h"
class AFogball : public AActor
{
DECLARE_CLASS(AFogball, AActor)
public:
void Tick();
};

View file

@ -95,6 +95,7 @@ version "4.12"
#include "zscript/actors/shared/randomspawner.zs"
#include "zscript/actors/shared/dynlights.zs"
#include "zscript/actors/shared/corona.zs"
#include "zscript/actors/shared/fogball.zs"
#include "zscript/actors/doom/doomplayer.zs"
#include "zscript/actors/doom/possessed.zs"

View file

@ -0,0 +1,8 @@
class Fogball : Actor native
{
Default
{
RenderRadius 128.0;
+NOINTERACTION
}
}