Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unit_carrier_drone crash & issues with incorrect drone type if carrier is morphed #75

Merged
merged 3 commits into from
Jul 26, 2014

Conversation

xponen
Copy link
Contributor

@xponen xponen commented Jul 26, 2014

The following commit first fix unit_carrier_drones.lua crashing if commander finish morphing while drone is building,

Then fixed a case where... if a carrier morph into another carrier with different drone_def , then the new drone_def will be overwritten by old carrier's drone_def. This mean, if Funnelweb morph into Armcarry, then Armcarry will be building battledrone and not seagull and the emit point will be wrong.

The fix is split into 3 commit for readability/better-history since this is a PR for 3 different tweak/fix at once.

Instead of unit_morph.lua call unit_carrier_drones.lua to inform about morph, unit_carrier_drones.lua will wait for UnitDestroyed() event (like Jump gadget do) to check for morph.

The reason for this change is because previous method require back-and-forth communication, while in later method unit_carrier_drones.lua only check morph info from unit_morph.lua once. Later method felt more self-contained.
…carrier, then it might have unexpected type of drone".

This is because, when a carrier (especially a commander) morph into another carrier, the gadget will just copy paste drone_definition of old carrier into new carrier. This meant the drone_definition designed for the new carrier will be lost.
Histidine91 added a commit that referenced this pull request Jul 26, 2014
Fix unit_carrier_drone crash & issues with incorrect drone type if carrier is morphed
@Histidine91 Histidine91 merged commit 28ede7a into ZeroK-RTS:master Jul 26, 2014
@xponen xponen mentioned this pull request Aug 2, 2014
@xponen xponen deleted the carrier_drone_crash branch August 16, 2014 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants