CScriptWater: Make private const data internally linked

Same behavior, but allows completely hiding it from external view and
also allows making the data constexpr.
This commit is contained in:
Lioncash 2020-04-06 05:42:13 -04:00
parent c9e8b3366d
commit 41c2ede092
2 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,7 @@
#include "Runtime/World/CScriptWater.hpp"
#include <array>
#include "Runtime/CSimplePool.hpp"
#include "Runtime/CStateManager.hpp"
#include "Runtime/GameGlobalObjects.hpp"
@ -11,8 +13,9 @@
#include "TCastTo.hpp" // Generated file, do not modify include path
namespace urde {
const float CScriptWater::kSplashScales[6] = {1.0f, 3.0f, 0.709f, 1.19f, 0.709f, 1.f};
constexpr std::array kSplashScales{
1.0f, 3.0f, 0.709f, 1.19f, 0.709f, 1.f,
};
CScriptWater::CScriptWater(
CStateManager& mgr, TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CVector3f& pos,

View File

@ -20,7 +20,6 @@ class CDamageInfo;
class CFluidUVMotion;
class CScriptWater : public CScriptTrigger {
static const float kSplashScales[6];
zeus::CFrustum x150_frustum;
std::unique_ptr<CFluidPlaneCPU> x1b4_fluidPlane;
zeus::CVector3f x1b8_positionMorphed;