View Issue Details

IDProjectCategoryView StatusLast Update
0003341Spring engineLuapublic2017-09-24 19:12
ReporterJools Assigned TojK  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version91.0 
Summary0003341: Explosion() not called in water
DescriptionThe function gadget:Explosion(weaponDefID, posx, posy, posz, ownerID) call-in is not called when something hits water.
Steps To Reproducemake a a gadget with the following call-in:

function gadget:Explosion(weaponDefID, posx, posy, posz, ownerID)
Spring.Echo("Exlosion called for",weaponDefID)
end

And shoot something in water.
Tagswater
Attached Files
callintest.lua (Attachment missing)
Checked infolog.txt for Errors

Activities

jK

2012-11-24 05:40

developer   ~0009370

you need to register the weapondefs you want to trigger such a callin (performance reasons)
http://springrts.com/wiki/Lua_System
-> Script.SetWatchWeapon

Jools

2012-11-24 12:19

reporter   ~0009371

Last edited: 2012-11-24 12:39

Maybe I was unclear: according to the wiki, SetWatchWeapon is required only for the ProjectileDestroyed and ProjectileCreated callins. However, I have set all weapons to be watched. The issue is when something hits water. maybe I should have set reproducability to sometimes then.

I attached a gadget that tests the issue easily. Just fire something in water and then on land and you will see the issue. In water I get the ProjectileDestroyed callin, but not the Explosion one.

user744

2012-11-24 20:37

  ~0009374

that gadget works and prints stuff on explosions in water, too.
though when testing it in my mod i had to remove one of my gadgets that too uses gadget:Explosion(), guess it eats the event. (maybe based on return value, didnt test)
if its about xta then maybe fx_watersplash.lua uses the callin too.

Jools

2012-11-25 11:47

reporter   ~0009384

Yes, that's exactly the reason. Now how do I close this?

Issue History

Date Modified Username Field Change
2012-11-24 00:16 Jools New Issue
2012-11-24 05:40 jK Note Added: 0009370
2012-11-24 05:40 jK Status new => closed
2012-11-24 05:40 jK Assigned To => jK
2012-11-24 05:40 jK Resolution open => no change required
2012-11-24 12:19 Jools Note Added: 0009371
2012-11-24 12:19 Jools Status closed => feedback
2012-11-24 12:19 Jools Resolution no change required => reopened
2012-11-24 12:29 Jools Tag Attached: callins
2012-11-24 12:29 Jools Tag Attached: water
2012-11-24 12:33 Jools File Added: callintest.lua
2012-11-24 12:39 Jools Note Edited: 0009371
2012-11-24 20:37 user744 Note Added: 0009374
2012-11-25 11:47 Jools Note Added: 0009384
2012-11-25 11:47 Jools Status feedback => assigned
2012-11-25 12:11 jK Status assigned => resolved
2012-11-25 12:11 jK Resolution reopened => no change required
2017-09-24 19:12 Kloot Tag Detached: callins