2025-08-01 18:23 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005102Spring engineGeneralpublic2016-02-24 11:08
Reporterjamerlan 
Assigned Tohokomoko 
PriorityhighSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version100.0+git 
Target VersionFixed in Version 
Summary0005102: wreckages after self-d - strange behaviour
DescriptionAfter self-d wreckages are not destroyed. Also when you blow a commander - blow don't destroy wreckages too.

for latest dev spring version (2f89d03): https://youtu.be/wpN7-5NEvNA

if I compile spring version: e365726 (6 days ago) - then all OK:
https://youtu.be/_aNGoVJ1Gsw

probably this commit introduced this: https://github.com/spring/spring/commit/4785bdcc9298b564d20e22c918889f57ee8748fc


If this change is intended - please give a hint to game devs: how to keep old behaviour
Steps To Reproduceself-d units
Additional InformationBalanced Annihilation test-4892
(I guess BA 9.34 is suitable too)
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0015841

Kloot (developer)

see changelog: the return value of Killed is now used to determine wreck level.

in http://imolarpg.dyndns.org/trac/balatest/browser/trunk/scripts/armmex.bos there are three "return (0)"'s, which means all those cases will leave the default wreck. what you want is to return the value of corpsetype.

~0015842

jamerlan (reporter)

why it was changed?

the documentation said that second parameter is used for corpse type:
https://springrts.com/wiki/Animation-CobCallins

Killed(severity, corpsetype) ....
Corpsetype basically indicates the number of times the unit and its corpses are destroyed; for example, corpsetype = 3 acts as if the unit is destroyed, the corpse is destroyed, and the corpse's corpse is destroyed. If it runs out of corpses nothing is left behind. Set corpsetype to the desired value.

so for armmex - corpsetype was used correctly.

Looks like this change will force game devs to change all unit scripts => a lot of work

~0015843

Kloot (developer)

Last edited: 2016-02-22 15:05

View 2 revisions

because 1) the assign-to-corpsetype way is inherited from OTA and 2) doesn't work when the Killed function contains sleep commands (== takes more than one tick to finish): it was already necessary to use return statements in that case. a single method is more consistent, less confusing, and cleaner.

~0015844

jamerlan (reporter)

let's estimate amount of work required:
~ 234 scripts for BA and around 700+ scripts for techa

are you sure that this change is required?

~0015845

jamerlan (reporter)

Beherith will probably save us with magic script

~0015846

Kloot (developer)

"are you sure that this change is required?"

Is any change ever required? ;)

You obviously shouldn't do it by hand, but write a script that replaces each instance of "return *" in all Killed's by "return corpsetype". Let me know if you need help with that.

~0015853

Jools (reporter)

I though we had a feature freeze this close to release, this is a thing that affects a lot of unit scripts, I think in XTA we have about 750, as well, of which the bos versions of some have become lost.

Even if done by a script, some 750 scripts still need to be compiled. I haven't looked if the "return (0)" is unique to the killed part, but even if it is, you usually should check before doing a mass replace anyway. Is there not a better way to solve 0004085 with?

~0015854

silentwings (reporter)

You could pm behe and ask to borrow his script.

~0015855

hokomoko (developer)

https://github.com/spring/spring/commit/48bbcd799d2e5c01806b105d1fedf0d23285d962

This fixes the cob files directly, fixing the bos files should be easier to implement

tell me if you encounter any issues.

~0015862

jamerlan (reporter)

is it possible to print which script creates errors like that?
[f=0035629] Error: CobError: Unknown get constant 0 (params = 0 0 0 0)

~0015863

hokomoko (developer)

is this relevant to the current issue or just a general feature request?

~0015876

jamerlan (reporter)

in scope of fixing current issue we changed MANY scripts (400+) and during test games - we had this error spam in console. I will try to investigate which unit gives this..

but if this info is available in context of error message - then engine could help to game devs by printing unit name
+Notes

-Issue History
Date Modified Username Field Change
2016-02-22 12:38 jamerlan New Issue
2016-02-22 12:38 jamerlan File Added: infolog.txt
2016-02-22 12:53 Kloot Note Added: 0015841
2016-02-22 14:47 jamerlan Note Added: 0015842
2016-02-22 15:03 Kloot Note Added: 0015843
2016-02-22 15:05 Kloot Note Edited: 0015843 View Revisions
2016-02-22 15:55 jamerlan Note Added: 0015844
2016-02-22 16:24 jamerlan Note Added: 0015845
2016-02-22 16:31 Kloot Note Added: 0015846
2016-02-22 21:51 Jools Note Added: 0015853
2016-02-22 22:06 silentwings Note Added: 0015854
2016-02-23 12:37 hokomoko Note Added: 0015855
2016-02-23 12:38 hokomoko Assigned To => hokomoko
2016-02-23 12:38 hokomoko Status new => feedback
2016-02-23 20:31 jamerlan Note Added: 0015862
2016-02-23 20:31 jamerlan Status feedback => assigned
2016-02-23 21:16 hokomoko Note Added: 0015863
2016-02-24 09:45 jamerlan Note Added: 0015876
2016-02-24 11:08 hokomoko Changeset attached => spring develop 48bbcd79
2016-02-24 11:08 hokomoko Changeset attached => spring develop a5cd4ba0
2016-02-24 11:08 hokomoko Status assigned => resolved
2016-02-24 11:08 hokomoko Resolution open => fixed
+Issue History