2025-07-20 17:12 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002558Spring engineUnit Scriptingpublic2011-07-14 22:14
ReporterFLOZi 
Assigned ToKloot 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version0.82.7+git 
Target VersionFixed in Version0.82.7+git 
Summary0002558: UnitLoaded callin is called when unit is Unloaded
DescriptionTo be more precise, the UnitLoaded event and therefore lua callin, is called whenever AttachUnit is called in the transports script.

This is slightly problematic as often in a transport script, when a unit is picked up it is attached to the fictitious '-1' piece so that the unit is hidden. However when dropping, the unit is attached to another piece which is moved by the script to the drop point given to it by the engine. Another example is a transport with an open bay; passengers are often attached to their own 'seat' piece within the model, then re attached to the loading arm when they are being unloaded.
Additional InformationI believe it would be preferable from a game dev PoV if this was corrected. As a bonus it would allow fixing http://springrts.com/mantis/view.php?id=2127 more easily via a gadget.

Furthermore, DetachUnit is always called when AttachUnit is. If possible this would ideally be avoided when attaching to another piece *on the same transport*. This is at least partly responsible for http://springrts.com/mantis/view.php?id=1836

I'm willing to attempt to tackle this myself, but I'll need to talk to someone about the best implementation (and if avoiding Detatch when re-attaching is plausible)
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0007032

FLOZi (reporter)

Additional note; despite the version field, this has been the case since at least the two other reports mentioned. Most likely it has always been the case since lua callins were introduced.

~0007034

Kloot (developer)

If you want to test: f204c7c6032fb2d53593bc9a88d806f115f45101 (should cover both points)
+Notes

-Issue History
Date Modified Username Field Change
2011-07-14 20:52 FLOZi New Issue
2011-07-14 20:52 FLOZi Graphics Card => unknown
2011-07-14 20:56 FLOZi Note Added: 0007032
2011-07-14 22:03 Kloot Status new => assigned
2011-07-14 22:14 Kloot Note Added: 0007034
2011-07-14 22:14 Kloot Status assigned => resolved
2011-07-14 22:14 Kloot Fixed in Version => 0.82.7+git
2011-07-14 22:14 Kloot Resolution open => fixed
2011-07-14 22:14 Kloot Assigned To => Kloot
+Issue History