-
Notifications
You must be signed in to change notification settings - Fork 739
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
Disablable NameTags Module option #1204
Conversation
@@ -24,4 +26,6 @@ GVAR(ShowNamesTime) = -10; | |||
|
|||
|
|||
// Draw handle | |||
addMissionEventHandler ["Draw3D", {_this call FUNC(onDraw3d);}]; | |||
if (GVAR(showPlayerNames) > 0 || GVAR(showVehicleCrewInfo)) then { | |||
addMissionEventHandler ["Draw3D", {_this call FUNC(onDraw3d);}]; |
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.
If the GVAR(showPlayerNames) is initially zero and you turn it on later, they won't draw due to draw3d eh not being installed.
You need to monitor the "SettingsChanged" EH to check for that happening and add remove the Draw3D event accordingly. Check viewdistance for a possible implementation.
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.
Will do.
Will add EHs tomorrow. |
Conflicts: addons/nametags/ACE_Settings.hpp
class showPlayerNames { | ||
displayName = "$STR_ACE_NameTags_ShowPlayerNames"; | ||
description = "$STR_ACE_NameTags_ShowPlayerNames_Desc"; | ||
typeName = "SCALAR"; |
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.
should be number
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.
Good catch:
typeName = "NUMBER" in modules equals typeName = "SCALAR" for variables
BIS consistency
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.
Already fixed, will push with the rest of the stuff, thanks a lot @Glowbal for telling me this!
#BIS' fault
If all is good, this is done. |
}; | ||
|
||
// Set the EH which waits for a setting to be changed, so that the effect is shown immediately | ||
if (!GVAR(showPlayerNamesForce)) then { |
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.
This is not guaranteed to be set to the correct most up to date value on clients and JIP. Maybe make it so this if statement is inside the settingChanged
EH?
Same goes for the lines 27/29.
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.
That can only be changed in module/userconfig though.
The idea why it isn't inside SettingChanged
is so that EH doesn't get installed at all, as if showPlayerNamesForce
is enabled clients can't set it anyways.
What would you recommend for lines 27-29?
EDIT: 6774739 would solve it, I'd just throw entire thing under there.
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.
@esteldunedain is working on the init thingy, was decided to leave as is for now.
…D handling, Some strings cleanup
Is there anything else I should be doing on this? |
Nah, hold on until that settings pr is merged. |
Sounds good. |
@esteldunedain What's up with settings PR in relation to this? Been over a week now. |
@jonpas, I just merged it. Sorry, I've been Witchering the whole week. |
Thanks, happy Witchering! |
Conflicts: addons/nametags/ACE_Settings.hpp addons/nametags/XEH_postInit.sqf addons/nametags/functions/fnc_onDraw3d.sqf addons/nametags/stringtable.xml
@esteldunedain This should be good to go. Tested, works well with loading up disabled/enabled and all that. |
Any further info on approval of this? |
Disablable NameTags Module option
Sorry, I had forgotten. My Witchering was interrupted by a bad flu and a fat pile of work, so I'm playing catchup atm. Please give it a quick test on master to ensure everything is still working as it should. Thank you very much |
Works good on my side, thanks for the merge and get healthy! |
Thanks man |
Because it's not there I guess. 😁
Let me know if I messed something up, my first ACE Settings/Modules job!
SettingsChanged
EH