2025-07-22 06:40 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004233Spring engineUnit Scriptingpublic2013-12-29 12:32
ReporterFLOZi 
Assigned ToKloot 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version95.0 
Target VersionFixed in Version 
Summary0004233: Transported aircraft becomes (magically) unattached and takes damage from transport despite allowUnitCollisionDamage = false
DescriptionI can't be sure this is entirely an engine issue, though I have done my best to eliminate any issues game side. The game is particularly lua-heavy and disabling lua rules is not really an option for testing as the situation to replicate is entirely bound up in the game mechanics.

All units in MCL are delivered by transports, this works fine for ground units and 'gunship' aircraft, but regular aircraft somehow come 'unattached' before they should (when dropship decelerates when landing) and take damage. UnitPreDamaged reports a weaponDefID of -3 meaning unit-unit collision damage, but Modrules.lua has allowUnitCollisionDamage = false (which is the default anyway)

In short there are 2 questions;

1. Why do the aircraft become unattached when they should not?

2. Why do they take unit collision damage when it is disabled?
Steps To Reproduce1. Get MCL - currently not on rapid, but SVN only, apologies for the inconvenience:

svn://svn.code.sf.net/p/mwspring/code/

2. Start a game on a supported map http://sourceforge.net/p/mwspring/code/HEAD/tree/maps/flagConfig/ (I suggest Koom Valley v2 http://springfiles.com/spring/spring-maps/koom-valley )

3. Select the Drop Zone unit on your starting beacon (ring of blinky lights)

4. Click the 'aero' button in the menu, then click the buildpic for IS_sparrowhawk, then click "Submit Order" button. After 20 seconds (edit http://sourceforge.net/p/mwspring/code/HEAD/tree/LuaRules/Gadgets/unit_purchasing.lua#l42 if you want to reduce for testing) dropship will be spawned and fall towards your drop zone

5. Just after there is the "ROCKET FULL BURN NOW!" "GEAR DEPLOYING..." message the vtol unit will come unattached and start to take damage.
Additional InformationThe un-attachment is most likely triggered by applying negative gravity to the transport:

http://sourceforge.net/p/mwspring/code/HEAD/tree/scripts/Dropship_FX.lua#l197

There's a UnitPreDamaged call at:

http://sourceforge.net/p/mwspring/code/HEAD/tree/LuaRules/Gadgets/game_radar.lua#l119

If you need it for testing
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0012519

FLOZi (reporter)

Last edited: 2013-12-29 03:11

View 3 revisions

By 'unattached' I mean the transport drops / unloads the passenger.

Forgot to mention:

The transports themselves are spawned by lua, moved to a great height and given a downwards velocity via MoveCtrl then decelerated by -ve gravity as previously stated.

Video here: https://www.dropbox.com/s/dnn5hzr4oz9t0bq/3%20-%20Dropship%20Delivery.wmv Takes you through ordering system but it should be fairly self explanatory

~0012520

abma (administrator)

fyi: the transporter (with aircraft loaded) is movectrl'ed.
+Notes

-Issue History
Date Modified Username Field Change
2013-12-29 02:47 FLOZi New Issue
2013-12-29 02:59 FLOZi Note Added: 0012519
2013-12-29 03:02 abma Summary Transported aircraft becomes unattached and takes damage from transport despite allowUnitCollisionDamage = false => unloaded aircraft takes damage from transport despite allowUnitCollisionDamage = false
2013-12-29 03:04 abma Summary unloaded aircraft takes damage from transport despite allowUnitCollisionDamage = false => Transported aircraft becomes (magically) unattached and takes damage from transport despite allowUnitCollisionDamage = false
2013-12-29 03:06 abma Note Added: 0012520
2013-12-29 03:07 FLOZi Note Edited: 0012519 View Revisions
2013-12-29 03:11 FLOZi Note Edited: 0012519 View Revisions
2013-12-29 12:32 Kloot Changeset attached => spring release d4df37ef
2013-12-29 12:32 Kloot Assigned To => Kloot
2013-12-29 12:32 Kloot Status new => resolved
2013-12-29 12:32 Kloot Resolution open => fixed
+Issue History