CScriptSpecialFunction: Make use of std::array where applicable

Same behavior, stronger typing.
This commit is contained in:
Lioncash 2020-04-12 11:58:05 -04:00
parent beaccf4f9e
commit dfa206eda9
1 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,7 @@
#include "Runtime/World/CScriptSpecialFunction.hpp"
#include <array>
#include "Runtime/CGameState.hpp"
#include "Runtime/CMemoryCardSys.hpp"
#include "Runtime/CSimplePool.hpp"
@ -125,8 +127,11 @@ void CScriptSpecialFunction::Think(float dt, CStateManager& mgr) {
break;
}
}
static const ERumbleFxId fxTranslation[6] = {ERumbleFxId::Twenty, ERumbleFxId::One, ERumbleFxId::TwentyOne,
ERumbleFxId::TwentyTwo, ERumbleFxId::TwentyThree, ERumbleFxId::Zero};
constexpr std::array fxTranslation{
ERumbleFxId::Twenty, ERumbleFxId::One, ERumbleFxId::TwentyOne,
ERumbleFxId::TwentyTwo, ERumbleFxId::TwentyThree, ERumbleFxId::Zero,
};
void CScriptSpecialFunction::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) {
if (GetActive() && msg == EScriptObjectMessage::Deactivate && xe8_function == ESpecialFunction::Billboard) {