View Issue Details

IDProjectCategoryView StatusLast Update
0003841Spring engineLuapublic2013-06-12 10:01
Reporterzwzsg Assigned TojK  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version94.1 
Summary0003841: AddUnitDamage broken
DescriptionSpring.AddUnitDamage does not add damage anymore.

It worked in 91, it stopped working in 94.

I have code that does:
Spring.AddUnitDamage(d.unit, d.damage, 0, d.attacker)
Spring.Echo("Adding "..d.damage.." dmg to "..d.unit.." from "..d.attacker)

I checked the parameters: http://cpc.cx/7xU
As you see from tooltip, the red pointer got zero damage.
Steps To ReproduceIf Spring.AddUnitDamage is triggered by gadget:UnitPreDamaged, don't forget to work around gadget:UnitPreDamaged compatibility break first.
TagsNo tags attached.
Attached Files
AddUnitDamage.sd7 (Attachment missing)
Checked infolog.txt for Errors

Activities

zwzsg

2013-06-12 04:03

reporter   ~0010857

Other picture with the tooltip not cropped this time so you can see the pointer (26923) is healthy despite receiving AddUnitDamage: http://cpc.cx/7xV

abma

2013-06-12 04:24

administrator   ~0010858

infolog.txt would answer many questions (engine version used, possible lua errors, game used, ...)

zwzsg

2013-06-12 04:49

reporter   ~0010859

Last edited: 2013-06-12 05:14

I do not see how the infolog would help, but it's easier to give one than to argue, so: http://pastebin.ca/2396206

Kernel Panic 4.44 is Kernel Panic 4.4 with a few fixes, in particular the gadget:UnitPreDamaged parameter change, do you also need it? Maybe you need a demo file too? Or a specifically made tiny test mod showcasing the problem?

user744

2013-06-12 04:53

  ~0010860

my "mining gadget" also seems to be broken by this.
I tried to figure out the problem but did not manage.
(the gadget/game is too bloated so did not bother to make mantis. will see if can provide a simpler example...)

zwzsg

2013-06-12 05:09

reporter   ~0010861

Last edited: 2013-06-12 05:16

Here, I added a super simple test mod showcasing the problem:
http://springrts.com/mantis/file_download.php?file_id=2313&type=bug

Contains a gadget that do:
    function gadget:GameFrame()
        for _,u in ipairs(Spring.GetAllUnits()) do
            Spring.AddUnitDamage(u,1,0)
        end
    end

In Spring 91, the health of the start unit rapidly decrease.
In Spring 94, the health of the start unit does not change.

This game file is 300kb, the effect appears the as soon as the game starts, not even any ingame action is required to trigger it, the game is super simple so side-effects can be ruled out, hopefully that is enough?

Issue History

Date Modified Username Field Change
2013-06-12 03:53 zwzsg New Issue
2013-06-12 04:03 zwzsg Note Added: 0010857
2013-06-12 04:24 abma Note Added: 0010858
2013-06-12 04:49 zwzsg Note Added: 0010859
2013-06-12 04:53 user744 Note Added: 0010860
2013-06-12 05:09 zwzsg Note Added: 0010861
2013-06-12 05:14 zwzsg Note Edited: 0010859
2013-06-12 05:15 zwzsg File Added: AddUnitDamage.sd7
2013-06-12 05:16 zwzsg Note Edited: 0010861
2013-06-12 10:01 jK Changeset attached => spring develop 98b61e01
2013-06-12 10:01 jK Assigned To => jK
2013-06-12 10:01 jK Status new => resolved
2013-06-12 10:01 jK Resolution open => fixed