Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Thanks for the suggestions! Very good call actually.
I'm a beginner scripter so I still get some ideas wrong :D Some of the things also seem to be a relic of the initial testing days.
Also good point with the AGL/ATL, I'll test it and I'll try to fix it ASAP because I can see how it could be causing problems.
Another improvement I can suggest is that when you want to find if a string exists in an array of strings, use find instead of findIf.
I noticed that you convert the hmd/weapon item names to lower case. All item class names have the correct case corresponding to their config name, so converting the case is not really necessary.
But if you still want to do it that way, it's perfectly fine.
Since you've already converted the item class names to lower case when you get the compatible ones (fnc_getCompatibleNVGs.sqf), simply use:
Another thing I'd like to mention is that the == operator performs non-case-sensitive comparison between strings. So
"HeLLo" == "hello"
So even if you were using array findIf {_x == "someString"}, the case wouldn't matter at all. (but like I said, always try to use find where possible, because it uses binary comparison and it's several times faster)
when you want case-sensitive comparison, use isEqualTo.
Yes, but it requires the developers to keep the same case in their compat config as the addon creator
> Another thing I'd like to mention is that the == operator performs non-case-sensitive comparison between strings.
Oh, that's cool, I wasn't aware of that.
> always try to use find where possible, because it uses binary comparison and it's several times faster)
Will it return the index of it though? If so, I'm more than happy to put it in!
Also thanks for all the above - I've updated the mod and the ASL positioning is in the release 0.2.1
Of course. Their purpose is the same. In fact, find is even older. findIf was implemented so that it could do things that find can't. (albeit, in a slower way)
https://community.bistudio.com/wiki/find
https://community.bistudio.com/wiki/findIf
simply put, findIf is always executing a code (what you put in { }) for each element and evaluates its return, so it is slower.
> Yes, but it requires the developers to keep the same case in their compat config as the addon creator
If you simply copy their config classes, you don't have to worry about it anymore. They will always be the same. But as I mentioned, it doesn't matter since you already convert all class names to lower case. So all's good here! :)
anyway, what I wrote above:
Anyways, I'll try to implement it in the next update, these are excellent thoughts!
I was reading the mod description when I noticed the issues:
1 - Laggy in vehicles, potential fix in the pipeline
2 - NVG Illuminator offset vector is not being rotated with the head
1 - To fix the first problem, consider using the visual variant of positions (visual means render time):
https://community.bistudio.com/wiki/modelToWorldVisualWorld
setPosASL can be problematic with visual coordinates. Consider using setPosWorld instead. (it is also in ASL format, although slightly different)
https://community.bistudio.com/wiki/setPosWorld
2 - The second problem can be fixed with some vector math:
For example, the head mounted one is fixed as follows:
Thanks bud, it will save me some headache.