2021-04-23 11:01 CEST

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0006407Spring engineLuapublic2020-07-14 20:15
Assigned ToKloot 
Product Version104.0 +git 
Target VersionFixed in Version104.0 +git 
Summary0006407: Deleted projectile can still hit a target
DescriptionI have a weapon, that detects if target is within 500 elmos, deletes projectile and replaces with 'shotgun'. However, if target is too close, it gets hit by original projectile... even if I move that projectile and detonate it: https://i.imgur.com/3cQ2QWn.png

note the same explosion type in both places
vs what should happen

I presumed it was just that the projectile hit before it was replaced, but that doesn't seem to be the case as I can move the original one, or detonate it at the muzzle with SetProjectileCollide, and still the target receives the explosion.

Tested on 104.0 and 104-1510.
Steps To ReproduceUsing MCL:

/give fs_hollander<tab>
/give brv 1 (should be very close by)

You may wish to toggle the lasers off on the hollander.
Additional InformationRelevant gadget code: https://github.com/SpringMCLegacy/SpringMCLegacy/blob/master/LuaRules/Gadgets/lups_projectiles.lua#L56

I also tried catching the damage with gadget:UnitPreDamaged and the explosion fx with gadget:Explosion using the deleted projectileID and neither seemed to work.

function gadget:Explosion(weaponDefID, px, py, pz, AttackerID, proID)
    if deleted[proID] then return true end

function gadget:UnitPreDamaged(unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, proID, attackerID, attackerDefID, attackerTeam)
    if deleted[proID] then return 0 else return damage end
TagsNo tags attached.
Checked infolog.txt for ErrorsIrrelevant
Attached Files




FLOZi (reporter)

I have a potential workaround for MCL (Use the 'shotgun' weapon and replace with the long range HE shell if target is further than 500 or add another 19 shotgun pellets if it isn't) but this seemed like unexpected behaviour.


Anonymous (viewer)

Fix 7378275c77aabb0a45972108dfbdeca063e47cd2 committed to develop branch: fix 0006407, repo: spring changeset id: 37926


Anonymous (viewer)

Fix 9f505631acfa709c0e84b3b74e224d632f51903a committed to maintenance branch: fix 0006407, repo: spring changeset id: 37928

+Related Changesets

-Issue History
Date Modified Username Field Change
2020-07-13 17:44 FLOZi New Issue
2020-07-13 17:46 FLOZi Note Added: 0020465
2020-07-14 20:14 Changeset attached => spring develop 7378275c
2020-07-14 20:14 Anonymous Note Added: 0020468
2020-07-14 20:14 Changeset attached => spring maintenance 9f505631
2020-07-14 20:14 Anonymous Note Added: 0020469
2020-07-14 20:15 Kloot Assigned To => Kloot
2020-07-14 20:15 Kloot Status new => resolved
2020-07-14 20:15 Kloot Resolution open => fixed
2020-07-14 20:15 Kloot Fixed in Version => 104.0 +git
+Issue History