From 134715353ea98cd92f027c0434f5b2b5a1f2eaf1 Mon Sep 17 00:00:00 2001 From: Try Date: Tue, 7 Mar 2023 20:35:27 +0100 Subject: [PATCH] extra validation for global-effect parameters #421 --- game/game/globaleffects.cpp | 41 ++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/game/game/globaleffects.cpp b/game/game/globaleffects.cpp index 0c24f205a..ee5dab04a 100644 --- a/game/game/globaleffects.cpp +++ b/game/game/globaleffects.cpp @@ -1,11 +1,14 @@ #include "globaleffects.h" +#include #include #include "world/objects/globalfx.h" #include "world/world.h" #include "graphics/visualfx.h" +using namespace Tempest; + GlobalEffects::GlobalEffects(World& owner):owner(owner){ } @@ -123,8 +126,14 @@ GlobalFx GlobalEffects::create(std::string_view what, const std::string* argv, s GlobalFx GlobalEffects::addSlowTime(const std::string* argv, size_t argc) { double val[2] = {1,1}; - for(size_t i=0; i