#2067 closed enhancement (fixed)
[PATCH] P-51 Mustang improvements
Reported by: | scythetwirler | Owned by: | peter |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 14 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
Prevented sinking into water. Kills the plane upon contact with water. Allows one unit to be garrisoned inside. Adds pitch and roll. Made the plane repairable (and not healable). Made the landing look more realistic.
Attachments (2)
Change History (12)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Discussed on IRC with sanderd17.
Patch does not implement the second bullet. Removes the extraneous SinkDepth. Disallows ungarrisoning in midair or when the plane is moving. (credits to sanderd17 for allowGarrisoning patch)
by , 11 years ago
Attachment: | mustang.patch added |
---|
comment:4 by , 11 years ago
Thanks for the patch. :)
I changed allowGarrisoning
to a sparse array and IsGarrisoningAllowed
to just do this.allowGarrisoning.every(function (x) x)
.
Sorry I forgot to credit you guys in the commit message. :/
comment:5 by , 11 years ago
Keywords: | review removed |
---|
comment:6 by , 11 years ago
As the ids are strings, and not integers, transforming it to a sparse array doesn't work. So I will fix that again to a normal object (the key gets added, but isn't found with the .every function).
Besides, sparse arrays are dangerous for performance as sometimes it can happen the interpreter handles it as a dense array (thus looping over all members). While objects are always handled as sparse, so don't cause those issues.
comment:8 by , 11 years ago
It looks good, but there are still two problems:
- plane can disappear out of the map;
- plane does not sink if you let it move over the water before it flies (let it start and soon after press stop, it moves forward on land and water without flying).
comment:9 by , 11 years ago
Thanks, fabio! Fixed your second bullet. However, I'm not quite sure how to go about the plane disappearing off the map problem (planes could have already gone off the map before landing was implemented).
Some comments: