From abaee625827deb3b6b956d72d93c6181d378d5cf Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 30 Oct 2021 17:12:39 +0200 Subject: [PATCH] Dont allow changing weight and height of Pokemon if its const --- .../TypeRegistry/Battling/RegisterPokemonClass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp index 139b6d2..0ffce0d 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterPokemonClass.cpp @@ -108,10 +108,10 @@ void RegisterPokemonClass::RegisterPokemonType(asIScriptEngine* engine) { REGISTER_GETTER("Pokemon", "float get_Weight() const property", CreatureLib::Battling::Creature, GetWeight); REGISTER_GETTER("Pokemon", "float get_Height() const property", CreatureLib::Battling::Creature, GetHeight); - auto r = engine->RegisterObjectMethod("Pokemon", "void set_Weight(float value) const property", + auto r = engine->RegisterObjectMethod("Pokemon", "void set_Weight(float value) property", asMETHOD(PkmnLib::Battling::Pokemon, SetWeight), asCALL_THISCALL); Ensure(r >= 0); - r = engine->RegisterObjectMethod("Pokemon", "void set_Height(float value) const property", + r = engine->RegisterObjectMethod("Pokemon", "void set_Height(float value) property", asMETHOD(PkmnLib::Battling::Pokemon, SetHeight), asCALL_THISCALL); Ensure(r >= 0);