View Issue Details

IDProjectCategoryView StatusLast Update
0003876Spring engineUnit Scriptingpublic2013-07-01 09:16
ReporterKingRaptor Assigned Tocleanrock  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version94.1.1+git 
Summary0003876: (94.1.1) Spring not obeying return value of script Killed() function
DescriptionWhen Killed() returns an integer within the range of the unit's corpse definitions, Spring ignores it and always creates the first corpse in the list. This means self-d, heavy overkill etc. leave the wrong corpse.

When Killed() returns an integer outside this range, no corpse is created (as expected).

This applies to both COB and LUS scripts.

Tested with 94.1.1-651-gc7f969f and 94.1.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

jK

2013-06-27 23:43

developer   ~0010943

example?

KingRaptor

2013-06-28 05:17

reporter   ~0010944

Last edited: 2013-06-28 09:53

/give and self-d any unit in ZK (except bombs), should return debris (visible as metal shards). Instead it drops the normal wreckage.

Can also be observed by massively overkilling a unit (e.g. armpw with corroach).

IIRC, BA scripts are set to return no feature on self-D, so this bug would be less obvious there.

cleanrock

2013-06-28 11:16

reporter   ~0010945

Looks like CFeatureHandler::CreateWreckage has been broken, probably by https://github.com/spring/spring/commit/89955d35f5a0c8.

The correct feature (fd var) is chosen by loop but the LoadFeature(params) call do not use it below. I guess params should be set to use the fd var some way.

jk, i give u some time to look at it before i make a shaky attempt to fix it :).

Issue History

Date Modified Username Field Change
2013-06-27 16:25 KingRaptor New Issue
2013-06-27 23:43 jK Note Added: 0010943
2013-06-28 05:17 KingRaptor Note Added: 0010944
2013-06-28 09:53 KingRaptor Note Edited: 0010944
2013-06-28 11:16 cleanrock Note Added: 0010945
2013-07-01 07:32 cleanrock Assigned To => cleanrock
2013-07-01 07:32 cleanrock Status new => assigned
2013-07-01 09:16 cleanrock Changeset attached => spring develop 46b8d301
2013-07-01 09:16 cleanrock Status assigned => resolved
2013-07-01 09:16 cleanrock Resolution open => fixed