mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-06-05 06:33:28 +00:00
CWarWasp: Make use of std::array where applicable
Same behavior, no array to pointer decay.
This commit is contained in:
parent
cb857bd737
commit
f74471f603
@ -1,5 +1,7 @@
|
||||
#include "Runtime/MP1/World/CWarWasp.hpp"
|
||||
|
||||
#include <array>
|
||||
|
||||
#include "Runtime/CSimplePool.hpp"
|
||||
#include "Runtime/GameGlobalObjects.hpp"
|
||||
#include "Runtime/Character/CCharLayoutInfo.hpp"
|
||||
@ -883,9 +885,9 @@ float CWarWasp::GetTeamZStratum(s32 team) const {
|
||||
return 0.f;
|
||||
}
|
||||
|
||||
static const float Table[] = {0.4f, 0.6f, 1.f};
|
||||
|
||||
float CWarWasp::CalcSeekMagnitude(const CStateManager& mgr) const {
|
||||
static constexpr std::array Table{0.4f, 0.6f, 1.f};
|
||||
|
||||
const float ret = ((x708_circleAttackTeam >= 0 && x708_circleAttackTeam < 3) ? Table[x708_circleAttackTeam] : 1.f) * 0.9f;
|
||||
if (TCastToConstPtr<CTeamAiMgr> aimgr = mgr.GetObjectById(x674_aiMgr)) {
|
||||
if (aimgr->IsPartOfTeam(GetUniqueId())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user