|
16 | 16 |
|
17 | 17 | -- Localized Spring API for performance |
18 | 18 | local spGetUnitDefID = Spring.GetUnitDefID |
19 | | -local spGetUnitIsStunned = Spring.GetUnitIsStunned |
| 19 | +local utGetIsUnitEmped = Spring.Utilities.GetIsUnitEmped |
20 | 20 | local spGetGameFrame = Spring.GetGameFrame |
21 | 21 | local spGetUnitRulesParam = Spring.GetUnitRulesParam |
22 | 22 |
|
@@ -580,8 +580,7 @@ function widget:GameFrame(n) |
580 | 580 | if n % UPDATE_RATE == 0 then |
581 | 581 | for unitID, index in pairs(paralyzedDrawUnitVBOTable.instanceIDtoIndex) do |
582 | 582 | if Spring.ValidUnitID(unitID) then |
583 | | - local _, stunned = spGetUnitIsStunned(unitID) |
584 | | - local para = stunned and 1 |
| 583 | + local para = utGetIsUnitEmped(unitID) and 1 |
585 | 584 | local disarmed = (spGetUnitRulesParam(unitID, "disarmed") == 1) and 1 |
586 | 585 | local slow = spGetUnitRulesParam(unitID, "slowState") |
587 | 586 | local fire = (spGetUnitRulesParam(unitID, "on_fire") == 1) |
@@ -654,7 +653,7 @@ function widget:UnitCreated(unitID, unitDefID) |
654 | 653 | if not uniformSet[unitID] then |
655 | 654 | gl.SetUnitBufferUniforms(unitID, uniformcache, 4) |
656 | 655 | end |
657 | | - local _, stunned = spGetUnitIsStunned(unitID) |
| 656 | + local stunned = utGetIsUnitEmped(unitID) |
658 | 657 | local disarmed = spGetUnitRulesParam(unitID, "disarmed") |
659 | 658 | local slow = spGetUnitRulesParam(unitID, "slowState") |
660 | 659 | local fire = (spGetUnitRulesParam(unitID, "on_fire") == 1) |
|
0 commit comments