View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0003841 | Spring engine | Lua | public | 2013-06-12 03:53 | 2013-06-12 10:01 | ||||
Reporter | zwzsg | ||||||||
Assigned To | jK | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 94.1 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0003841: AddUnitDamage broken | ||||||||
Description | Spring.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 Reproduce | If Spring.AddUnitDamage is triggered by gadget:UnitPreDamaged, don't forget to work around gadget:UnitPreDamaged compatibility break first. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
zwzsg (reporter) 2013-06-12 04:03 |
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 (administrator) 2013-06-12 04:24 |
infolog.txt would answer many questions (engine version used, possible lua errors, game used, ...) |
zwzsg (reporter) 2013-06-12 04:49 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? |
2013-06-12 04:53 |
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 (reporter) 2013-06-12 05:09 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? |
![]() |
|||
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 |
|
Note Added: 0010860 | |
2013-06-12 05:09 | zwzsg | Note Added: 0010861 | |
2013-06-12 05:14 | zwzsg | Note Edited: 0010859 | View Revisions |
2013-06-12 05:15 | zwzsg | File Added: AddUnitDamage.sd7 | |
2013-06-12 05:16 | zwzsg | Note Edited: 0010861 | View Revisions |
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 |