View Issue Details

IDProjectCategoryView StatusLast Update
0005824Spring engineLuapublic2018-02-01 18:04
Reportersprung Assigned ToKloot  
PrioritylowSeverityfeatureReproducibilityN/A
Status closedResolutionno change required 
Product Version104.0 +git 
Summary0005824: Delayed damage interface
DescriptionAt high (distanceToExplosion / explosionSpeed), units are not damaged immediately but added to a container for later (see https://github.com/spring/spring/blob/develop/rts/Game/GameHelper.cpp#L150 )

The specific problem I want to tackle is https://github.com/EvolutionRTS/Evolution-RTS/issues/57 - Lua unit replacement (eg morph) "forgets" those damages.

I would like an interface but don't know what it should be. Probably either of:
 * a Lua callout to read that container
 * a Lua callin when the damage fails to apply ( https://github.com/spring/spring/blob/develop/rts/Game/GameHelper.cpp#L69 )
 * a mechanics change where the explosion does not "tag" units once but has an actual moving shockwave if (radius > (expSpeed * DIRECT_EXPLOSION_DAMAGE_SPEED_SCALE)) - sounds unlikely for perf reasons
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

sprung

2017-10-30 23:58

reporter   ~0018586

* additional parameter with the damages table in UnitDestroyed? Probably not since the container has no random access by unitID.

Kloot

2017-10-31 01:07

developer   ~0018587

Last edited: 2017-10-31 01:10

Spring.GetWaitingDamage(unitID) -> table params combined with Spring.AddWaitingDamage(unitID, table params) would be the natural solution.

Kloot

2018-02-01 18:04

developer   ~0018763

afaics the (only major) use-case for this has melted away now that ID-persistent morphs are possible.

the suggested callouts could still be added, but demand will have to rise before I'll consider it again.

Issue History

Date Modified Username Field Change
2017-10-30 23:53 sprung New Issue
2017-10-30 23:58 sprung Note Added: 0018586
2017-10-31 01:07 Kloot Note Added: 0018587
2017-10-31 01:10 Kloot Note Edited: 0018587
2018-02-01 18:04 Kloot Assigned To => Kloot
2018-02-01 18:04 Kloot Status new => closed
2018-02-01 18:04 Kloot Resolution open => no change required
2018-02-01 18:04 Kloot Note Added: 0018763