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 fnc_isNight #356

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rekterakathom
Copy link
Contributor

When merged this pull request will: Utilise getLighting to check if it's night

  1. Describe what this pull request will do

Utilise getLighting so the night check is based off of the amount of light instead of a soundcontroller. This might be an important distinction in cases where the night is really bright, due to midnight sun or the full moon.

~65 is the approximate light level where AI uses nightvision. Tested on Stratis (2035/07/06 YYYY/MM/DD) with vanilla AI.

  1. Each change in a separate line
  • Switch getEnvSoundController to getLighting

Switch to getLighting so the night check is based on light levels instead of sound controller
@rekterakathom rekterakathom changed the title Update isNight Update fnc_isNight Jul 2, 2023
@nk3nny
Copy link
Owner

nk3nny commented Oct 21, 2023

Hmm. Testing indicated that units on headless clients may have problems. HC reports different value for getLighting.

It is possible to use getLightingAt, but that is actually slower than getEnvSoundController .

https://community.bistudio.com/wiki/getLightingAt

@rekterakathom
Copy link
Contributor Author

rekterakathom commented Oct 23, 2023

Hmm. Testing indicated that units on headless clients may have problems. HC reports different value for getLighting.

It is possible to use getLightingAt, but that is actually slower than getEnvSoundController .

https://community.bistudio.com/wiki/getLightingAt

Does it work on dedi servers? If it does, then this sounds like a HC bug

@nk3nny
Copy link
Owner

nk3nny commented Oct 23, 2023

Tested on dedicated server environment. Both server and HC had units spawned on it.

I'll give it another test in a 'live' mission too.

@nk3nny
Copy link
Owner

nk3nny commented Oct 23, 2023

Server reported correct values. Only HC struggled. Wonder if there is some silliness about the location of the HC too.

@diwako
Copy link
Collaborator

diwako commented Oct 24, 2023

location about the hc unit should only affect update rates iirc. can always bother dedmen in the arma discord.

@jokoho48
Copy link
Collaborator

jokoho48 commented Oct 25, 2023

location about the hc unit should only affect update rates iirc. can always bother dedmen in the arma discord.

this is a "global" value getter not a local one. so I expect that there is some issue related to how HCs are handled. this should be reported to to BI/dedmen

@rekterakathom
Copy link
Contributor Author

rekterakathom commented Jan 14, 2024

Feedback tracker ticket: https://feedback.bistudio.com/T178396

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants