Skip to content

Commit

Permalink
SpellsLvl10: Use std::array
Browse files Browse the repository at this point in the history
  • Loading branch information
dscharrer committed Aug 27, 2021
1 parent dc44c0e commit 59c991c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game/magic/spells/SpellsLvl10.cpp
Expand Up @@ -229,7 +229,7 @@ void ControlTargetSpell::Launch() {

pathways[0] = eSrc + Vec3f(0.f, 100.f, 0.f);
pathways[9] = eTarget;
Split(pathways, 0, 9, 150);
Split(pathways.data(), 0, 9, 150);

for(int i = 0; i < 9; i++) {
if(pathways[i].y >= eSrc.y + 150) {
Expand Down
3 changes: 2 additions & 1 deletion src/game/magic/spells/SpellsLvl10.h
Expand Up @@ -20,6 +20,7 @@
#ifndef ARX_GAME_MAGIC_SPELLS_SPELLSLVL10_H
#define ARX_GAME_MAGIC_SPELLS_SPELLSLVL10_H

#include <array>
#include <memory>

#include "game/magic/Spell.h"
Expand Down Expand Up @@ -62,7 +63,7 @@ class ControlTargetSpell final : public SpellBase {
Vec3f eSrc;
Vec3f eTarget;
TextureContainer * tex_mm;
Vec3f pathways[40];
std::array<Vec3f, 10> pathways;
float fTrail;

};
Expand Down

0 comments on commit 59c991c

Please sign in to comment.