安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题
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.