Make GetOwner angelscript func return a reference to the ref.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2021-10-30 00:19:24 +02:00
parent 475e2142c6
commit 0f6d538695
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ private:
FunctionInfo InitializeGetOwner(){
auto t = _type;
while (t != nullptr){
auto val = t->GetMethodByDecl("protected ref@ GetOwner()", false);
auto val = t->GetMethodByDecl("protected ref@& GetOwner()", false);
if (val != nullptr){
return FunctionInfo{.Exists = true, .Function = val};
}

View File

@ -7,7 +7,7 @@ void BasicScriptClass::Register(asIScriptEngine* engine) {
shared abstract class PkmnScript {
private ref@ __owner;
protected ref@ GetOwner() { return __owner; };
protected ref@& GetOwner() { return __owner; };
// CreatureLib methods
void OnInitialize(const narray<EffectParameter@>@ parameters){};