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

Update fn_SUP_CASRoutine.sqf #1948

Conversation

Rythoka
Copy link

@Rythoka Rythoka commented May 24, 2021

Fix HandleDamage event returning scriptHandlers when CAS plane is struck by bullets

What type of PR is this.

  1. Bug
  2. Change
  3. Enhancement

What have you changed and why?

Added a single nil line to the end of the HandleDamage EH to make sure the EH always returns Nothing, which is necessary for damage to be applied normally per https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage

Please specify which Issue this PR Resolves.

closes #1938

Please verify the following and ensure all checks are completed.

  1. Have you loaded the mission in LAN host?
  2. Have you loaded the mission on a dedicated server?

Is further testing or are further changes required?

  1. No
  2. Yes (Please provide further detail below.)

How can the changes be tested?

Steps:

  1. Spawn an empty ZSU-39 and get in
  2. Make ZSU-39 and units inside invincible (e.g. with Zeus)
  3. Spawn a CAS support onto the player's position
  4. When the CAS arrives, strike it with the ZSU-39's autocannon
  5. Check the CAS plane's health with Zeus

Current behavior: CAS plane is undamaged by autocannon
Fixed behavior: CAS plane takes damage


Notes:

Fix HandleDamage event returning scriptHandlers when CAS plane is struck by bullets
Copy link
Collaborator

@HakonRydland HakonRydland left a comment

Choose a reason for hiding this comment

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

while the wiki claims only when returning a numeric value would you overwrite damage, i would not be surprised if this is wrong.

one note, pls fix indentation of the nil, it should be one further in.

@Bob-Murphy Bob-Murphy added this to the 2.4.2 milestone May 24, 2021
@Bob-Murphy Bob-Murphy merged commit 79b06e5 into official-antistasi-community:vn-development May 24, 2021
@Rythoka Rythoka deleted the cas-bullet-damage-fix branch May 25, 2021 00:43
@Rythoka Rythoka mentioned this pull request May 25, 2021
7 tasks
Bob-Murphy added a commit that referenced this pull request May 26, 2021
## What type of PR is this.
1. [x] Bug
2. [ ] Change
3. [ ] Enhancement

### What have you changed and why?
Follow up to #1948. Same changes made in the HandleDamage EH in fn_SUP_ASFRoutine.sqf and fn_SUP_gunshipSpawn.sqf.
    

### Please specify which Issue this PR Resolves.
closes #1938

### Please verify the following and ensure all checks are completed.

1. [x] Have you loaded the mission in LAN host?
2. [ ] Have you loaded the mission on a dedicated server?

### Is further testing or are further changes required?
1. [x] No
2. [ ] Yes (Please provide further detail below.)

### How can the changes be tested?
Steps: 

********************************************************
Notes:
@Bob-Murphy Bob-Murphy added the Added to changelog Added to changelog label Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants