-
-
Notifications
You must be signed in to change notification settings - Fork 97
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 of the legless cyborgs when leave transports #567
base: develop
Are you sure you want to change the base?
Fix of the legless cyborgs when leave transports #567
Conversation
and a new tag for enabling the old behavior, ideal for repair vehicles.
Nightly build for this pull request:
|
Omitted CanRepairCyborgLegs= tag from transport and cyborg legs were not reattached (1st image) Added CanRepairCyborgLegs=true tag to transport and cyborg legs were reattached (2nd image) Interestingly damaged spark anims of cyborg constantly play, even if inside a transport. |
Looks related to OpenTopped logic because standard transports doesn't show sparks. BUT from what I discovered in vanilla YR tests that "bug" is part of vanilla YR, not caused by this feature so we can consider that this " just works". |
…low-legless-repair-in-transports
This no longer requires testing as the sparking in transport due to opentopped is expected? I see some errors with merging? |
Works. 1 [General] globally enable or disable the repair of cyborgs inside the transport (default - repair works) 2 [InfantryType] (cyborg=yes) add a pair of keys that prohibit or allow the cyborg to be repaired inside any vehicle (default - repairable) 3 [VehicleType] add a key to a unit that can repair a cyborg/cyborgs (you can try adding an enumeration). in this case, this priority will be higher than priority 2. |
0fa5476
to
da80463
Compare
@FS-21 A friendly reminder to fix the issues. |
Regarding the code rewrite I made after the last review I explained in the hook "InfantryClass_PerCellProcess_CyborgLegsCheck" that the InfantryClass values of "SequenceAnim" and "Crawling" values will be reset before entering into transports (I don't know if is related to the limbo process or whathever) so I still needed to save the legless value of the cyborg in the variable pTechnoExt->IsLeggedCyborg. Also here is placed the transport check for overwriting this behaviour if needed. Lastly, in the unlimbo process (hook "FootClass_Unlimbo_LaserTrails") this value is checked for restoring the legs state. |
and removed unnecessary checks.
- It supports abductor logic and Tunels from Ares. - Removed internal tag.
…low-legless-repair-in-transports
One question, I missed something here or all feedback was addressed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I am not sure on the tag name, previously I thought it only applies to Transporter
. Maybe there should be some other tag name if it doesn't apply only to transporter? Like FixCyborgLegsWhenEntered
.
Also is the rest of the hooks except the Limbo
hook even necessary? I thought infantry goes limboed either way. Or did I miss something?
@FS-21 I adjsuted the tag name. Please verify if removing any other hooks other than the first one ( |
I checked and these 3 cases with cyborg infantry:
The problem I see is you have no idea if the cyborg entered into a structure, only transport vehicles ("Transporter") or there are more tags in the limboed infantry related to structures that can be checked in this hook? if not then "DEFINE_HOOK(0x52291A, InfantryClass_InfantryEnteredThing_Cyborg, 0x6)" is for garrison into structures and "DEFINE_HOOK(0x51A27F, InfantryClass_PerCellProcess_AresTunnel_Cyborg, 0xA)" for the Tunnels logic from Ares. |
I am not sure I understand what is he issue. All of those are TechnoClasses, so it should be irrelevant whether it enters a tunnel, a transport or whatever. You always have a TechnoTypeClass. |
I think you missed the point here: Transports & structures decide if legless cyborgs should be repairable if they enter, not vice-versa. |
Yeah but your hook in |
And a new tag for enabling the old behavior, ideal for repair vehicles.
In the vanilla YR game legless Cyborgs recover legs when leave transports.
Summary by CodeRabbit