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

Attenuate - Add config value for attenuation between people inside and turned out #1187

Merged
merged 3 commits into from Mar 8, 2022

Conversation

Timi007
Copy link
Contributor

@Timi007 Timi007 commented Feb 11, 2022

When merged this pull request will:

  • Add config value for attenution between people inside and turned out in the same vehicle
  • Replace hardcoded 0.5 value with config value allowing modders to change it at will
  • Keep 0.5 * acreAttenuation as default
  • Try to make code more readable

I'm still uncertain if acreTurnedOutAttenuation is a good name. If you have a better name, I'm open to change it.

@Drofseh
Copy link
Contributor

Drofseh commented Feb 11, 2022

I might switch it to acreAttenuationTurnedOut and acreDefaultAttenuationTurnedOut

@jonpas jonpas added this to the 2.10.0 milestone Feb 14, 2022
/* Use this to determine the attenution between people inside and outside vehicles. */
/*
* acreAttenuation: Use this to determine the attenution between people inside and outside vehicles.
* acreAttenuationTurnedOut: Use this to determine the attenution between people inside (turned in) and turned out in a vehicle (refers to isTurnedOut command).
Copy link
Member

Choose a reason for hiding this comment

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

If I understand correctly, this is when both players are in the vehicle, one turned in, one turned out. If either of them is outside the vehicle, acreAttenuation gets used instead? In that case, turned out is still treated like he was outside the vehicle?

Copy link
Contributor Author

@Timi007 Timi007 Feb 14, 2022

Choose a reason for hiding this comment

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

Yes, this is for when a player is turned in and one is turned out (this was previously hardcoded to 0.5 * acreAttenuation). No, acreAttenuation is used for turned in players and outside players. If a player is turned out and one is outside, there is no acreAttenuation (acreAttenuation == 0).

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, yes that's what I meant. Good, just wanted to confirm logic didn't change for that.

Copy link
Member

@jonpas jonpas left a 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. @Timi007 has this been tested in a multiplayer environment?

@Timi007
Copy link
Contributor Author

Timi007 commented Feb 15, 2022

No. I will test it sometime this or next week.

@Timi007
Copy link
Contributor Author

Timi007 commented Feb 15, 2022

Tested it just now.

@jonpas jonpas merged commit 2004781 into IDI-Systems:master Mar 8, 2022
@Timi007 Timi007 deleted the turned_out_attenuation branch March 24, 2022 18:31
@jonpas jonpas changed the title Attenuate - Add config value for attenution between people inside and turned out Attenuate - Add config value for attenuation between people inside and turned out Apr 20, 2022
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.

None yet

3 participants