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

Repair - Add support for RHS optic hitpoints #8347

Merged
merged 4 commits into from
Oct 13, 2021

Conversation

LinkIsGrim
Copy link
Contributor

@LinkIsGrim LinkIsGrim commented Aug 2, 2021

When merged this pull request will:

I've not done extensive testing on this, but it does fix the issue for the Bradleys at least.

Update fnc_addRepairActions to include hitpoints that influence turret view
@LinkIsGrim LinkIsGrim marked this pull request as draft August 2, 2021 00:50
This whole function is a nightmare but there's no better way to do this. Side effects may include unnecessary hitpoints being shown.
@LinkIsGrim
Copy link
Contributor Author

Side effects may include unnecessary hitpoints being shown when the vehicle is damaged through irregular means (basically anything using setDamage and affecting all hitpoints). This mostly manifests in the RHS M1126 having 7 commander periscope hitpoints, but at least they're all in the correct position, and those hitpoint don't seem to be damaged through regular gameplay.

I'm not sure if there's any cleaner way to implement this. Making patches using config-based hitpoint groups would be ideal, but would be more work for the compats. Other option would be to lock these "weird" hitpoints behind a client setting that determines whether they're shown or not.

@LinkIsGrim LinkIsGrim marked this pull request as ready for review August 2, 2021 03:04
@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Aug 3, 2021
@PabstMirror PabstMirror added this to the 3.14.0 milestone Aug 3, 2021
@jonpas
Copy link
Member

jonpas commented Oct 12, 2021

Can you still override "repairable hitpoints" through the config API we have after this addition?

@LinkIsGrim
Copy link
Contributor Author

Can you still override "repairable hitpoints" through the config API we have after this addition?

Yes.

@jonpas
Copy link
Member

jonpas commented Oct 12, 2021

Side effects may include unnecessary hitpoints being shown when the vehicle is damaged through irregular means

Then this can be solved on a per-case basis and this PR can be merged. We already had the same "issue" with glass and certain special parts in the past. I don't think it matters if there are a few more shown, at the end it's part of gameplay to know what to repair so you are combat-effective as soon as possible.

Copy link
Contributor

@PabstMirror PabstMirror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems to work well

@PabstMirror
Copy link
Contributor

it will always log these weird hitpoints, e.g.:

INFO: RHS_M2A3: hit_optics_dvr_dve no selection: using armorComponent Hit_Optics_Dvr_DVE
INFO: RHS_M2A3: hit_optics_dvr_rearcam no selection: using armorComponent Hit_Optics_Dvr_RearCam
INFO: RHS_M2A3: hit_optics_gnr no selection: using armorComponent Hit_Optics_Gnr
INFO: RHS_M2A3: hit_optics_cdr_civ no selection: using armorComponent Hit_Optics_Cdr_CIV
INFO: rhsusf_m1a1aimd_usarmy: armor_composite_40 no selection: using armorComponent Armor_CE_40
INFO: rhsusf_m1a1aimd_usarmy: armor_composite_50 no selection: using armorComponent Armor_CE_50
INFO: rhsusf_m1a1aimd_usarmy: armor_composite_60 no selection: using armorComponent Armor_CE_60
INFO: rhsusf_m1a1aimd_usarmy: armor_composite_80 no selection: using armorComponent Armor_CE_80
INFO: rhsusf_m1a1aimd_usarmy: armor_composite_85 no selection: using armorComponent Armor_CE_85
INFO: rhsusf_m1a1aimd_usarmy: hit_optic_driver no selection: using armorComponent Hit_Optic_Driver
INFO: rhsusf_m1a1aimd_usarmy: hit_optic_dvea no selection: using armorComponent Hit_Optic_DVEA
WARNING: [rhsusf_m1a1aimd_usarmy: hit_optic_dvea: Hit_Optic_DVEA] armorComponent does not exist?
INFO: rhsusf_m1a1aimd_usarmy: hit_optic_driver_rear no selection: using armorComponent Hit_Optic_Driver_Rear
INFO: rhsusf_m1a1aimd_usarmy: hit_gps_headmirror no selection: using armorComponent Hit_HeadMirror
INFO: rhsusf_m1a1aimd_usarmy: hit_gps_optical no selection: using armorComponent Hit_Optic_GPS
INFO: rhsusf_m1a1aimd_usarmy: hit_gps_tis no selection: using armorComponent Hit_Optic_GPS_TI
INFO: rhsusf_m1a1aimd_usarmy: hit_optic_gps no selection: using armorComponent -
WARNING: [rhsusf_m1a1aimd_usarmy: hit_optic_gps: -] armorComponent does not exist?
INFO: rhsusf_m1a1aimd_usarmy: hit_optic_gps_ti no selection: using armorComponent -
WARNING: [rhsusf_m1a1aimd_usarmy: hit_optic_gps_ti: -] armorComponent does not exist?
INFO: rhsusf_m1a1aimd_usarmy: hit_optic_comperiscope no selection: using armorComponent Hit_Optic_ComPeriscope
INFO: rhsusf_m1a1aimd_usarmy: hit_optic_comm2 no selection: using armorComponent Hit_Optic_ComM2
INFO: rhsusf_m1a1aimd_usarmy: hit_optic_comcwss no selection: using armorComponent Hit_Optic_ComCWSS
WARNING: [rhsusf_m1a1aimd_usarmy: hit_optic_comcwss: Hit_Optic_ComCWSS] armorComponent does not exist?
INFO: B_MBT_01_cannon_F: hitcomgun no selection: using armorComponent hit_com_gun
WARNING: [B_MBT_01_cannon_F: hitcomgun: hit_com_gun] armorComponent does not exist?

so if something does go wrong on a vic we should be able to tell from the logs

@PabstMirror PabstMirror merged commit 095fe2b into acemod:master Oct 13, 2021
AndreasBrostrom pushed a commit to AndreasBrostrom/ACE3 that referenced this pull request Dec 3, 2021
* Potential fix for acemod#8304

Update fnc_addRepairActions to include hitpoints that influence turret view

* Support for the RHS Stryker hitpoints

This whole function is a nightmare but there's no better way to do this. Side effects may include unnecessary hitpoints being shown.

* Style pass

* whoops
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RHS Compat - Bradley IFV lacks repair points for optics
3 participants