From 6f014d0972502524e70f0b9e77c6478912451dd9 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Fri, 27 Nov 2026 21:25:24 -0600 Subject: [PATCH] fix(skills): shot_done names the projectile LOT, not the skill The shooting gallery script compares shot_done with its super charge cannon ball's LOT (6297 for GF; skill 249 launches it, skill 228 the normal ball 1822). Also give the count of projectiles still in the air, the script's cannonball group. Co-Authored-By: Claude Opus 5.5 --- dGame/dComponents/SkillComponent.cpp | 3 ++- dGame/dComponents/SkillComponent.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dGame/dComponents/SkillComponent.cpp b/dGame/dComponents/SkillComponent.cpp index cacb10df8..9eb125e0f 100644 --- a/dGame/dComponents/SkillComponent.cpp +++ b/dGame/dComponents/SkillComponent.cpp @@ -198,7 +198,8 @@ void SkillComponent::SyncPlayerProjectile(const LWOOBJID projectileId, RakNet::B this->m_managedProjectiles.erase(this->m_managedProjectiles.begin() + index); GameMessages::ActivityNotify notify; - notify.notification.Insert(u"shot_done", sync_entry.skillId); + // The projectile's LOT: sg_cannon.lua compares it with its super charge cannon ball (6297) + notify.notification.Insert(u"shot_done", sync_entry.lot); m_Parent->OnActivityNotify(notify); } diff --git a/dGame/dComponents/SkillComponent.h b/dGame/dComponents/SkillComponent.h index 191874a0a..3977b22ed 100644 --- a/dGame/dComponents/SkillComponent.h +++ b/dGame/dComponents/SkillComponent.h @@ -166,6 +166,10 @@ public: */ void RegisterPlayerProjectile(LWOOBJID projectileId, BehaviorContext* context, const BehaviorBranchContext& branch, LOT lot); + // The projectiles it launched that have not come back yet (a shooting gallery's cannon balls in the air: its + // "cannonball" group) + size_t GetManagedProjectileCount() const { return m_managedProjectiles.size(); } + /** * Wrapper for CalculateBehavior that mimics the call structure in scripts and helps reduce magic numbers * @param skillId the skill to cast