- DrawShield,
- ShieldPreDamaged,
- AllowWeaponTargetCheck,
- AllowWeaponTarget,
- AllowWeaponInterceptTarget,
- StockpileChanged
Kloot wrote: units are no longer automatically zombified on death, this is now Lua territory
Moderator: Moderators
Kloot wrote: units are no longer automatically zombified on death, this is now Lua territory
Do you mean that in spring 100 it is already 1-based? should we fix script for 100 engine too?hokomoko wrote:{Set,Get}UnitPieceCollisionVolumeData will now receive 1-based piece index argument (was 0-based until 100.0)
I will ask this question: What are the reasoning and motivation behind this change?hokomoko wrote:{Set,Get}UnitPieceCollisionVolumeData will now receive 1-based piece index argument (was 0-based until 100.0)
Didn't read closely but it looks the dyn col vol gadget is getting its pieceIDs from a Get* call, and then using them in the Set* call. So since the same change affects both calls, I suspect no change is needed there.jamerlan wrote:should we fix script for 100 engine too?
In lua, arrays (and everything else, including Springs own conventions, except a few rogue examples such as this one) start counting at 1.What are the reasoning and motivation behind this change?
get method is not used, only localized http://imolarpg.dyndns.org/trac/balates ... me.lua#L18Silentwings wrote:Didn't read closely but it looks the dyn col vol gadget is getting its pieceIDs from a Get* call, and then using them in the Set* call. So since the same change affects both calls, I suspect no change is needed there.
No, only for >= 101.should we fix script for 100 engine too?
You don't have to use a hardcoded pieceNumber.smoth wrote:I am rather curious as to who is using a hard coded piecenumber
Silentwings wrote:http://imolarpg.dyndns.org/trac/balates ... e.lua#L117, http://imolarpg.dyndns.org/trac/balates ... e.lua#L131, etc.
Hopefully looking at those lines makes it clear what change will need to be applied.
I have a question about this: wouldn't it be easier too just use:function widgetHandler:UnitDestroyed(unitID, unitDefID, unitTeam, _, _, _, preEvent)
-- uncomment to maintain backward compatibility
-- if (not preEvent) then return end
Code: Select all
-- if (preEvent) then return end
BeastyBoy wrote:Commit makin', commit commit makin'
Super lua, lua breakin'
Commit makin', commit commit makin'
Super lua, lua breakin'
Any code that assumes id's are still valid for some time after UnitDestroyed might break.What's the downside?
That's not what he meant I think.Kloot wrote:Any code that assumes id's are still valid for some time after UnitDestroyed might break.What's the downside?