View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0003987 | Spring engine | General | public | 2013-09-01 16:27 | 2013-09-01 17:03 | ||||
Reporter | silentwings | ||||||||
Assigned To | Kloot | ||||||||
Priority | high | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 94.1.1+git | ||||||||
Target Version | Fixed in Version | 94.1.1+git | |||||||
Summary | 0003987: units seem to be given new unitIDs whenever they do damage in 94.1.1-1077 | ||||||||
Description | when units do damage they are apparently given a new unitID - i'm inferring this from the attackerID reported by UnitDamaged. coms attacking smth always returns attackerID -1, all other units i tested get a new ID each time and that just counts up from 0. i can't quite believe i haven't gone mad :S | ||||||||
Steps To Reproduce | use this gadget in a .sdd of ba 7.81 (or any other mod) with 94.1.1-1077. spawn smth and attack smth. watch the attackerID (echoed) just count up from 0, except if you use a com in which case it's always -1. function gadget:GetInfo() return { name = "UnitDamagedInfo", desc = "", author = "Bluestone", date = "", license = "", layer = 0, enabled = true -- loaded by default? } end if not gadgetHandler:IsSyncedCode() then return false end function gadget:UnitDamaged(unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, attackerID, attackerDefID, attackerTeam) Spring.Echo("UnitDamaged is " .. unitID .. " by " .. attackerID) end | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
Kloot (developer) 2013-09-01 16:35 |
you are missing the projectileID argument after weaponDefID |
silentwings (reporter) 2013-09-01 17:02 |
Oh, you are completely right. Sorry to be a nuisance with reopening, but the extra argument is missing in the basecontent gadget handler and this means attackerTeam (the final argument) will always return nil. |
Kloot (developer) 2013-09-01 17:03 |
Just noticed that, thanks. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2013-09-01 16:27 | silentwings | New Issue | |
2013-09-01 16:35 | Kloot | Note Added: 0011521 | |
2013-09-01 16:36 | Kloot | Status | new => closed |
2013-09-01 16:36 | Kloot | Assigned To | => Kloot |
2013-09-01 16:36 | Kloot | Resolution | open => no change required |
2013-09-01 17:02 | silentwings | Note Added: 0011522 | |
2013-09-01 17:02 | silentwings | Status | closed => feedback |
2013-09-01 17:02 | silentwings | Resolution | no change required => reopened |
2013-09-01 17:03 | Kloot | Note Added: 0011523 | |
2013-09-01 17:03 | Kloot | Status | feedback => resolved |
2013-09-01 17:03 | Kloot | Fixed in Version | => 94.1.1+git |
2013-09-01 17:03 | Kloot | Resolution | reopened => fixed |