Minor fixes for ScriptAggregator
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
96cbd594a0
commit
33f796eff8
|
@ -8,15 +8,15 @@
|
||||||
namespace CreatureLib::Battling {
|
namespace CreatureLib::Battling {
|
||||||
class ScriptAggregator {
|
class ScriptAggregator {
|
||||||
const ScriptWrapper *_scripts;
|
const ScriptWrapper *_scripts;
|
||||||
size_t _size;
|
i32 _size;
|
||||||
size_t _index = 0;
|
i32 _index = 0;
|
||||||
size_t _setIndex = 0;
|
i32 _setIndex = 0;
|
||||||
|
|
||||||
inline void IncrementToNextNotNull(bool initialIncrement = true) {
|
inline void IncrementToNextNotNull(bool initialIncrement = true) {
|
||||||
if (_scripts[_index].IsSet()) {
|
if (_scripts[_index].IsSet()) {
|
||||||
_setIndex++;
|
_setIndex++;
|
||||||
if (_setIndex >= _scripts[_index].GetScriptSet()->Count()) {
|
if (_setIndex >= (i32) _scripts[_index].GetScriptSet()->Count()) {
|
||||||
_setIndex = 0;
|
_setIndex = -1;
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue