Merge branch 'master' into coldHeartedOrb

This commit is contained in:
Mike-MF 2023-09-22 18:20:38 +01:00
commit 459f884564
3801 changed files with 64293 additions and 27703 deletions

View File

@ -34,11 +34,11 @@ We welcome anyone to contribute to this repository. Issues that we are actively
## Pull Request process
When contributing to this repository, please first discuss the change you wish to make via issue or [Slack](https://slackin.ace3mod.com/) with the [ACE3 project maintainers](https://ace3mod.com/team.html) before making a change. This may not be necessary if you are contributing for something which has an existing issue in our repository already.
When contributing to this repository, please first discuss the change you wish to make via issue or [Discord](https://acemod.org/discord) with the [ACE3 project maintainers](https://ace3.acemod.org/team.html) before making a change. This may not be necessary if you are contributing for something which has an existing issue in our repository already.
1. Please make a pull request (PR) as early as possible. This lets use help you in the proces of developing it. When opening a work in progress pull request, mark your PR with a `WIP:` prefix.
2. Describe what this pull request will do and how it solves this in the description of your PR. A clear intent and description of the way the issue is resolved will help us to review the PR more efficiently.
3. Please follow our [Development Guidelines](https://ace3mod.com/wiki/development/).
3. Please follow our [Development Guidelines](https://ace3.acemod.org/wiki/development/).
### Notes
@ -47,4 +47,4 @@ Please note that all contributors to this project are volunteers and do this in
## Assistance with contributing
If you require assistance with contributing, check out the #dev channel on our [Slack](https://slackin.ace3mod.com/). Additional documentation can be found on our [Development wiki](https://ace3mod.com/wiki/development/).
If you require assistance with contributing, check out the #dev channel on our [Discord](https://acemod.org/discord). Additional documentation can be found on our [Development wiki](https://ace3.acemod.org/wiki/development/).

View File

@ -30,7 +30,7 @@ All good? Then proceed and fill out the items below.
A clear and concise description of what the bug is.
**Steps to reproduce:**
_Follow [https://ace3mod.com/img/wiki/user/issue_flowchart.png](this flowchart)!_
_Follow [https://ace3.acemod.org/img/wiki/user/issue_flowchart.webp](this flowchart)!_
1. _Go to ..._
2. _Click ..._

View File

@ -1,20 +0,0 @@
---
name: Enhancement request
about: Suggest an improvement for this project
title: ''
labels: kind/enhancement
assignees: ''
---
**Is your enhancement related to a problem?**
A clear and concise description of what the enhancement entails. Ex. [...] would improve user experience.
**Solution you'd like:**
A clear and concise description of what you want to happen.
**Alternatives you've considered:**
A clear and concise description of any alternative solutions or ideas you've considered.
**Additional context:**
Add any other context or screenshots about the enhancement here.

View File

@ -9,4 +9,4 @@ assignees: ''
### Do not post feature requests here!
Learn how to make a feature request [here](https://ace3mod.com/wiki/user/how-to-make-a-feature-request.html).
Learn how to make a feature request [here](https://ace3.acemod.org/wiki/user/how-to-make-a-feature-request.html).

View File

@ -1,6 +1,9 @@
**When merged this pull request will:**
- Describe what this pull request will do
- Each change in a separate line
- Include documentation if applicable
- Respect the [Development Guidelines](https://ace3mod.com/wiki/development/)
- Follow title standard `Component - Add|Fix|Improve|Change|Make|Remove bananas`
- _Describe what this pull request will do_
- _Each change in a separate line_
### IMPORTANT
- [ ] If the contribution affects [the documentation](https://github.com/acemod/ACE3/tree/master/docs), please include your changes in this pull request so the documentation will appear on the [website](https://ace3.acemod.org/).
- [ ] [Development Guidelines](https://ace3.acemod.org/wiki/development/) are read, understood and applied.
- [ ] Title of this PR uses our standard template `Component - Add|Fix|Improve|Change|Make|Remove {changes}`.

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Validate SQF
run: python3 tools/sqf_validator.py
- name: Validate Config
@ -22,12 +22,14 @@ jobs:
run: python3 tools/check_strings.py
- name: Check for BOM
uses: arma-actions/bom-check@master
- name: Validate function headers
run: python3 docs/tools/document_functions.py --debug
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Lint (sqflint)
uses: arma-actions/sqflint@master
continue-on-error: true # No failure due to many false-positives
@ -36,13 +38,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Build using HEMTT
uses: arma-actions/hemtt@master
with:
command: build --release --ci
uses: actions/checkout@v3
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt build
- name: Rename build folder
run: mv .hemttout/build .hemttout/@ace
- name: Upload Artifact
uses: actions/upload-artifact@v2-preview
uses: actions/upload-artifact@v3
with:
name: ace3-${{ github.sha }}-nobin
path: releases/ace3_*.zip
path: .hemttout/@*

View File

@ -4,13 +4,18 @@ on:
push:
branches:
- master
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Install Python packages
run: |
pip3 install wheel
@ -22,3 +27,59 @@ jobs:
env:
GH_TOKEN: ${{ secrets.DOCS_TOKEN }}
run: python3 tools/deploy.py
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Extract Dependencies
run: python3 tools/extract_dependencies.py --markdown
- name: Document Functions
run: python3 docs/tools/document_functions.py
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: docs/
destination: docs/_site/
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: jekyll-site
path: docs/_site/
retention-days: 1
deploy:
runs-on: ubuntu-latest
needs: [build]
environment:
name: netlify
url: ${{ steps.deployment.outputs.deploy-url }}
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: jekyll-site
path: _site/
- name: Deploy to Netlify
id: deployment
uses: nwtgck/actions-netlify@v2
with:
publish-dir: _site/
production-branch: master
production-deploy: true
deploy-message: ${{ github.event.head_commit.message }}
enable-pull-request-comment: false
enable-commit-comment: false
enable-commit-status: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1

View File

@ -7,14 +7,14 @@ on:
jobs:
build:
runs-on: ${{ matrix. os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- name: Checkout the source code
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Build
shell: cmd
run: |
@ -23,7 +23,7 @@ jobs:
cd build
cmake .. && cmake --build .
- name: Upload Artifact
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v3
with:
name: ace3_extensions-${{ matrix.os }}-debug
path: extensions/build

View File

@ -8,14 +8,14 @@ on:
jobs:
pboproject:
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Install Arma 3 Tools
uses: arma-actions/arma3-tools@master
with:
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
- name: Install Mikero Tools
uses: arma-actions/mikero-tools@2021-04-10
uses: arma-actions/mikero-tools@2023-01-04
- name: Download game data
run: |
Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip
@ -35,18 +35,18 @@ jobs:
RHSSAF_URL: ${{ secrets.RHSSAF_URL }}
RHSUSF_URL: ${{ secrets.RHSUSF_URL }}
- name: Checkout CBA A3
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: x\cba
ref: master
repository: CBATeam/CBA_A3.git
- name: Checkout ACE3
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: z\ace
persist-credentials: false
- name: Checkout pull request
uses: actions/checkout@v2
uses: actions/checkout@v3
if: ${{ github.event_name == 'pull_request_target' }}
with:
path: pullrequest
@ -56,13 +56,14 @@ jobs:
run: |
rm -r z\ace\addons\
rm -r z\ace\optionals\
rm -r z\ace\tools\pDummies\
xcopy /e /h /q pullrequest\addons z\ace\addons\
xcopy /e /h /q pullrequest\optionals z\ace\optionals\
xcopy /e /h /q pullrequest\tools\pDummies z\ace\tools\pDummies\
- name: Setup build environment
run: |
subst P: .
pboproject -P
xcopy /e /h /q z\ace\tools\pDummies\A3\ui_f_enoch a3\ui_f_enoch\
xcopy /e /h /q z\ace\tools\pDummies\gm gm\
xcopy /e /h /q z\ace\tools\pDummies\vn vn\
- name: Build
@ -70,13 +71,13 @@ jobs:
env:
PYTHONUNBUFFERED: 1
- name: Archive logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: logs
path: temp/*.log
- name: Archive @ace
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: '@ace3-${{ github.sha }}'
path: z\ace\release\@ace

1
.gitignore vendored
View File

@ -7,6 +7,7 @@ extensions/vcproj64/*
.vscode/*
hemtt
hemtt.exe
.hemttout
tools/temp
*.cache
*.pbo

View File

@ -0,0 +1,4 @@
let docs_readmes = ["README.zh-TW.md", "README_DE.md", "README_PL.md"];
for readme in docs_readmes {
HEMTT_VFS.join("docs").join(readme).move(HEMTT_VFS.join(readme));
}

View File

@ -0,0 +1,9 @@
let releases = HEMTT_RFS.join("releases");
let src = releases.join(HEMTT.project().prefix() + "-" + HEMTT.project().version().to_string() + ".zip");
let dst = releases.join(HEMTT.project().name().to_lower() + "_" + HEMTT.project().version().to_string_short() + ".zip");
print("Moving zip to " + dst);
if !src.move(dst) {
fatal("Failed to move " + src + " to " + dst);
}

View File

@ -0,0 +1,12 @@
let modcpp = HEMTT_VFS.join("mod.cpp").open_file().read();
modcpp.replace("0.0.0", HEMTT.project().version().to_string_short());
HEMTT_VFS.join("mod.cpp").create_file().write(modcpp);
print("mod.cpp version set");
let docs_readmes = ["README.zh-TW.md", "README_DE.md", "README_PL.md"];
for readme in docs_readmes {
let readmemd = HEMTT_VFS.join("docs").join(readme).open_file().read();
readmemd.replace("0.0.0", HEMTT.project().version().to_string_short());
HEMTT_VFS.join("docs").join(readme).create_file().write(readmemd);
print(readme + " version set");
}

46
.hemtt/project.toml Normal file
View File

@ -0,0 +1,46 @@
name = "ACE3"
prefix = "ace"
author = "ACE-Team"
mainprefix = "z"
[files]
include = [
"*.dll",
"*.so",
"mod.cpp",
"README*.md", # Translated READMEs get moved to root in a hook (virtual file system)
"AUTHORS.txt",
"LICENSE",
"logo_ace3_ca.paa",
"meta.cpp",
]
[version]
git_hash = 0
[asc]
enabled = true
exclude = [
"/initsettings.sqf",
"/initkeybinds.sqf",
"/xeh_prep.sqf",
"dev",
"medical_ai/statemachine.sqf",
"common/functions/fnc_dummy.sqf",
]
[hemtt.config]
preset = "Hemtt"
[hemtt.launch]
workshop = [
"450814997", # CBA_A3's Workshop ID
]
[hemtt.launch.vn]
workshop = [
"450814997", # CBA_A3's Workshop ID
]
dlc = [
"S.O.G. Prairie Fire",
]

View File

@ -6,24 +6,26 @@
# request, preferably including an email address.
# CORE TEAM
Brandon (TCVM) <brandondanyluk366@gmail.com>
Brett Mayson
bux578 <github@jonathandavid.de>
commy2
Dahlgren
tcvm <baileydanyluk@gmail.com>
esteldunedain <nicolas.d.badano@gmail.com>
Felix Wiegand <koffeinflummi@gmail.com>
Garth "L-H" de Wet <garthofhearts@gmail.com>
Giallustio
Glowbal
Grim
Janus
jokoho482 <jokoho482@gmail.com>
Jonpas <jonpas33@gmail.com>
Kieran
kymckay
mharis001 <mhariszakar@gmail.com>
NouberNou
PabstMirror <pabstmirror@gmail.com>
Ruthberg <ulteq@web.de>
SilentSpike <SilentSpike100@gmail.com>
tpM
veteran29
ViperMaul
@ -35,13 +37,14 @@ Walter Pearce <jaynus@gmail.com>
11RDP-LoupVert <loupvert@11rdp.fr>
654wak654 <ozanegitmen@gmail.com>
[BIG]Bull
ACCtomeek <tomeek99@gmail.com>
ACCtomeek
adam3adam <br.ada@seznam.cz>
Adanteh
aeroson
Aggr094 <bastards4glory@gmail.com>
alef <alefor@gmail.com>
Aleksey EpMAK Yermakov <epmak777@gmail.com>
AleM
Alganthe <alganthe@live.fr>
Andrea "AtixNeon" Verano <veranoandrea88@gmail.com>
Anthariel <Contact@storm-simulation.com>
@ -57,7 +60,6 @@ Bla1337
BlackPixxel <blackpixxel96@gmail.com>
BlackQwar
Brakoviejo
Brett Mayson
Brisse <brisse@outlook.com>
Brostrom.A | Evul <andreas.brostrom.ce@gmail.com>
BullHorn <bullhorn7@gmail.com>
@ -68,6 +70,7 @@ Clon1998 <ps.patti1998@gmail.com>
Codingboy
Coren <coren4@gmail.com>
Crusty
Cyruz143
dabako <dabako@dabakoworld.de>
dgibso29 <gibson@earringpranks.com>
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
@ -111,6 +114,7 @@ Hawkins
Head <brobergsebastian@gmail.com>
Hybrid V
JasperRab <jasper@jasperrab.eu>
JDT
john681611 <john681611@hotmail.com>
JoramD
Karneck <dschultz26@hotmail.com>
@ -118,6 +122,7 @@ Kavinsky <nmunozfernandez@gmail.com>
Keithen <Keithen.Neu@gmail.com>
Kllrt <kllrtik@gmail.com>
KokaKolaA3
Krzyciu
legman <juicemelon@msn.com>
Legolasindar "Viper" <legolasindar@gmail.com>
licht-im-Norden87 <lichtimnorden87@gmail.com>
@ -129,7 +134,9 @@ MarcBook
meat <p.humberdroz@gmail.com>
Michail Nikolaev
MikeMatrix <m.braun92@gmail.com>
MikeMF
mjc4wilton <mjc4wilton@gmail.com>
Mysteryjuju
nic547 <nic547@outlook.com>
nikolauska <nikolauska1@gmail.com>
nomisum <nomisum@gmail.com>
@ -143,15 +150,19 @@ PiZZADOX <509thParachuteInfantry@gmail.com>
pokertour
Professor <lukas.trneny@wo.cz>
Pterolatypus <pterolatypus@gmail.com>
QuantX
QuickDagger
rakowozz
ramius86 <pasini86@hotmail.com>
Raspu86
RcINS
Riccardo Petricca <petriccarcc@gmail.com>
Robert Boklahánics <bokirobi@gmail.com>
ruPaladin <happyworm24@rambler.ru>
Rutger "RedBery" Meijering <c.redbery@gmail.com>
sancron
Schwaggot <tom.ryan@posteo.de>
Seb <sebsmith90@gmail.com>
shukari
simon84 <badguy360th@gmail.com>
Skengman2
@ -160,19 +171,20 @@ Sniperwolf572 <tenga6@gmail.com>
System98
SzwedzikPL <szwedzikpl@gmail.com>
Tachi <zaveruha007@gmail.com>
tbeswick96
Tessa Elieff <Fastroping Sound - CreativeCommons Attributions 3.0>
Timi007 <timi007@gmx.net>
Toaster <jonathan.pereira@gmail.com>
Tonic
Tourorist <tourorist@gmail.com>
Tuupertunut
TyroneMF <TyroneMF@hotmail.com>
Valentin Torikian <valentin.torikian@gmail.com>
voiper
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
Walthzer <walthzer.69@gmail.com>
Winter <simon@agius-muscat.net>
wizpig64
YetheSamartaka
xrufix
Zakant <Zakant@gmx.de>
zGuba

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

View File

@ -1,10 +1,11 @@
<p align="center">
<img src="https://github.com/acemod/ACE3/raw/master/extras/assets/logo/black/ACE3-Logo.jpg" width="480">
<img src="https://github.com/acemod/ACE3/raw/master/extras/assets/logo/black/ACE3-Logo.png#gh-light-mode-only" width="480">
<img src="https://github.com/acemod/ACE3/raw/master/extras/assets/logo/white/ACE3-Logo.png#gh-dark-mode-only" width="480">
</p>
<p align="center">
<a href="https://github.com/acemod/ACE3/releases/latest">
<img src="https://img.shields.io/badge/Version-3.13.6-blue.svg?style=flat-square" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.15.2-blue.svg?style=flat-square" alt="ACE3 Version">
</a>
<a href="https://github.com/acemod/ACE3/issues">
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
@ -18,8 +19,8 @@
<a href="https://github.com/acemod/ACE3/blob/master/LICENSE">
<img src="https://img.shields.io/badge/License-GPLv2-red.svg?style=flat-square" alt="ACE3 License">
</a>
<a href="https://slackin.ace3mod.com/">
<img src="https://img.shields.io/badge/Slack-Join-darkviolet.svg?style=flat-square" alt="ACE3 Slack">
<a href="https://acemod.org/discord">
<img src="https://img.shields.io/badge/Discord-Join-darkviolet.svg?style=flat-square" alt="ACE3 Discord">
</a>
<a href="https://circleci.com/gh/acemod/ACE3">
<img src="https://circleci.com/gh/acemod/ACE3.svg?style=svg" alt="ACE3 Build Status">
@ -78,8 +79,8 @@ The mod is **built modularly**, so almost any included PBO can be easily removed
ACE3 requires Arma 3 and the latest version of <a href="https://github.com/CBATeam/CBA_A3/releases">CBA A3</a>. See the following pages for help and information on how to get started with ACE3:
- [Installation guide](https://ace3mod.com/wiki/user/installation-guide.html)
- [Information center](https://ace3mod.com/wiki/user/information-center.html)
- [Installation guide](https://ace3.acemod.org/wiki/user/installation-guide.html)
- [Information center](https://ace3.acemod.org/wiki/user/information-center.html)
## Contributing
@ -87,26 +88,24 @@ You can help out with the ongoing development by looking for potential bugs in o
### Contribution guidelines
To contribute something to ACE3, simply fork this repository and submit your pull requests for review by other collaborators. See [the pull request guidelines](https://ace3mod.com/wiki/development/merging-pull-requests.html) for further information on this process.
To contribute something to ACE3, simply fork this repository and submit your pull requests for review by other collaborators. See [the pull request guidelines](https://ace3.acemod.org/wiki/development/merging-pull-requests.html) for further information on this process.
### Submitting issues and requesting features
Please, use our [Issue Tracker](https://github.com/acemod/ACE3/issues) to report a bug, propose a feature, or suggest changes to the existing ones. See also:
- [How to report an issue](https://ace3mod.com/wiki/user/how-to-report-an-issue.html)
- [How to make a feature request](https://ace3mod.com/wiki/user/how-to-make-a-feature-request.html)
- [How to report an issue](https://ace3.acemod.org/wiki/user/how-to-report-an-issue.html)
- [How to make a feature request](https://ace3.acemod.org/wiki/user/how-to-make-a-feature-request.html)
### Testing & building
To help us test the latest development changes, download our master branch ([directly](https://github.com/acemod/ACE3/archive/master.zip), or [with git](https://help.github.com/articles/fetching-a-remote/)), then assemble a test build:
- [Setting up the development environment](https://ace3mod.com/wiki/development/setting-up-the-development-environment.html) step-by-step instructions on how to properly setup and build a version of ACE3 for testing purposes.
To help us test the latest development changes, download the [artifact](https://github.com/acemod/ACE3/actions/workflows/arma.yml) of the branch you'd like to test or subscribe to [nightly build](https://steamcommunity.com/sharedfiles/filedetails/?id=1882627645) to test `master` branch. Alternatively [build your own version](https://ace3.acemod.org/wiki/development/setting-up-the-development-environment.html).
### Get in touch
<table>
<tr>
<td><a href="https://slackin.ace3mod.com/">Slack</a></td>
<td>We have a public Slack team that anyone can join. This is where all our developers and contributors hang out and where we make announcements</td>
<td><a href="https://acemod.org/discord">Discord</a></td>
<td>We have a public Discord server that anyone can join. This is where all our developers and contributors hang out and where we make announcements</td>
</tr>
<tr>

View File

@ -4,7 +4,7 @@ class ACE_Settings {
};
class GVAR(muzzleVelocityVariationEnabled) {
movedToSQF = 1;
};
};
class GVAR(ammoTemperatureEnabled) {
movedToSQF = 1;
};

View File

@ -42,7 +42,7 @@ class RscTitles {
x="SafeZoneX + 0.001";
y="SafeZoneY + 0.001";
w=0.2;
h=0.2*4/3;
h="0.2*4/3";
size=0.034;
sizeEx=0.027;
text="";
@ -52,4 +52,4 @@ class RscTitles {
};
};
};
};
};

View File

@ -28,7 +28,7 @@ if (!hasInterface) exitWith {};
//Add warnings for missing compat PBOs (only if AB is on)
{
_x params ["_modPBO", "_compatPBO"];
if ((isClass (configFile >> "CfgPatches" >> _modPBO)) && {!isClass (configFile >> "CfgPatches" >> _compatPBO)}) then {
if ([_modPBO] call EFUNC(common,isModLoaded) && {!([_compatPBO] call EFUNC(common,isModLoaded))}) then {
WARNING_2("Weapon Mod [%1] missing ace compat pbo [%2] (from @ace\optionals)",_modPBO,_compatPBO);
};
} forEach [

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg, MikeMatrix, joko // Jonas
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1,5 +1,5 @@
#define DEBUG_MODE_FULL
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: esteldunedain
*
@ -68,7 +68,7 @@ for "_i" from 0 to (count _cfgWeapons)-1 do {
private _barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _vanillaInitialSpeed] call FUNC(calculateBarrelLengthVelocityShift);
private _abInitialSpeed = _vanillaInitialSpeed + _barrelVelocityShift;
// --------------------------------------------------
if (_weapon find "_base" == -1 && _weapon find "_Base" == -1) then {
#ifdef DEBUG_INIT_SPEEDS
_data pushBack [-_forEachIndex, _abInitialSpeed, _magazine, _weapon];

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Glowbal, Ruthberg, joko // Jonas
* Handle the PFH for Bullets

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Glowbal, Ruthberg
*
@ -31,12 +31,14 @@ if (_abort) then {
private _maxRange = uiNamespace getVariable format[QGVAR(maxRange_%1), _ammo];
if (isNil "_maxRange") then {
private _airFriction = getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction");
private _maxRange = if (_airFriction < 0) then {
private _vanillaInitialSpeed = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
_maxRange = if (_airFriction < 0) then {
private _maxTime = ((_vanillaInitialSpeed - BULLET_TRACE_MIN_VELOCITY) / (BULLET_TRACE_MIN_VELOCITY * -_airFriction * _vanillaInitialSpeed)) max getNumber(configFile >> "CfgAmmo" >> _ammo >> "tracerEndTime");
-ln(1 - _airFriction * _vanillaInitialSpeed * _maxTime) / _airFriction
} else {
_vanillaInitialSpeed * getNumber(configFile >> "CfgAmmo" >> _ammo >> "tracerEndTime")
};
_maxRange = _maxRange * 1.3; // Adding 30% more to range just to be safe
uiNamespace setVariable [format[QGVAR(maxRange_%1), _ammo], _maxRange];
};
if (ACE_player distance _unit > _maxRange && {ACE_player distance ((getPosASL _unit) vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply _maxRange)) > _maxRange}) exitWith {};

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Glowbal, Ruthberg
* Module for adjusting the advanced ballistics settings

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
* Initializes the advanced ballistics extension with terrain data
@ -19,7 +19,7 @@ if (!hasInterface) exitWith {};
if (!GVAR(enabled)) exitWith {};
private _initStartTime = diag_tickTime;
private _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
private _mapSize = worldSize;
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
INFO_1("Terrain already initialized [world: %1]", worldName);

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*

View File

@ -1 +0,0 @@
#include "\z\ace\addons\advanced_ballistics\script_component.hpp"

View File

@ -49,7 +49,7 @@
<Japanese>アドバンスド バリスティックス</Japanese>
<Korean>고급 탄도학</Korean>
<Chinese>先進彈道系統</Chinese>
<Chinesesimp>进弹道系统</Chinesesimp>
<Chinesesimp>弹道系统</Chinesesimp>
<Turkish>Gelişmiş Balistik</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_enabled_DisplayName">
@ -66,7 +66,7 @@
<Japanese>アドバンスド バリスティックスを有効化</Japanese>
<Korean>고급 탄도학</Korean>
<Chinese>先進彈道系統</Chinese>
<Chinesesimp>进弹道系统</Chinesesimp>
<Chinesesimp>弹道系统</Chinesesimp>
<Turkish>Gelişmiş Balistik</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_enabled_Description">
@ -83,7 +83,7 @@
<Japanese>アドバンスド バリスティックスを有効化します。</Japanese>
<Korean>고급 탄도학을 적용합니다</Korean>
<Chinese>啟用先進彈道系統</Chinese>
<Chinesesimp>启用进弹道系统</Chinesesimp>
<Chinesesimp>启用进弹道系统</Chinesesimp>
<Turkish>Gelişmiş balistiği etkinleştir</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_muzzleVelocityVariationEnabled_DisplayName">
@ -200,7 +200,7 @@
<Japanese>弾丸の軌跡エフェクトを有効化</Japanese>
<Korean>예광탄 효과 적용</Korean>
<Chinese>啟用曳光彈效果</Chinese>
<Chinesesimp>启用曳光弹效果</Chinesesimp>
<Chinesesimp>启用子弹尾迹效果</Chinesesimp>
<Turkish>İzli Mermi Etkisini Etkinleştir</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_Description">
@ -217,7 +217,7 @@
<Japanese>大口径弾の軌跡エフェクトを有効化します。 (高性能光学機器を介してのみ見ることができます)</Japanese>
<Korean>대구경 탄환에 예광탄 효과를 적용합니다(오직 고성능 조준경 사용시에만 보입니다)</Korean>
<Chinese>啟用曳光彈效果給大口徑子彈 (只有透過高倍率光學瞄鏡才能看到)</Chinese>
<Chinesesimp>启用曳光弹效果给大口径子弹 (只有透过高倍率光学瞄镜才能看到)</Chinesesimp>
<Chinesesimp>给大口径子弹启用子弹尾迹效果(只有透过高倍率光学瞄镜才能看到)</Chinesesimp>
<Turkish>Yüksek kalibreli mermilere mermi izleme efekti sağlar (yalnızca yüksek güçlü optiklerden bakıldığında görülebilir)</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_DisplayName">
@ -250,7 +250,7 @@
<Japanese>各シミュレーション毎の間隔を定義します。</Japanese>
<Korean>각 계산 단위의 간격을 정의합니다</Korean>
<Chinese>定義每個模擬計算之間的時間間隔</Chinese>
<Chinesesimp>定义每个模拟计算之间的时间间隔</Chinesesimp>
<Chinesesimp>定义每个计算步骤之间的间隔</Chinesesimp>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_DisplayName">
<English>Simulation Radius</English>
@ -283,7 +283,7 @@
<Japanese>アドバンスド バリスティックスの適用半径範囲 (プレイヤー中心、メートル単位) を定義します。</Japanese>
<Korean>플레이어 주위의 발사체를 고급 탄도학으로 정의하는 범위를 정합니다(미터)</Korean>
<Chinese>以玩家的半徑距離(公尺)定義先進彈道系統啟用範圍</Chinese>
<Chinesesimp>以玩家的半径距离(公尺)定义先进弹道系统启用范围</Chinesesimp>
<Chinesesimp>定义玩家周围的半径(米),在这个半径内,进阶弹道系统会被启用</Chinesesimp>
<Turkish>Mermilere gelişmiş balistik uygulandığı oyuncunun etrafındaki yarıçapı (metre cinsinden) tanımlar</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_Description">
@ -300,7 +300,7 @@
<Japanese>アドバンスド バリスティックスのシミュレーションを有効化します。 弾道は気温・気圧・湿度・重力・弾薬の種類・発射する武器などの変化による影響を受けるようになります。</Japanese>
<Korean>이 모듈은 고급 탄도학을 적용시킵니다 - 이는 발사체의 궤적이 기온, 대기압, 습도, 중력, 탄환의 종류와 어느 무기에서 발사되는지에 따라 영향을 받습니다.</Korean>
<Chinese>該模塊實現先進的彈道仿真 - 這意味著子彈的軌跡是由空氣溫度、大氣壓力、濕度、重力、彈藥類型以及射擊的武器所影響</Chinese>
<Chinesesimp>该模块实现先进的弹道仿真 - 这意味着子弹的轨迹是由空气温度、大气压力、湿度、重力、弹药类型以及射击的武器所影响</Chinesesimp>
<Chinesesimp>该模块实现增强的弹道模拟—子弹的轨迹由空气温度、大气压力、湿度、重力、弹药类型和射击的武器等变量所影响</Chinesesimp>
<Turkish>Bu modül gelişmiş balistik simülasyonunu etkinleştirir - yani mermilerin gidişatını hava sıcaklığı, atmosfer basıncı, nem, yerçekimi, mühimmat türü ve ateşlendiği silah gibi durumlar etkiler.</Turkish>
</Key>
</Package>

View File

@ -2,6 +2,7 @@ PREP(addDutyFactor);
PREP(createStaminaBar);
PREP(getAnimDuty);
PREP(getMetabolicCosts);
PREP(getWeaponInertia);
PREP(handleEffects);
PREP(handlePlayerChanged);
PREP(handleStaminaBar);

View File

@ -2,22 +2,27 @@
if (!hasInterface) exitWith {};
[missionNamespace, "ACE_setCustomAimCoef", QUOTE(ADDON), {
private _unit = ACE_player;
private _fatigue = _unit getVariable [QGVAR(aimFatigue), 0];
switch (stance _unit) do {
["baseline", {
private _fatigue = ACE_player getVariable [QGVAR(aimFatigue), 0];
switch (stance ACE_player) do {
case ("CROUCH"): {
(1.0 + _fatigue ^ 2 * 0.1) * GVAR(swayFactor)
(1.0 + _fatigue ^ 2 * 0.1)
};
case ("PRONE"): {
(1.0 + _fatigue ^ 2 * 2.0) * GVAR(swayFactor)
(1.0 + _fatigue ^ 2 * 2.0)
};
default {
(1.5 + _fatigue ^ 2 * 3.0) * GVAR(swayFactor)
(1.5 + _fatigue ^ 2 * 3.0)
};
};
}] call EFUNC(common,arithmeticSetSource);
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
["multiplier", {GVAR(swayFactor)}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
// recheck weapon inertia after weapon swap, change of attachments or switching unit
["weapon", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler;
["loadout", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler;
["unit", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler;
["CBA_settingsInitialized", {
if (!GVAR(enabled)) exitWith {};
@ -30,7 +35,7 @@ if (!hasInterface) exitWith {};
GVAR(ppeBlackout) ppEffectCommit 0.4;
// - GVAR updating and initialization -----------------------------------------
["unit", FUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler;
["unit", LINKFUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler;
["visibleMap", {
params ["", "_visibleMap"]; // command visibleMap is updated one frame later
@ -56,7 +61,8 @@ if (!hasInterface) exitWith {};
[1, 3] select (_this getVariable [QEGVAR(dragging,isCarrying), false]);
}] call FUNC(addDutyFactor);
};
if (["ACE_Weather"] call EFUNC(common,isModLoaded)) then {
// Weather has an off switch, Dragging & Medical don't.
if (missionNamespace getVariable [QEGVAR(weather,enabled), false]) then {
[QEGVAR(weather,temperature), { // 35->1, 45->2
linearConversion [35, 45, (missionNamespace getVariable [QEGVAR(weather,currentTemperature), 25]), 1, 2, true];
}] call FUNC(addDutyFactor);

View File

@ -9,7 +9,9 @@ PREP_RECOMPILE_END;
#include "initSettings.sqf"
GVAR(staminaBarWidth) = 10 * (((safezoneW / safezoneH) min 1.2) / 40);
GVAR(dutyList) = [[], []];
GVAR(dutyList) = createHashMap;
GVAR(setAnimExclusions) = [];
GVAR(inertia) = 0;
GVAR(inertiaCache) = createHashMap;
ADDON = true;

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Adds a duty factor.
@ -18,6 +18,4 @@
params [["_id", "", [""]], ["_factor", 1, [0, {}]]];
if (_id == "" || {_factor isEqualTo 1}) exitWith {};
GVAR(dutyList) params ["_idList", "_factorList"];
_idList pushBack _id;
_factorList pushBack _factor,
GVAR(dutyList) set [_id, _factor];

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Creates the stamina bar.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Calculates the duty of the current animation.
@ -37,13 +37,14 @@ if (_animType in ["idl", "mov", "adj"]) then {
};
};
if (currentWeapon _unit != handgunWeapon _unit) then {
if (currentWeapon _unit != "") then {
if (_animName select [13, 3] == "ras") then {
// low ready jog
_duty = _duty * 1.2;
if (_animName select [9, 3] == "tac") then {
// high ready jog/walk
_duty = _duty * 1.5;
_duty = _duty * (1 + 0.8*GVAR(inertia));
} else {
// low ready jog
_duty = _duty * (1 + 0.2*GVAR(inertia));
};
};
};

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Calculates the current metabolic costs for a unit.
@ -30,22 +30,25 @@ private _duty = GVAR(animDuty);
} else {
_duty = _duty * (_unit call _x);
};
} forEach (GVAR(dutyList) select 1);
} forEach (values GVAR(dutyList));
if (GVAR(isSwimming)) then {
_terrainGradient = 0;
};
// Metabolic cost for walking and running is different
if (_velocity > 2) then {
// Running
(
2.10 * SIM_BODYMASS
+ 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ (SIM_BODYMASS + _gearMass) * (0.90 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
+ (SIM_BODYMASS + _gearMass) * (0.9 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
) * 0.23 * _duty
} else {
// Walking
(
1.05 * SIM_BODYMASS
+ 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ 2 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ (SIM_BODYMASS + _gearMass) * (1.15 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
) * 0.23 * _duty
};

View File

@ -0,0 +1,38 @@
#include "..\script_component.hpp"
/*
* Author: Pterolatypus
* Calculates total weapon inertia, accounting for attachments.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* Total inertia <NUMBER>
*
* Example:
* [ACE_player] call ace_advanced_fatigue_fnc_getWeaponInertia
*
* Public: No
*/
params [["_unit", ACE_player, [objNull]]];
private _cache = GVAR(inertiaCache);
private _weapon = currentWeapon _unit;
private _weaponAndItems = [_weapon] + (_unit weaponAccessories _weapon);
private _inertia = _cache get _weaponAndItems;
if (isNil "_inertia") then {
_inertia = 0;
private _cfgWeapons = configFile >> "CfgWeapons";
{
// if item is "" or inertia property is undefined, just ignore it
private _itemInertia = getNumber (_cfgWeapons >> _x >> "inertia");
if (isNil "_itemInertia") then { continue };
_inertia = _inertia + _itemInertia;
} forEach _weaponAndItems;
_cache set [_weaponAndItems, _inertia];
};
GVAR(inertia) = _inertia;
_inertia

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Handles any audible, visual and physical effects of fatigue.
@ -94,6 +94,3 @@ if (_overexhausted) then {
};
_unit setVariable [QGVAR(aimFatigue), _fatigue];
private _aimCoef = [missionNamespace, "ACE_setCustomAimCoef", "max"] call EFUNC(common,arithmeticGetResult);
_unit setCustomAimCoef _aimCoef;

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Handles switching units (once on init and afterwards via Zeus).

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Handles visual changes of the stamina bar.
@ -25,12 +25,14 @@ _posAndSize set [2, _stamina * GVAR(staminaBarWidth)];
_staminaBarContainer ctrlSetPosition _posAndSize;
// - Opacity ------------------------------------------------------------------
if (GVAR(fadeStaminaBar)) then {
if (GVAR(fadeStaminaBar)) then {
if (_stamina >= 0.8) then {
_staminaBarContainer ctrlSetFade (0.9 + 0.1 * (_stamina - 0.8) / 0.2);
} else {
_staminaBarContainer ctrlSetFade (0.9 * _stamina / 0.8);
};
} else {
_staminaBarContainer ctrlSetFade 0;
};
// - Color --------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Main looping function that updates fatigue values.
@ -14,7 +14,9 @@
*
* Public: No
*/
if (!alive ACE_player) exitWith { // Dead people don't breath, Will also handle null (Map intros)
// Dead people don't breathe, will also handle null (map intros)
if (!alive ACE_player) exitWith {
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlSetFade 1;
@ -36,7 +38,7 @@ if ((vehicle ACE_player == ACE_player) && {_currentSpeed > 0.1} && {isTouchingGr
// Calculate muscle damage increase
// Note: Muscle damage recovery is ignored as it takes multiple days
GVAR(muscleDamage) = GVAR(muscleDamage) + (_currentWork / GVAR(peakPower)) ^ 3.2 * 0.00004;
GVAR(muscleDamage) = (GVAR(muscleDamage) + (_currentWork / GVAR(peakPower)) ^ 3.2 * 0.00004) min 1;
private _muscleIntegritySqrt = sqrt (1 - GVAR(muscleDamage));
// Calculate available power

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Initializes the module settings.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Removes a duty factor.
@ -16,10 +16,4 @@
*/
params [["_id", "", [""]]];
GVAR(dutyList) params ["_idList", "_factorList"];
private _index = _idList find _id;
if (_index != -1) then {
_idList deleteAt _index;
_factorList deleteAt _index;
};
GVAR(dutyList) deleteAt _id;

View File

@ -1 +0,0 @@
#include "\z\ace\addons\advanced_fatigue\script_component.hpp"

View File

@ -6,7 +6,7 @@
<Spanish>ACE Fatiga Avanzada</Spanish>
<German>ACE Erweiterte Ausdauer</German>
<Chinese>ACE 進階疲勞</Chinese>
<Chinesesimp>ACE 进阶疲劳</Chinesesimp>
<Chinesesimp>ACE 进阶体力</Chinesesimp>
<Japanese>ACE アドバンスド ファティーグ</Japanese>
<Italian>ACE Fatica Avanzata</Italian>
<Korean>ACE 고급 피로도</Korean>
@ -73,7 +73,7 @@
<French>Facteur de récupération</French>
<Italian>Fattore Recupero</Italian>
<Chinese>回復值</Chinese>
<Chinesesimp>回复值</Chinesesimp>
<Chinesesimp>恢复系数</Chinesesimp>
<Russian>Фактор восстановления</Russian>
<Portuguese>Fator de Recuperação</Portuguese>
<Czech>Faktor zotavení</Czech>
@ -89,7 +89,7 @@
<French>Modifie la vitesse à laquelle le joueur récupère lorsqu'il se repose.\nPlus la valeur est élevée, plus la récupération est rapide.</French>
<Italian>Determina in quanto tempo il giocatore recupera quando rilassato. Maggiore significa migliore.</Italian>
<Chinese>決定玩家休息多久就能回復體力,值越高恢復越快</Chinese>
<Chinesesimp>决定玩家休息多久就能复体力,值越高恢复越快</Chinesesimp>
<Chinesesimp>决定玩家休息多久就能复体力,值越高恢复越快</Chinesesimp>
<Russian>Изменяет скорость восстановления игрока во время отдыха. Чем выше, тем быстрее.</Russian>
<Portuguese>Altera o quão rápido um jogador recupera quando descansando. Quanto maior, mais rápido.</Portuguese>
<Czech>Mění, jak rychle se hráč zotaví, když odpočívá. Vyšší je rychlejší.</Czech>
@ -104,7 +104,7 @@
<French>Facteur de charge</French>
<Italian>Fattore Caricamento</Italian>
<Chinese>負重量</Chinese>
<Chinesesimp>重量</Chinesesimp>
<Chinesesimp>重量系数</Chinesesimp>
<Russian>Фактор нагрузки</Russian>
<Portuguese>Fator de Carga</Portuguese>
<Czech>Faktor zatížení</Czech>
@ -119,7 +119,7 @@
<French>Augmente ou diminue l'influence du poids sur les performances du joueur.\nUne valeur nulle indique que le poids de l'équipement n'a aucun impact sur les performances.</French>
<Italian>Incrementa o decrementa quanto il peso influenza le prestazioni dei giocatori. Zero significa che il peso dell'equipaggiamento non ha alcuna influenza nelle prestazioni.</Italian>
<Chinese>增加或降低玩家所能承受的負重量. 如設定值為0, 代表裝備的重量將不會影響到玩家的體力表現</Chinese>
<Chinesesimp>增加或降低玩家所能承受的负重量. 如设定值为0, 代表装备的重量将不会影响到玩家的体力表现</Chinesesimp>
<Chinesesimp>增加或降低玩家所能承受的负重量。如设定值为0代表装备的重量将不会影响到玩家的体力表现</Chinesesimp>
<Russian>Увеличивает или уменьшает вес, влияющий на производительность игроков. Ноль означает, что вес снаряжения не влияет на производительность</Russian>
<Portuguese>Aumenta ou diminui o quanto o peso influencia a performance do jogador. Zero significa que o peso não tem impacto algum na performance.</Portuguese>
<Czech>Zvyšuje nebo snižuje, jak velká váha ovlivňuje výkon hráče. Nulová hodnota znamená, že hmotnost zařízení nemá žádný vliv na výkon.</Czech>
@ -134,7 +134,7 @@
<French>Facteur d'inclinaison du terrain</French>
<Italian>Fattore Pendenza Terreno</Italian>
<Chinese>地形陡峭影響值</Chinese>
<Chinesesimp>地形陡峭影响值</Chinesesimp>
<Chinesesimp>地形陡峭系数</Chinesesimp>
<Russian>Фактор местности</Russian>
<Portuguese>Fator de Inclinação do Terreno</Portuguese>
<Czech>Faktor stoupání terénu</Czech>
@ -149,7 +149,7 @@
<French>Définit à quel point un terrain escarpé réduit l'endurance du joueur.\nPlus la valeur est élevée, moins le joueur est endurant.</French>
<Italian>Stabilisce quanto la pendenza del terreno incrementa la perdita della stamina. Maggiore significa più stamina persa.</Italian>
<Chinese>設定陡峭的地形將會影響多少體力的流失,值越高代表體力流失越快</Chinese>
<Chinesesimp>设定陡峭的地形将会影响多少体力的流失值越高代表体力流失越快</Chinesesimp>
<Chinesesimp>设定陡峭的地形将会影响多少体力的流失速度,值越高代表体力流失越快</Chinesesimp>
<Russian>Устанавливает, насколько крутая местность увеличивает потерю выносливости. Чем выше, тем быстрее теряется выносливость.</Russian>
<Portuguese>Define o quanto que um terreno íngrime aumenta na perda de estamina. Quanto maior, maior a perda de estamina.</Portuguese>
<Czech>Nastavuje, o kolik strmý terén zvyšuje ztrátu výdrže. Vyšší znamená vyšší ztrátu výdrže.</Czech>
@ -159,7 +159,7 @@
<Spanish>Factor de balanceo de mira</Spanish>
<German>Verwacklungsfaktor</German>
<Japanese>手ぶれ因数</Japanese>
<Chinesesimp>抖动</Chinesesimp>
<Chinesesimp>抖动</Chinesesimp>
<Chinese>抖動因素</Chinese>
<French>Facteur de tremblement</French>
<Italian>Fattore di oscillazione</Italian>
@ -167,13 +167,14 @@
<Russian>Фактор колебания прицела</Russian>
<Portuguese>Fator de Balanço de Mira</Portuguese>
<Czech>Faktor kývání</Czech>
<Korean>손떨림 정도</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_SwayFactor_Description">
<English>Influences the amount of weapon sway. Higher means more sway.</English>
<Spanish>Afecta al la estabilidad de la mira. Más alto significa más balanceo</Spanish>
<German>Beeinflusst den Faktor, wie ruhig man eine Waffe halten kann. Ein höherer Wert bedeutet weniger Stabilisierung</German>
<Japanese>武器を持つ手のぶれ度合いを設定します。 値が高ければ高いほど、手ぶれが強くなります。</Japanese>
<Chinesesimp>影响手持武器的晃动程度,数值越高,抖动的越厉害.</Chinesesimp>
<Chinesesimp>影响手持武器的晃动程度,数值越高,抖动的越厉害。</Chinesesimp>
<Chinese>影響手持武器晃動程度,數值越高抖動越厲害</Chinese>
<French>Influe sur l'amplitude du tremblement de l'arme. Une valeur plus élevée signifie plus de tremblement.</French>
<Italian>Influenza l'ammontare di oscillazione dell'arma. Maggiore significa più oscillazione.</Italian>
@ -181,6 +182,7 @@
<Russian>Влияет на колебания прицела оружия. Чем выше - тем больше.</Russian>
<Portuguese>Influencia a quantidade de balanço da mira da arma. Quanto maior, mais balanço.</Portuguese>
<Czech>Ovlivňuje množství kývání zbraní. Vyšší znamená více kývání.</Czech>
<Korean>손떨림의 정도를 정합니다. 높을 수록 많이 휘적입니다.</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_Enabled">
<English>Enabled</English>
@ -207,7 +209,7 @@
<French>Active/Désactive la fatigue avancée.</French>
<Italian>Abilita/disabilita la Fatica Avanzata.</Italian>
<Chinese>啟用/關閉進階體力.</Chinese>
<Chinesesimp>启用/关闭进阶体力.</Chinesesimp>
<Chinesesimp>启用/关闭进阶体力</Chinesesimp>
<Russian>Включает / Отключает Продвинутую усталость</Russian>
<Portuguese>Ativa/Desativa Fadiga Avançada.</Portuguese>
<Czech>Aktivuje / deaktivuje Pokročilou únavu.</Czech>
@ -248,6 +250,7 @@
<Russian>Скрыть шкалу усталости автоматически</Russian>
<German>Blende Ausdauerleiste automatisch aus</German>
<Chinese>體力條自動淡去</Chinese>
<Chinesesimp>自动淡化体力条</Chinesesimp>
<Italian>Dissolvenza automatica della barra della stamina</Italian>
<Czech>Automaticky schovat lištu výdrže</Czech>
<French>Fondu automatique de la barre d'endurance</French>
@ -255,6 +258,7 @@
<Polish>Chowaj pasek wytrzymałości automatycznie</Polish>
<Portuguese>Barra de stamina some automaticamente</Portuguese>
<Turkish>Dayanıklılık çubuğunu otomatik olarak soldur</Turkish>
<Korean>자동으로 피로도 막대 숨기기</Korean>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_FadeStaminaBar_Description">
<English>Adjusts transparency of the bar based on stamina status.</English>
@ -262,12 +266,14 @@
<Russian>Регулирует прозрачность шкалы в зависимости от статуса выносливости.</Russian>
<German>Passt die Transparenz der Ausdauerleiste abhängig vom Ausdauerstatus an.</German>
<Chinese>依照目前的體力程度調整體力條之透明度</Chinese>
<Chinesesimp>根据体力状况调整体力条的透明度</Chinesesimp>
<Italian>Regola la trasparenza della barra in base allo stato di affaticamento.</Italian>
<Czech>Upravuje průhlednost lišty v závislosti na současném stavu výdrže</Czech>
<French>Règle la transparence de la barre en fonction de l'état d'endurance.</French>
<Japanese>スタミナの状態に応じて、自動的にバーの透明度を調整します。</Japanese>
<Polish>Dostosowuje przezroczystość paska na podstawie stanu wytrzymałości.</Polish>
<Portuguese>Ajusta a transparência da barra baseado no status da stamina</Portuguese>
<Korean>피로도에 따라 피로도 막대의 투명도를 조절합니다.</Korean>
</Key>
</Package>
</Project>

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Jonpas
* Checks if a throwable can be prepared.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Jonpas
* Checks if a throwable can be thrown.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Zapat, Dslyecxi, Jonpas
* Draws throw arc.

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas, SilentSpike
* Author: Dslyecxi, Jonpas, kymckay
* Handles drawing the currently selected or cooked throwable.
*
* Arguments:

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Exits throw mode.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Retrieve muzzle name from config.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Jonpas
* Initializes the Advanced Throwing module.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Key down event.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Mouse button down event.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Mouse scroll wheel changed event.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Jonpas
* Picks up a throwable from the ground.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Prepares throwable or selects the next.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Primes the throwable, creates global throwable vehicle and throws Fired XEH.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: PabstMirror, Jonpas
* When interact_menu starts rendering (from "interact_keyDown" event).

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Throw selected throwable.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: CBA Team
* Throws Fired XEH.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Jonpas
* Updates controls hints based on current state.

View File

@ -1 +0,0 @@
#include "\z\ace\addons\advanced_throwing\script_component.hpp"

View File

@ -35,7 +35,7 @@
<Key ID="STR_ACE_Advanced_Throwing_Enable_DisplayName">
<English>Enable Advanced Throwing</English>
<Spanish>Activar Lanzamiento Avanzado</Spanish>
<Russian>Включить улучшенный бросок</Russian>
<Russian>Вкл. улучшенный бросок</Russian>
<Japanese>アドバンスド スローイングを有効化</Japanese>
<Polish>Aktywuj zaawansowane rzucanie</Polish>
<German>Aktiviere erweitertes Wurfsystem</German>
@ -75,7 +75,7 @@
<French>Afficher l'arc de lancé</French>
<Italian>Mostra Arco di Tiro</Italian>
<Chinese>顯示投擲軌道</Chinese>
<Chinesesimp>显示投掷轨道</Chinesesimp>
<Chinesesimp>显示投掷弧线</Chinesesimp>
<Portuguese>Mostrar o Arco de Arremesso</Portuguese>
<Czech>Zobrazit oblouk vrhu </Czech>
<Turkish>Atış Yayını Göster</Turkish>
@ -91,7 +91,7 @@
<French>Active la visualisation de l'arc de lancé (la trajectoire de vol de l'objet).</French>
<Italian>Abilita la visualizzazione dell'arco del tiro (dove l'oggetto lanciabile volerà).</Italian>
<Chinese>顯示投擲軌道幫助投擲</Chinese>
<Chinesesimp>显示投掷轨道帮助投掷</Chinesesimp>
<Chinesesimp>显示投掷弧线帮助投掷</Chinesesimp>
<Portuguese>Permite a visualização do Arco de Arremesso por onde o objeto será jogado.</Portuguese>
<Czech>Zapíná vizualizaci oblouku vrhu (kam bude předmět hozen).</Czech>
</Key>
@ -106,7 +106,7 @@
<French>Afficher les contrôles à la souris du lancé</French>
<Italian>Mostra Comandi Mouse Lancio</Italian>
<Chinese>顯示滑鼠投擲控制提示</Chinese>
<Chinesesimp>显示鼠投掷控制提示</Chinesesimp>
<Chinesesimp>显示鼠投掷控制提示</Chinesesimp>
<Portuguese>Mostrar os controles de mouse para Arremesso</Portuguese>
<Czech>Zobrazit ovládání házení myší</Czech>
</Key>
@ -121,14 +121,14 @@
<French>Active les aides visuelles pour les contrôles à la souris lorsqu'un lancé est préparé.</French>
<Italian>Abilita la visualizzazione dei controlli del mouse quando l'oggetto lanciabile è pronto.</Italian>
<Chinese>開啟後會在準備投擲時, 顯示滑鼠相關操作</Chinese>
<Chinesesimp>开启后会在准备投掷时, 显示滑鼠相关操作</Chinesesimp>
<Chinesesimp>开启后会在准备投掷时,显示鼠标相关操作</Chinesesimp>
<Portuguese>Ativa as dicas visuais dos controles do mouse quando um arremessável é preparado.</Portuguese>
<Czech>Zapíná popisky pro ovládání myší, když je házený předmět připraven.</Czech>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUp_DisplayName">
<English>Enable Throwables Pick Up</English>
<Spanish>Habilitar recoger objetos lanzados</Spanish>
<Russian>Включить подбор гранат</Russian>
<Russian>Вкл. подбор гранат</Russian>
<Japanese>投てき物の拾い上げを有効化</Japanese>
<Polish>Zezwól na podnoszenie obiektów miotanych</Polish>
<German>Aktiviere Aufheben von Wurfobjekten</German>
@ -136,7 +136,7 @@
<French>Permettre le ramassage d'objets lançables</French>
<Italian>Abilita Raccogli Oggetti</Italian>
<Chinese>啟用可撿取地面投擲物</Chinese>
<Chinesesimp>启用捡取地面投掷物</Chinesesimp>
<Chinesesimp>启用捡取地面投掷物</Chinesesimp>
<Portuguese>Permitir pegar arremessáveis</Portuguese>
<Czech>Zapnout zdvihání házených předmětů</Czech>
</Key>
@ -151,14 +151,14 @@
<French>Active la possibilité de ramasser des objets lançables du sol.</French>
<Italian>Abilita la possibilità di raccogliere un oggetto lanciabile da terra.</Italian>
<Chinese>啟用後, 可撿取地面上的投擲物</Chinese>
<Chinesesimp>启用后, 可捡取地面上的投掷物</Chinesesimp>
<Chinesesimp>启用后可捡取地面上的投掷物</Chinesesimp>
<Portuguese>Permite que objetos arremessados sejam pegos do chão. (ACE Menu de Interação)</Portuguese>
<Czech>Zapíná schopnost zvednutí házených předmětů ze země.</Czech>
</Key>
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUpAttached_DisplayName">
<English>Enable Attached Throwables Pick Up</English>
<Spanish>Activar coger objetos lanzables que se enganchan</Spanish>
<Russian>Включить подбор прикрепленных гранат</Russian>
<Russian>Вкл. подбор прикрепленных гранат</Russian>
<Japanese>取り付けられた投てき物の拾い上げを有効化</Japanese>
<Polish>Zezwól na podnoszenie przyczepionych obiektów miotanych</Polish>
<German>Aktiviere erneute Aufnahme befestigter Wurfobjekte</German>
@ -166,7 +166,7 @@
<French>Activer le ramassage d'objets lançables attachés</French>
<Italian>Abilita Raccogli Oggetti Lanciabili da altri Oggetti</Italian>
<Chinese>啟用可撿取附著投擲物</Chinese>
<Chinesesimp>启用捡取附着投掷物</Chinesesimp>
<Chinesesimp>启用捡取附着投掷物</Chinesesimp>
<Portuguese>Permitir pegar arremessáveis fixados</Portuguese>
<Czech>Zapnout zdvihání připnutých předmětů.</Czech>
</Key>
@ -181,7 +181,7 @@
<French>Active la possibilité de ramasser des objets lançables attachés à d'autres objets.</French>
<Italian>Abilita la possibilità di raccogliere gli oggetti lanciabili dagli altri oggetti. </Italian>
<Chinese>啟用後, 可撿取附著在物件上的投擲物</Chinese>
<Chinesesimp>启用后, 可捡取附着在物件上的投掷物</Chinesesimp>
<Chinesesimp>启用后,可捡取附着在物体上的投掷物</Chinesesimp>
<Portuguese>Permite que arremessáveis fixados em objetos sejam pegos.</Portuguese>
<Czech>Zapíná schopnost zvednutí předmětů z objektů ke kterým jsou připnuté.</Czech>
</Key>
@ -211,7 +211,7 @@
<French>Mode de lancé de l'objet (Tenir)</French>
<Italian>Modalità Oggetto Gettabile (Mantenere)</Italian>
<Chinese>投擲模式 (按住)</Chinese>
<Chinesesimp>投掷模式 (按住)</Chinesesimp>
<Chinesesimp>投掷模式(按住)</Chinesesimp>
<Portuguese>Modo de Arremesso (Segurar)</Portuguese>
<Czech>Mód puštění (Držet)</Czech>
</Key>
@ -226,7 +226,7 @@
<French>Mode de lancé de l'objet (Basculer)</French>
<Italian>Modalità Oggetto lanciabile Gettabile (Interruttore)</Italian>
<Chinese>投擲模式 (切換)</Chinese>
<Chinesesimp>投掷模式 (切换)</Chinesesimp>
<Chinesesimp>投掷模式(切换)</Chinesesimp>
<Portuguese>Modo de Arremesso (Alternar)</Portuguese>
<Czech>Mód puštění (Přepnout)</Czech>
</Key>
@ -241,7 +241,7 @@
<French>amorcée</French>
<Italian>Armato</Italian>
<Chinese>引信開始燃燒</Chinese>
<Chinesesimp>引信开始燃烧</Chinesesimp>
<Chinesesimp>已开引信</Chinesesimp>
<Portuguese>Preparado</Portuguese>
<Czech>Odjištěný</Czech>
</Key>
@ -272,7 +272,7 @@
<French>(Défilement) Changer de mode</French>
<Italian>(Scorrere) Cambio Modalità</Italian>
<Chinese>(滾輪) 變更模式</Chinese>
<Chinesesimp>(滚轮) 变更模式</Chinesesimp>
<Chinesesimp>(滚轮)变更模式</Chinesesimp>
<Portuguese>(Roda do Mouse) Alternar modo</Portuguese>
<Czech>(Scrollovat) Změnit mód</Czech>
<Turkish>(Tekerlek) Modu Değiştir</Turkish>
@ -288,7 +288,7 @@
<French>(Défilement) Étendre</French>
<Italian>(Scorrere) Estendere</Italian>
<Chinese>(滾輪) 延長</Chinese>
<Chinesesimp>(滚轮) 延长</Chinesesimp>
<Chinesesimp>(滚轮)延长</Chinesesimp>
<Portuguese>(Roda do Mouse) Extender</Portuguese>
<Czech>(Scrollovat) Oddálit</Czech>
<Turkish>(Tekerlek) Uzat</Turkish>
@ -304,7 +304,7 @@
<French>(Clique) Dégoupiller</French>
<Italian>(Click) Arma</Italian>
<Chinese>(點擊) 提早拉開引信</Chinese>
<Chinesesimp>(点击) 提早拉开引信</Chinesesimp>
<Chinesesimp>(点击)提早拉开引信</Chinesesimp>
<Portuguese>(Clique) Cozinhar</Portuguese>
<Czech>(Klik) Odjistit</Czech>
<Turkish>(Tıkla) Cook</Turkish>

View File

@ -1,3 +1,5 @@
PREP(assignNVG);
PREP(assignNVGpfh);
PREP(drawCuratorGarrisonPathing);
PREP(garrison);
PREP(garrisonMove);

View File

@ -68,3 +68,11 @@
params ["_unit", "_mode"];
_unit enableGunLights _mode;
}] call CBA_fnc_addEventHandler;
if (isServer) then {
["CAManBase", "init", {
// wait for HMD to be assigned so `hmd _unit` works
[FUNC(assignNVG), _this, 1] call CBA_fnc_waitAndExecute;
}] call CBA_fnc_addClassEventHandler;
};

View File

@ -6,4 +6,11 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
if (isServer) then {
GVAR(assignNVGthread) = false;
GVAR(assignNVGstate) = false;
};
#include "initSettings.sqf"
ADDON = true;

View File

@ -0,0 +1,39 @@
#include "..\script_component.hpp"
/*
* Author: Jonpas
* Assigns AI first found NVG in their inventory during night time and unassigns it during day time.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [cursorObject] call ace_ai_fnc_assignNVG
*
* Public: No
*/
if (!GVAR(assignNVG)) exitWith {};
params ["_unit"];
if (alive _unit && {!isPlayer _unit}) then {
private _nvg = hmd _unit;
if (GVAR(assignNVGstate)) then {
if (_nvg == "") then {
private _items = [_unit, false, true, true, true, false, false] call CBA_fnc_uniqueUnitItems; // backpack, vest, uniform
{
if (getText (configFile >> "CfgWeapons" >> _x >> "simulation") == "NVGoggles") exitWith {
_unit assignItem _x;
};
} forEach _items;
};
} else {
if (_nvg != "" && {currentVisionMode _unit == 0} && {_unit canAdd _nvg}) then {
_unit unassignItem _nvg;
};
};
};

View File

@ -0,0 +1,27 @@
#include "..\script_component.hpp"
/*
* Author: Jonpas
* waitAndExecute Handler for periodic NVG assignment.
*
* Arguments:
* None
* Return Value:
* None
*
* Example:
* [] call ace_ai_fnc_assignNVGpfh
*
* Public: No
*/
TRACE_1("assignNVGpfh",count allUnits);
if (!GVAR(assignNVG)) exitWith { TRACE_1("shutdown loop",_this); GVAR(assignNVGthread) = false; };
GVAR(assignNVGstate) = sunOrMoon < 1 || {moonIntensity > 0.8};
{
_x call FUNC(assignNVG);
} forEach allUnits;
[FUNC(assignNVGpfh), [], 300] call CBA_fnc_waitAndExecute;

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: alganthe
* Draws AI garrison pathing while the Zeus display is open.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: alganthe
* Garrison function used to garrison AI inside buildings.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: alganthe
* Internal function used by ace_ai_fnc_garrison to make the units move to the positions it picked.
@ -33,7 +33,7 @@ private _unitMoveListUnits = (_unitMoveList apply {_x select 0});
_x setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true];
} foreach _unitMoveListUnits;
// Avoid duplicate PFHs
// Avoid duplicate PFHs
if (isNil QGVAR(garrison_moveUnitPFH)) then {
missionNameSpace setVariable [QGVAR(garrison_moveUnitPFH), true, true];
@ -114,7 +114,7 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
(_unit getVariable [QGVAR(garrisonMove_unitPosMemory), [CBA_missionTime, [0,0,0]]]) params ["_unitPosTimer", "_unitOldPos"];
// AI may sometimes not be able to report unitReady, this is to avoid the PFH running forever
switch true do {
switch true do {
case ((_unitPos distance _pos) < 1.5) : {
call _fnc_attemptSuccessful;
};
@ -127,7 +127,7 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
default {
_unit setVariable [QGVAR(garrisonMove_unitPosMemory), [CBA_missionTime, _unitPos]];
};
};
};
};
};

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: mharis001
* Initializes the Zeus display.

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: alganthe
* Used to un-garrison units.

View File

@ -1 +0,0 @@
#include "\z\ace\addons\ai\script_component.hpp"

View File

@ -0,0 +1,19 @@
private _category = format ["ACE %1", LLSTRING(DisplayName)];
[
QGVAR(assignNVG), "CHECKBOX",
[LSTRING(AssignNVG_DisplayName), LSTRING(AssignNVG_Description)],
_category,
false,
1,
{
if (isServer) then {
params ["_enabled"];
if (_enabled && {!GVAR(assignNVGthread)}) then {
TRACE_1("start loop",_this);
GVAR(assignNVGthread) = true;
[FUNC(assignNVGpfh), [], 1] call CBA_fnc_waitAndExecute;
};
};
}
] call CBA_fnc_addSetting;

View File

@ -1,6 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="AI">
<Key ID="STR_ACE_AI_DisplayName">
<English>AI</English>
<Chinese>AI</Chinese>
<French>IA</French>
<Spanish>IA</Spanish>
<Italian>AI</Italian>
<Polish>SI</Polish>
<Russian>ИИ</Russian>
<German>KI</German>
<Czech>UI</Czech>
<Portuguese>IA</Portuguese>
<Korean>AI</Korean>
<Chinesesimp>AI</Chinesesimp>
<Japanese>AI</Japanese>
<Turkish>AI</Turkish>
</Key>
<Key ID="STR_ACE_AI_GarrisonInvalidPosition">
<English>Invalid position provided.</English>
<German>Ungültige Position</German>
@ -65,5 +81,15 @@
<Czech>Nenalezena žádná budova.</Czech>
<Turkish>Bir yapı bulunamadı</Turkish>
</Key>
<Key ID="STR_ACE_AI_AssignNVG_DisplayName">
<English>Auto-Equip NVGs</English>
<Polish>Automatyczne zakładanie NVG</Polish>
<German>Automatisch NVGs ausrüsten</German>
</Key>
<Key ID="STR_ACE_AI_AssignNVG_Description">
<English>Equips NVG in inventory during night time and unequips it during day time.\nDoes not add NVGs to inventory!</English>
<Polish>Zakłada NVG w nocy i zdejmuje je w ciągu dnia.\nNie dodaje NVG do ekwipunku!</Polish>
<German>Rüstet NVG nachts aus dem Inventar aus und entfernt es tagsüber.\nFügt keine NVGs zum Inventar hinzu!</German>
</Key>
</Package>
</Project>

View File

@ -9,3 +9,9 @@ class Extended_PreInit_EventHandlers {
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -19,13 +19,13 @@ class CfgMagazines {
displayName = CSTRING(GatlingDescriptionAP);
displayNameShort = CSTRING(GatlingDescriptionShortAP);
};
class ACE_1000Rnd_Gatling_30mm_Plane_CAS_CM41: 1000Rnd_Gatling_30mm_Plane_CAS_01_F {
ammo = "ACE_Gatling_30mm_Sub_CM41";
displayName = CSTRING(GatlingDescriptionCM41);
displayNameShort = CSTRING(GatlingDescriptionShortCM41);
};
class ACE_1000Rnd_Gatling_30mm_Plane_CAS_CM51: 1000Rnd_Gatling_30mm_Plane_CAS_01_F {
ammo = "ACE_Gatling_30mm_Sub_CM51";
displayName = CSTRING(GatlingDescriptionCM51);

View File

@ -1,2 +1,6 @@
PREP(initEjectAction);
PREP(canShowEject);
PREP(droneAddActions);
PREP(droneGetTurretTargetPos);
PREP(droneModifyWaypoint);
PREP(droneSetWaypoint);
PREP(initEjectAction);

View File

@ -0,0 +1,8 @@
#include "script_component.hpp"
[QGVAR(droneModifyWaypoint), LINKFUNC(droneModifyWaypoint)] call CBA_fnc_addEventHandler;
[QGVAR(droneSetWaypoint), LINKFUNC(droneSetWaypoint)] call CBA_fnc_addEventHandler;
if (hasInterface) then {
["ACE_controlledUAV", LINKFUNC(droneAddActions)] call CBA_fnc_addEventHandler;
};

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dystopian
* Check if Eject action can be shown.

View File

@ -0,0 +1,121 @@
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Adds actions to a drone
*
* Arguments:
* 0: vehicle <OBJECT>
*
* Return Value:
* None
*
* Example:
* [v] call ace_aircraft_fnc_droneAddActions
*
* Public: No
*/
params ["_vehicle"];
TRACE_1("droneAddActions",_vehicle);
if (!alive _vehicle) exitWith {};
if (_vehicle getVariable [QGVAR(droneActionsAdded), false]) exitWith {};
_vehicle setVariable [QGVAR(droneActionsAdded), true];
// move to location
private _condition = {
params ["_vehicle"];
(missionNamespace getVariable [QGVAR(droneWaypoints), true]) && {waypointsEnabledUAV _vehicle} && {(ACE_controlledUAV select 2) isEqualTo [0]}
};
private _statement = {
params ["_vehicle"];
private _group = group driver _vehicle;
private _pos = ([_vehicle, [0]] call FUNC(droneGetTurretTargetPos)) select 0;
[QGVAR(droneSetWaypoint), [_vehicle, _group, _pos, "MOVE"], _group] call CBA_fnc_targetEvent;
};
private _action = [QGVAR(droneSetWaypointMove), localize "$STR_AC_MOVE",
"\a3\3DEN\Data\CfgWaypoints\Move_ca.paa", _statement, _condition] call EFUNC(interact_menu,createAction);
[_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject);
if (_vehicle isKindOf "Air") then {
// loiter at location
_condition = {
params ["_vehicle"];
(missionNamespace getVariable [QGVAR(droneWaypoints), true]) && {waypointsEnabledUAV _vehicle} && {(ACE_controlledUAV select 2) isEqualTo [0]}
};
_statement = {
params ["_vehicle"];
private _group = group driver _vehicle;
private _pos = ([_vehicle, [0]] call FUNC(droneGetTurretTargetPos)) select 0;
[QGVAR(droneSetWaypoint), [_vehicle, _group, _pos, "LOITER"], _group] call CBA_fnc_targetEvent;
};
_action = [QGVAR(droneSetWaypointLoiter), localize "$STR_AC_LOITER",
"\a3\3DEN\Data\CfgWaypoints\Loiter_ca.paa", _statement, _condition] call EFUNC(interact_menu,createAction);
[_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject);
// set height
_condition = {
params ["_vehicle"];
(missionNamespace getVariable [QGVAR(droneWaypoints), true]) && {waypointsEnabledUAV _vehicle} && {(ACE_controlledUAV select 2) isEqualTo [0]}
};
_statement = {
params ["_vehicle", "", "_args"];
private _group = group driver _vehicle;
[QGVAR(droneModifyWaypoint), [_vehicle, _group, "height", _args], _group] call CBA_fnc_targetEvent;
};
_action = [QGVAR(setAltitude), localize "$STR_3den_waypoint_attribute_loiteraltitude_displayname",
"", {}, _condition] call EFUNC(interact_menu,createAction);
private _base = [_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject);
{
_action = [str _x, str _x, "", _statement, { true }, {}, _x] call EFUNC(interact_menu,createAction);
[_vehicle, 1, _base, _action] call EFUNC(interact_menu,addActionToObject);
} forEach [20, 50, 200, 500, 2000];
// set loiter radius
_condition = {
params ["_vehicle"];
private _group = group driver _vehicle;
private _index = (currentWaypoint _group) min count waypoints _group;
private _waypoint = [_group, _index];
(missionNamespace getVariable [QGVAR(droneWaypoints), true]) && {waypointsEnabledUAV _vehicle} && {(ACE_controlledUAV select 2) isEqualTo [0]}
&& {(waypointType _waypoint) == "LOITER"}
};
_statement = {
params ["_vehicle", "", "_args"];
private _group = group driver _vehicle;
[QGVAR(droneModifyWaypoint), [_vehicle, _group, "radius", _args], _group] call CBA_fnc_targetEvent;
};
_action = [QGVAR(lotierRadius), localize "$STR_3den_waypoint_attribute_loiterradius_displayname",
"", {}, _condition] call EFUNC(interact_menu,createAction);
_base = [_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject);
{
_action = [str _x, str _x, "", _statement, { true }, {}, _x] call EFUNC(interact_menu,createAction);
[_vehicle, 1, _base, _action] call EFUNC(interact_menu,addActionToObject);
} forEach [500, 750, 1000, 1250, 1500];
// set loiter direction
_condition = {
params ["_vehicle", "", "_args"];
private _group = group driver _vehicle;
private _index = (currentWaypoint _group) min count waypoints _group;
private _waypoint = [_group, _index];
(missionNamespace getVariable [QGVAR(droneWaypoints), true]) && {waypointsEnabledUAV _vehicle} && {(ACE_controlledUAV select 2) isEqualTo [0]}
&& {(waypointType _waypoint) == "LOITER"} && {(waypointLoiterType _waypoint) != _args}
};
_statement = {
params ["_vehicle", "", "_args"];
private _group = group driver _vehicle;
[QGVAR(droneModifyWaypoint), [_vehicle, _group, "dir", _args], _group] call CBA_fnc_targetEvent;
};
_action = [QGVAR(lotierTypeR), localize "$STR_3den_waypoint_attribute_loiterdirection_displayname",
"\a3\3DEN\Data\Attributes\LoiterDirection\cw_ca.paa", _statement, _condition, {}, "CIRCLE"] call EFUNC(interact_menu,createAction);
[_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject);
_action = [QGVAR(lotierTypeR), localize "$STR_3den_waypoint_attribute_loiterdirection_displayname",
"\a3\3DEN\Data\Attributes\LoiterDirection\ccw_ca.paa", _statement, _condition, {}, "CIRCLE_L"] call EFUNC(interact_menu,createAction);
[_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject);
};

View File

@ -0,0 +1,46 @@
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Get drone's target location, if aimed at infinity it will return a virtual point
*
* Arguments:
* 0: vehicle <OBJECT>
*
* Return Value:
* [PosASL <ARRAY>, Real <BOOL>]
*
* Example:
* [v] call ace_aircraft_fnc_droneGetTurretTargetPos
*
* Public: No
*/
params ["_vehicle"];
private _turret = [0];
TRACE_2("droneGetTurretTargetPos",_vehicle,_turret);
private _turretConfig = [_vehicle, _turret] call CBA_fnc_getTurret;
private _gunBeg = _vehicle selectionPosition getText (_turretConfig >> "gunBeg");
private _gunEnd = _vehicle selectionPosition getText (_turretConfig >> "gunEnd");
if (_gunEnd isEqualTo _gunBeg) then {
// e.g. Darter doesn't have valid gunBeg/gunEnd
private _vehicleConfig = configOf _vehicle;
_gunBeg = _vehicle selectionPosition getText (_vehicleConfig >> "uavCameraGunnerDir");
_gunEnd = _vehicle selectionPosition getText (_vehicleConfig >> "uavCameraGunnerPos");
};
_gunBeg = AGLToASL (_vehicle modelToWorld _gunBeg);
_gunEnd = AGLToASL (_vehicle modelToWorld _gunEnd);
private _turretDir = _gunEnd vectorFromTo _gunBeg;
private _farPoint = _gunEnd vectorAdd (_turretDir vectorMultiply 4999);
private _intersections = lineIntersectsSurfaces [_gunEnd, _farPoint, _vehicle, objNull, true, 1];
if (_intersections isNotEqualTo []) then {
[_intersections select 0 select 0, true]
} else {
// Not looking at anything, just get a virtual point where the camera is pointing
_farPoint set [2, 0 max getTerrainHeightASL _farPoint];
[_farPoint, false]
};

View File

@ -0,0 +1,36 @@
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Modify the current waypoint of a drone
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Group <GROUP>
* 2: Type <STRING>
* 3: Value <ANY>
*
* Return Value:
* None
*
* Example:
* [v, group v, "height", 2000] call ace_aircraft_fnc_droneModifyWaypoint
*
* Public: No
*/
params ["_vehicle", "_group", "_type", "_value"];
TRACE_4("droneModifyWaypoint",_vehicle,_group,_type,_value);
private _index = (currentWaypoint _group) min count waypoints _group;
private _waypoint = [_group, _index];
switch (toLower _type) do {
case ("height"): {
private _pos = waypointPosition _waypoint;
_pos set [2, _value];
_waypoint setWaypointPosition [_pos, 0];
_vehicle flyInHeight _value;
};
case ("radius"): { _waypoint setWaypointLoiterRadius _value; };
case ("dir"): { _waypoint setWaypointLoiterType _value; };
};
_group setCurrentWaypoint _waypoint;

View File

@ -0,0 +1,43 @@
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Set new waypoint of a drone
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Group <GROUP>
* 2: Pos 2D <ARRAY>
* 3: Type <STRING>
*
* Return Value:
* None
*
* Example:
* [v, group v, [2000,5000], "LOITER"] call ace_aircraft_fnc_droneSetWaypoint
*
* Public: No
*/
params ["_vehicle", "_group", "_pos", "_type"];
TRACE_4("droneSetWaypoint",_vehicle,_group,_pos,_type);
private _index = (currentWaypoint _group) min count waypoints _group;
private _waypoint = [_group, _index];
// Try to save attributes from existing waypoint
private _currentHeight = round ((waypointPosition _waypoint) select 2);
private _currentLoiterRadius = waypointLoiterRadius _waypoint;
private _currentLoiterType = waypointLoiterType _waypoint;
// Set pos to ATL
_pos set [2, if (_currentHeight >= 50) then { _currentHeight } else { 0 }];
// [_group] call CBA_fnc_clearWaypoints;
_waypoint = _group addWaypoint [_pos, 0];
_waypoint setWaypointType _type;
TRACE_3("",_currentHeight,_currentLoiterRadius,_currentLoiterType);
if (_currentHeight > 1) then { _vehicle flyInHeight _currentHeight; };
if (_currentLoiterRadius > 1) then { _waypoint setWaypointLoiterRadius _currentLoiterRadius; };
if (_currentLoiterType != "") then { _waypoint setWaypointLoiterType _currentLoiterType; };
_group setCurrentWaypoint _waypoint;

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dystopian
* Add Eject action to vehicle if needed.

View File

@ -1 +0,0 @@
#include "\z\ace\addons\aircraft\script_component.hpp"

View File

@ -56,6 +56,7 @@
<English>30mm High-Explosive Incendiary</English>
<Spanish>30mm Alto Explosivo Incendiaria</Spanish>
<Chinese>30毫米高爆燃燒彈</Chinese>
<Chinesesimp>30 mm 高爆燃烧</Chinesesimp>
<French>30 mm High-Explosive Incendiary</French>
<Polish>30mm Odłamkowo-Burzące - Zapalające</Polish>
<Turkish>30mm Yüksek Patlayıcı </Turkish>
@ -63,11 +64,13 @@
<Japanese>30mm 焼夷りゅう弾</Japanese>
<Czech>30mm Tříštivo-trhavá zápalná střela</Czech>
<Russian>30мм Осколочно-Фугасный Зажигательный</Russian>
<Korean>30mm 고폭소이탄</Korean>
</Key>
<Key ID="STR_ACE_Aircraft_GatlingDescriptionShortHEI">
<English>30mm HEI</English>
<Spanish>30mm AEI</Spanish>
<Chinese>30毫米高爆燃燒</Chinese>
<Chinesesimp>30mm 高爆燃烧</Chinesesimp>
<French>30 mm HEI</French>
<Polish>30mm OB-Z</Polish>
<Turkish>30mm HEI</Turkish>
@ -75,11 +78,13 @@
<Japanese>30mm HEI</Japanese>
<Czech>30mm HEI</Czech>
<Russian>30мм ОФЗ</Russian>
<Korean>30mm HEI</Korean>
</Key>
<Key ID="STR_ACE_Aircraft_GatlingDescriptionAP">
<English>30mm DU Armor Piercing</English>
<Spanish>30mm UE Perforante de Blindaje</Spanish>
<Chinese>30毫米貧化鈾穿甲彈 </Chinese>
<Chinesesimp>30 mm 贫铀穿甲</Chinesesimp>
<French>30 mm UA Armor Piercing</French>
<Polish>30mm Zubożony Uran - Przebijające</Polish>
<Turkish>30mm DU Zırh Delici</Turkish>
@ -87,11 +92,13 @@
<Japanese>30mm DU 徹甲弾</Japanese>
<Czech>30mm Protipancéřová střela z ochuzeného Uranu</Czech>
<Russian>30мм ОУ Бронебойный Снаряд</Russian>
<Korean>30mm 열화우라늄 철갑탄</Korean>
</Key>
<Key ID="STR_ACE_Aircraft_GatlingDescriptionShortAP">
<English>30mm DU AP</English>
<Spanish>30mm UE AP</Spanish>
<Chinese>30毫米貧鈾穿甲</Chinese>
<Chinesesimp>30mm 贫铀穿甲</Chinesesimp>
<French>30 mm UA AP</French>
<Polish>30mm ZU-P</Polish>
<Turkish>30mm DU AP</Turkish>
@ -99,11 +106,13 @@
<Japanese>30mm DU AP</Japanese>
<Czech>30 mm DU AP</Czech>
<Russian>30мм ОУ БС</Russian>
<Korean>30mm DU AP</Korean>
</Key>
<Key ID="STR_ACE_Aircraft_GatlingDescriptionCM41">
<English>30mm Combat Mix 4:1 DU:HEI</English>
<Spanish>30mm Mezcla de Combate 4:1 UE:AEI</Spanish>
<Chinese>30毫米戰鬥混合彈4:1 穿甲:高爆</Chinese>
<Chinesesimp>30mm 战斗混合 穿甲/高爆 4:1</Chinesesimp>
<French>30 mm Mix de Combat 4:1 UA:HEI</French>
<Polish>30mm Mieszanka bojowa 4:1 ZU:OB-Z</Polish>
<Turkish>30mm Combat Mix 4:1 DU:HEI</Turkish>
@ -111,11 +120,13 @@
<Japanese>30mm コンバット ミックス 4:1 DU:HEI</Japanese>
<Czech>30mm Bojový Mix 4:1 DU:HEI</Czech>
<Russian>30мм Смешанное боепитание 4:1 ОУ:ОФЗ</Russian>
<Korean>30mm 4:1 열화:고폭소이</Korean>
</Key>
<Key ID="STR_ACE_Aircraft_GatlingDescriptionShortCM41">
<English>30mm CM 4:1</English>
<Spanish>30mm MC 4:1</Spanish>
<Chinese>30毫米 穿高混合 4:1</Chinese>
<Chinesesimp>30mm 穿爆混合 4:1</Chinesesimp>
<French>30 mm MdC 4:1</French>
<Polish>30mm MB 4:1</Polish>
<Turkish>30mm CM 4:1</Turkish>
@ -123,11 +134,13 @@
<Japanese>30mm CM 4:1</Japanese>
<Czech>30mm BM 4:1</Czech>
<Russian>30мм СБ 4:1</Russian>
<Korean>30mm CM 4:1</Korean>
</Key>
<Key ID="STR_ACE_Aircraft_GatlingDescriptionCM51">
<English>30mm Combat Mix 5:1 DU:HEI</English>
<Spanish>30mm Mezcla de Combate 5:1 UE:AEI</Spanish>
<Chinese>30毫米戰鬥混合彈5:1 穿甲:高爆</Chinese>
<Chinesesimp>30 mm 战斗混合 穿甲/高爆 5:1</Chinesesimp>
<French>30 mm Mix de Combat 5:1 UA:HEI</French>
<Polish>30mm Mieszanka bojowa 5:1 ZU:OB-Z</Polish>
<Turkish>30mm Combat Mix 5:1 DU:HEI</Turkish>
@ -135,11 +148,13 @@
<Japanese>30mm コンバット ミックス 5:1 DU:HEI</Japanese>
<Czech>30mm Bojový Mix 5:1 DU:HEI</Czech>
<Russian>30мм Смешанное боепитание 5:1 ОУ:ОФЗ</Russian>
<Korean>30mm 5:1 열화:고폭소이</Korean>
</Key>
<Key ID="STR_ACE_Aircraft_GatlingDescriptionShortCM51">
<English>30mm CM 5:1</English>
<Spanish>30mm MC 5:1</Spanish>
<Chinese>30毫米 穿高混合 5:1</Chinese>
<Chinesesimp>30mm 穿爆混合 5:1</Chinesesimp>
<French>30 mm MdC 5:1</French>
<Polish>30mm MB 5:1</Polish>
<Turkish>30mm CM 5:1</Turkish>
@ -147,6 +162,7 @@
<Japanese>30mm CM 5:1</Japanese>
<Czech>30mm BM 5:1</Czech>
<Russian>30мм СБ 5:1</Russian>
<Korean>30mm CM 5:1</Korean>
</Key>
</Package>
</Project>

Binary file not shown.

Binary file not shown.

View File

@ -18,11 +18,14 @@ class CfgModels {
skeletonName = "";
};
class ace_entrchtool: Default {};
class ace_envelope_big: Default {};
class ace_envelope_big4: Default {};
class ace_envelope_big4_nogeo: Default {};
class ace_envelope_small: Default {};
class ace_envelope_small4: Default {};
class ace_envelope_small4_nogeo: Default {};
class ace_envelope: Default {
sections[] = {"velka"};
};
class ace_envelope_big: ace_envelope {};
class ace_envelope_big4: ace_envelope {};
class ace_envelope_big4_nogeo: ace_envelope {};
class ace_envelope_small: ace_envelope {};
class ace_envelope_small4: ace_envelope {};
class ace_envelope_small4_nogeo: ace_envelope {};
class LWTS_optic: Default {};
};
};

View File

@ -0,0 +1 @@
class GVAR(actions) {};

Some files were not shown because too many files have changed in this diff Show More