From c11d72f8e00e417d21427e7ea7fd578d6d741d23 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Sun, 19 Mar 2023 18:11:57 +0100 Subject: [PATCH] fix shot script canShotHit() API function --- Aquaria/Shot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Aquaria/Shot.cpp b/Aquaria/Shot.cpp index 65ced22..bd5ed73 100644 --- a/Aquaria/Shot.cpp +++ b/Aquaria/Shot.cpp @@ -553,7 +553,7 @@ void Shot::targetDied(Entity *target) { debugLog("removing target from shot"); if(s->script) - s->script->call("targetDied", (*i), target); + s->script->call("targetDied", s, target); s->target = 0; } if (s->firer == target) @@ -579,7 +579,7 @@ bool Shot::canHit(Entity *e, Bone *b) if(!script) return true; // no script? always hit bool hit = true; - if(!script->call("canShotHit", e, b, &hit)) + if(!script->call("canShotHit", this, e, b, &hit)) return true; // script failed / doesn't have the function / returned nil? hit. return hit; // let script decide }