Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include the projectile in the OnMissileIntercepted callback #6601

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/snippets/other.6601
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- (#6601) Expanded an AI related callback for when TML missiles are intercepted by TMD
2 changes: 1 addition & 1 deletion lua/sim/Projectile.lua
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also update the definition in the unit class to include the additional parameter.

Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Projectile = ClassProjectile(ProjectileMethods, DebugProjectileComponent) {
-- callbacks for launcher to have an idea what is going on for AIs
local launcher = self.Launcher
if not IsDestroyed(launcher) then
launcher:OnMissileIntercepted(self:GetCurrentTargetPosition(), instigator, self:GetPosition())
launcher:OnMissileIntercepted(self:GetCurrentTargetPosition(), instigator, self:GetPosition(), self)

-- keep track of the number of intercepted missiles
if not IsDestroyed(instigator) and instigator.GetStat then
Expand Down
Loading