Merge branch 'proneLauncher' of https://github.com/PiZZAD0X/ACE3 into pr/7002

This commit is contained in:
johnb432 2024-07-03 11:30:23 +02:00
commit 01218d0efa
5540 changed files with 139395 additions and 70540 deletions

10
.gitattributes vendored
View File

@ -2,3 +2,13 @@
*.png binary
*.jpg binary
*.paa binary
# Change GitHub language categorization
addons/**/*.cpp linguist-language=SQF
addons/**/*.hpp linguist-language=SQF
optionals/**/*.cpp linguist-language=SQF
optionals/**/*.hpp linguist-language=SQF
# Do not count hemtt includes in language usage stats
include/* linguist-vendored

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.
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, use GitHub's draft feature. This will mark the PR as a work in progress and will prevent it from being merged until you mark it as ready for review.
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

@ -1,25 +0,0 @@
**Arma 3 Version:** `x.xx` (stable / rc / dev)
**CBA Version:** `3.x.x` (stable / dev + commit hash)
**ACE3 Version:** `3.x.x` (stable / dev + commit hash)
**Mods:**
```
- CBA_A3
- ace
```
**Description:**
- Add a detailed description of the error. This makes it easier for us to fix the issue.
**Steps to reproduce:**
- Add the steps needed to reproduce the issue.
**Where did the issue occur?**
- Dedicated / Self-Hosted Multiplayer / Singleplayer / Editor (Singleplayer) / Editor (Multiplayer) / Virtual Arsenal
**Additional information:**
- Provide any additional information that will help us solve this issue.
**RPT log file:**
- Add a link ([gist](https://gist.github.com) or [pastebin](http://pastebin.com)) to the client and/or server RPT file. An instruction to find your RPT files can be found [here](https://community.bistudio.com/wiki/Crash_Files#Arma_3).
- If possible at the time the bug is encountered, go to Options and select "ACE Debug To Clipboard", this will print extensive debug information to the RPT file and copy it to clipboard.

52
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,52 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: kind/bug
assignees: ''
---
<!--
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template or parts of it and go my own path, the team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the team may close my issue without further explanation or engagement.
3. If I write an issue that has duplicates, the team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the team may close my issue without further explanation or engagement.
6. If I file an issue without collecting logs (RPT file, etc...), the team may close my issue without further explanation or engagement.
All good? Then proceed and fill out the items below.
-->
**Mods (complete and add to the following information):**
- **Arma 3:** `x.xx` [e.g. 1.00 stable, rc, dev]
- **CBA:** `3.x.x` [e.g. 3.0.0 stable, commit hash]
- **ACE3:** `3.x.x` [e.g. 3.0.0 stable, commit hash]
<!-- Make sure to reproduce the issue with only CBA and ACE3 on a newly created mission! -->
**Description:**
A clear and concise description of what the bug is.
**Steps to reproduce:**
_Follow [this flowchart](https://ace3.acemod.org/img/wiki/user/issue_flowchart.webp)!_
1. _Go to ..._
2. _Click ..._
3. _See ..._
**Expected behavior:**
A clear and concise description of what you expected to happen.
**Where did the issue occur?**
- Dedicated / Self-Hosted Multiplayer / Singleplayer / Editor (Singleplayer) / Editor (Multiplayer) / Virtual Arsenal
**Log Files:**
- Link to ([gist](https://gist.github.com) or [pastebin](http://pastebin.com)) to the client and/or server RPT file. An instruction to find your RPT files can be found [here](https://community.bistudio.com/wiki/Crash_Files#Arma_3).
**Additional context:**
Add any other context about the problem here.
**Screenshots:**
If applicable, add screenshots to help explain your problem.

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1 @@
blank_issues_enabled: false

View File

@ -0,0 +1,12 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: kind/feature request, status/invalid
assignees: ''
---
### Do not post feature requests here!
Learn how to make a feature request [here](https://ace3.acemod.org/wiki/user/how-to-make-a-feature-request.html).

View File

@ -1,5 +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/)
- _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}`.

48
.github/release-drafter.yml vendored Normal file
View File

@ -0,0 +1,48 @@
branches:
- master
- release-drafter # for testing edits to this configuration
name-template: 'Version $NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
sort-by: title # sort alphabetically
sort-direction: ascending
categories:
- title: '**ADDED:**'
labels:
- 'kind/feature'
- title: '**FIXED:**'
labels:
- 'kind/bug-fix'
- title: '**IMPROVED:**'
labels:
- 'kind/enhancement'
- 'kind/optimization'
- title: '**CHANGED:**'
labels:
- 'kind/cleanup'
- 'kind/change'
- title: '**SETTINGS:**'
labels:
- 'kind/setting'
- title: '**TRANSLATIONS:**'
labels:
- 'kind/translation'
exclude-labels:
- 'ignore-changelog'
- 'dependencies'
change-template: '- $TITLE (#$NUMBER)'
template: |
_Requires CBA version X.Y.Z or later and Arma 3 version X.Y or later._
## Change Log Summary
$CHANGES
replacers:
# Category titles
- search: '/\#\# (\*\*(ADDED|FIXED|IMPROVED|CHANGED|SETTINGS|TRANSLATIONS):\*\*)/g'
replace: '$1'

1
.github/stale.yml vendored
View File

@ -14,6 +14,7 @@ exemptLabels:
- status/cherrypick
- status/merge on release
- sticky
- help wanted
# Label to use when marking an issue as stale
staleLabel: status/stale

54
.github/workflows/arma.yml vendored Normal file
View File

@ -0,0 +1,54 @@
name: Arma
on:
push:
branches:
- master
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Validate SQF
run: python3 tools/sqf_validator.py
- name: Validate Config
run: python3 tools/config_style_checker.py
- name: Validate Stringtables
run: python3 tools/stringtable_validator.py
- name: Check Strings
run: python3 tools/check_strings.py
- name: Check for BOM
uses: arma-actions/bom-check@master
with:
path: 'addons'
- 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@v4
- name: Lint (sqflint)
uses: arma-actions/sqflint@master
continue-on-error: true # No failure due to many false-positives
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- 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@v4
with:
name: ace3-${{ github.sha }}-nobin
path: .hemttout/@*

85
.github/workflows/documentation.yml vendored Normal file
View File

@ -0,0 +1,85 @@
name: Documentation
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@v4
- name: Install Python packages
run: |
pip3 install wheel
pip3 install setuptools
pip3 install pygithub
pip3 install pygithub3
- name: Deploy
if: github.repository == 'acemod/ACE3' && ! contains(github.event.head_commit.message, '[ci skip]')
env:
GH_TOKEN: ${{ secrets.DOCS_TOKEN }}
run: python3 tools/deploy.py
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v4
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@v4
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

29
.github/workflows/extensions.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Extensions
on:
pull_request:
paths:
- 'extensions/**'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Build
shell: cmd
run: |
cd extensions
mkdir build
cd build
cmake .. && cmake --build .
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ace3_extensions-${{ matrix.os }}-debug
path: extensions/build

44
.github/workflows/hemtt.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: HEMTT
on:
push:
branches:
- master
pull_request_target:
jobs:
windows:
runs-on: windows-latest
steps:
- name: Install Arma 3 Tools
uses: arma-actions/arma3-tools@master
with:
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
- name: Checkout the source code
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Checkout pull request
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
path: pullrequest
ref: 'refs/pull/${{ github.event.number }}/merge'
- name: Replace addons with pull request addons
if: ${{ github.event_name == 'pull_request_target' }}
run: |
rm -r addons\
rm -r optionals\
rm -r include\
xcopy /e /h /q pullrequest\addons addons\
xcopy /e /h /q pullrequest\optionals optionals\
xcopy /e /h /q pullrequest\include include\
- name: Run HEMTT build
run: hemtt build
- name: Rename build folder
run: mv .hemttout/build .hemttout/@ace
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ace3-${{ github.sha }}
path: .hemttout/@*

85
.github/workflows/pboproject.yml vendored Normal file
View File

@ -0,0 +1,85 @@
name: pboProject
on:
push:
branches:
- master
pull_request_target:
jobs:
pboproject:
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@2023-01-04
- name: Download game data
run: |
Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip
Invoke-WebRequest "$env:RHSAFRF_URL" -OutFile rhsafrf.zip
Invoke-WebRequest "$env:RHSGREF_URL" -OutFile rhsgref.zip
Invoke-WebRequest "$env:RHSSAF_URL" -OutFile rhssaf.zip
Invoke-WebRequest "$env:RHSUSF_URL" -OutFile rhsusf.zip
$files = @("arma3.zip", "rhsafrf.zip", "rhsgref.zip", "rhssaf.zip", "rhsusf.zip")
ForEach ($file in $files) {
Expand-7ZipArchive -Path $file -DestinationPath .
Remove-Item $file
}
env:
ARMA3_DATA_URL: ${{ secrets.ARMA3_DATA_URL }}
RHSAFRF_URL: ${{ secrets.RHSAFRF_URL }}
RHSGREF_URL: ${{ secrets.RHSGREF_URL }}
RHSSAF_URL: ${{ secrets.RHSSAF_URL }}
RHSUSF_URL: ${{ secrets.RHSUSF_URL }}
- name: Checkout CBA A3
uses: actions/checkout@v4
with:
path: x\cba
ref: master
repository: CBATeam/CBA_A3.git
- name: Checkout ACE3
uses: actions/checkout@v4
with:
path: z\ace
persist-credentials: false
- name: Checkout pull request
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
path: pullrequest
ref: 'refs/pull/${{ github.event.number }}/merge'
- name: Replace addons with pull request addons
if: ${{ github.event_name == 'pull_request_target' }}
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\gm gm\
xcopy /e /h /q z\ace\tools\pDummies\vn vn\
xcopy /e /h /q z\ace\tools\pDummies\WW2 WW2\
xcopy /e /h /q z\ace\tools\pDummies\CUP CUP\
- name: Build
run: py P:\z\ace\tools\make.py ci
env:
PYTHONUNBUFFERED: 1
- name: Archive logs
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: logs
path: temp/*.log
- name: Archive @ace
uses: actions/upload-artifact@v4
with:
name: '@ace3-${{ github.sha }}'
path: z\ace\release\@ace

16
.github/workflows/release-drafter.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: Release Drafter
on:
push:
branches:
- master
jobs:
draft:
runs-on: ubuntu-latest
steps:
- name: Release Drafter
if: github.repository == 'acemod/ACE3'
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,20 +0,0 @@
# No issues and PRs without labels
issues=false
pr-wo-labels=false
# Issues are disabled, don't fetch them
max-issues=0
# Label filters
exclude-labels=by design,can't reproduce,duplicate,question,invalid,wontfix,ignore changelog
# Tag is created before generating changelog for release candidates
unreleased=false
# No section labels, we only want a list of merged PRs (label separation only works for Issues)
simple-list=true
# Misc
author=false
compare-link=false
header-label=## Change Log Summary

12
.gitignore vendored
View File

@ -1,8 +1,14 @@
@*
*.zip
release/*
releases/*
extensions/vcproj32/*
extensions/vcproj64/*
.vscode/*
hemtt
hemtt.exe
.hemttout
tools/temp
tools/armake.exe
*.cache
*.pbo
texHeaders.bin
@ -11,3 +17,7 @@ texHeaders.bin
*.biprivatekey
Thumbs.db
CHANGELOG.md
sqfvm.exe
ArmaScriptCompiler.exe
*.sqfc
!extras/**/*.zip

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");
}

67
.hemtt/project.toml Normal file
View File

@ -0,0 +1,67 @@
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
# Unused in HEMTT v1.11 or higher, kept for backwards compatibility
[asc]
enabled = true
exclude = [
".inc.sqf",
"/dev/",
"common/functions/fnc_dummy.sqf",
"zeus/functions/fnc_zeusAttributes.sqf",
]
[hemtt.launch.default]
workshop = [
"450814997", # CBA_A3
]
[hemtt.launch.spe]
workshop = [
"450814997", # CBA_A3
]
dlc = [
"spe"
]
[hemtt.launch.vn]
workshop = [
"450814997", # CBA_A3's Workshop ID
]
dlc = [
"S.O.G. Prairie Fire",
]
[hemtt.launch.ws]
workshop = [
"450814997", # CBA_A3's Workshop ID
]
dlc = [
"Western Sahara",
]
[hemtt.launch.rhs]
workshop = [
"450814997", # CBA_A3's Workshop ID
"843425103", # RHS AFRF Workshop ID
"843577117", # RHS USAF Workshop ID
"843593391", # RHS GREF Workshop ID
"843632231", # RHS SAF Workshop ID
]

View File

@ -6,82 +6,102 @@
# request, preferably including an email address.
# CORE TEAM
BaerMitUmlaut
Brett Mayson
bux578 <github@jonathandavid.de>
commy2
Dahlgren
Drofseh <drofseh.arma@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
johnb43
jokoho482 <jokoho482@gmail.com>
Jonpas <jonpas33@gmail.com>
Kieran
kymckay
mharis001 <mhariszakar@gmail.com>
MikeMF
MiszczuZPolski
NouberNou
PabstMirror <pabstmirror@gmail.com>
Ruthberg <ulteq@web.de>
SilentSpike <SilentSpike100@gmail.com>
tcvm <baileydanyluk@gmail.com>
tpM
veteran29
ViperMaul
VKing <kauestad@gmail.com>
Walter Pearce <jaynus@gmail.com>
# CONTRIBUTORS
[BIG]Bull
10Dozen a.k.a Dusin
11RDP-LoupVert <loupvert@11rdp.fr>
654wak654 <ozanegitmen@gmail.com>
ACCtomeek <tomeek99@gmail.com>
[BIG]Bull
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>
Arcanum417 <lubos.len@gmail.com>
Anton
Arcanum417 <lubos.len@gmail.com>
Arkhir <wonsz666@gmail.com >
ARV187 aka Spark23
Asgar Serran <piechottaf@web.de>
BaerMitUmlaut
Bamse <bamsis@gmail.com>
Barman75
Bla1337
BlackPixxel <blackpixxel96@gmail.com>
BlackQwar
Brakoviejo
Brandon (TCVM) <brandondanyluk366@gmail.com>
Brisse <brisse@outlook.com>
Brostrom.A | Evul <andreas.brostrom.ce@gmail.com>
BullHorn <bullhorn7@gmail.com>
C0kkie
chris579 <github@klemm.one>
classicarma
Clon1998 <ps.patti1998@gmail.com>
Codingboy
Coren <coren4@gmail.com>
Crusty
C0kkie
Cyruz143
dabako <dabako@dabakoworld.de>
dgibso29 <gibson@earringpranks.com>
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
Dimaslg <dimaslg@telecable.es>
diwako
dixon13 <dixonbegay@gmail.com>
Drift_91
Drill <drill87@gmail.com>
Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
Drofseh <drofseh@gmail.com>
Dslyecxi <dslyecxi@gmail.com>
Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
Eclipser <jms@modeemi.fi>
Elgin675
ElTyranos
eRazeri
evromalarkey <evromalarkey@gmail.com>
F3 Project <alanr@ferstaberinde.com>
Falke75
Fatal <tahakocalgs@gmail.com>
Ferenczi
Ferenzi
FFAAMOD <modffaa@gmail.com>
Filip Basara <filip.basara93@googlemail.com>
fr89k <kaschitoku@web.de>
Fragment
Frank <frankplow@protonmail.com>
FreeZbe <freeseb@gmail.com>
Fyuran <dankemedic@hotmail.com>
geraldbolso1899
Ghost
Gianmarco Varriale (TeamNuke) <admin@forhost.org>
@ -96,11 +116,18 @@ havena <silveredenis@gmail.com>
Hawkins
Head <brobergsebastian@gmail.com>
Hybrid V
Hypoxic <martini_a@outlook.com>
JasperRab <jasper@jasperrab.eu>
JDT
john681611 <john681611@hotmail.com>
JoramD
Karneck <dschultz26@hotmail.com>
Kavinsky <nmunozfernandez@gmail.com>
Keithen <Keithen.Neu@gmail.com>
Kllrt <kllrtik@gmail.com>
KokaKolaA3
Krzyciu
LAxemann
legman <juicemelon@msn.com>
Legolasindar "Viper" <legolasindar@gmail.com>
licht-im-Norden87 <lichtimnorden87@gmail.com>
@ -110,34 +137,45 @@ Luigi "Luigium" Myrini <luigium@outlook.fr>
Macusercom <macusercom@gmail.com>
MarcBook
meat <p.humberdroz@gmail.com>
mharis001 <mhariszakar@gmail.com>
Michail Nikolaev
MikeMatrix <m.braun92@gmail.com>
mjc4wilton <mjc4wilton@gmail.com>
Mysteryjuju
nic547 <nic547@outlook.com>
nikolauska <nikolauska1@gmail.com>
nomisum <nomisum@gmail.com>
OnkelDisMaster <onkeldismaster@gmail.com>
Orbis2358 <mgkid3310@naver.com>
oscarmolinadev
Panisher (Tushino Serious Games) <panisher333@gmail.com>
PaxJaromeMalues <seemax1991@gmail.com>
PiZZADOX <509thParachuteInfantry@gmail.com>
Phyma <sethramstrom@gmail.com>
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
Smith <smitt14ua@gmail.com>
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>
@ -147,7 +185,11 @@ Tuupertunut
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
Zman6258

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

View File

@ -1,91 +0,0 @@
VERSION = $(shell cat "VERSION")
PREFIX = ace
BIN = @ace
ZIP = ace3
FLAGS = -i include -w unquoted-string -w redefinition-wo-undef
VERSION_FILES = README.md docs/README_DE.md docs/README_PL.md mod.cpp
MAJOR = $(word 1, $(subst ., ,$(VERSION)))
MINOR = $(word 2, $(subst ., ,$(VERSION)))
PATCH = $(word 3, $(subst ., ,$(VERSION)))
BUILD = $(word 4, $(subst ., ,$(VERSION)))
VERSION_S = $(MAJOR).$(MINOR).$(PATCH)
GIT_HASH = $(shell git log -1 --pretty=format:"%H" | head -c 8)
ifeq ($(OS), Windows_NT)
ARMAKE = ./tools/armake.exe # Downloaded via make.ps (rename armake_wXY.exe otherwise)
else
ARMAKE = armake
endif
$(BIN)/addons/$(PREFIX)_%.pbo: addons/%
@mkdir -p $(BIN)/addons
@echo " PBO $@"
@${ARMAKE} build ${FLAGS} -f -e "version=$(GIT_HASH)" $< $@
$(BIN)/optionals/$(PREFIX)_%.pbo: optionals/%
@mkdir -p $(BIN)/optionals
@echo " PBO $@"
@${ARMAKE} build ${FLAGS} -f -e "version=$(GIT_HASH)" $< $@
# Shortcut for building single addons (eg. "make <component>.pbo")
%.pbo:
"$(MAKE)" $(MAKEFLAGS) $(patsubst %, $(BIN)/addons/$(PREFIX)_%, $@)
all: $(patsubst addons/%, $(BIN)/addons/$(PREFIX)_%.pbo, $(wildcard addons/*)) \
$(patsubst optionals/%, $(BIN)/optionals/$(PREFIX)_%.pbo, $(wildcard optionals/*))
filepatching:
"$(MAKE)" $(MAKEFLAGS) FLAGS="-w unquoted-string -p"
$(BIN)/keys/%.biprivatekey:
@mkdir -p $(BIN)/keys
@echo " KEY $@"
@${ARMAKE} keygen -f $(patsubst $(BIN)/keys/%.biprivatekey, $(BIN)/keys/%, $@)
$(BIN)/addons/$(PREFIX)_%.pbo.$(PREFIX)_$(VERSION)-$(GIT_HASH).bisign: $(BIN)/addons/$(PREFIX)_%.pbo $(BIN)/keys/$(PREFIX)_$(VERSION).biprivatekey
@echo " SIG $@"
@${ARMAKE} sign -f -s $@ $(BIN)/keys/$(PREFIX)_$(VERSION).biprivatekey $<
$(BIN)/optionals/$(PREFIX)_%.pbo.$(PREFIX)_$(VERSION)-$(GIT_HASH).bisign: $(BIN)/optionals/$(PREFIX)_%.pbo $(BIN)/keys/$(PREFIX)_$(VERSION).biprivatekey
@echo " SIG $@"
@${ARMAKE} sign -f -s $@ $(BIN)/keys/$(PREFIX)_$(VERSION).biprivatekey $<
signatures: $(patsubst addons/%, $(BIN)/addons/$(PREFIX)_%.pbo.$(PREFIX)_$(VERSION)-$(GIT_HASH).bisign, $(wildcard addons/*)) \
$(patsubst optionals/%, $(BIN)/optionals/$(PREFIX)_%.pbo.$(PREFIX)_$(VERSION)-$(GIT_HASH).bisign, $(wildcard optionals/*))
extensions: $(wildcard extensions/*/*)
cd extensions/build && cmake .. && make
find ./extensions/build/ \( -name "*.so" -o -name "*.dll" \) -exec cp {} ./ \;
extensions-win64: $(wildcard extensions/*/*)
cd extensions/build && CXX=$(eval $(which g++-w64-mingw-i686)) cmake .. && make
version:
@echo " VER $(VERSION)"
$(shell sed -i -r -s 's/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/$(VERSION)/g' $(VERSION_FILES))
$(shell sed -i -r -s 's/[0-9]+\.[0-9]+\.[0-9]+/$(VERSION_S)/g' $(VERSION_FILES))
@echo -e "#define MAJOR $(MAJOR)\n#define MINOR $(MINOR)\n#define PATCHLVL $(PATCH)\n#define BUILD $(BUILD)" > "addons/main/script_version.hpp"
$(shell sed -i -r -s 's/ACE_VERSION_MAJOR [0-9]+/ACE_VERSION_MAJOR $(MAJOR)/g' extensions/CMakeLists.txt)
$(shell sed -i -r -s 's/ACE_VERSION_MINOR [0-9]+/ACE_VERSION_MINOR $(MINOR)/g' extensions/CMakeLists.txt)
$(shell sed -i -r -s 's/ACE_VERSION_REVISION [0-9]+/ACE_VERSION_REVISION $(PATCH)/g' extensions/CMakeLists.txt)
commit:
@echo " GIT commit release preparation"
@git add -A
@git diff-index --quiet HEAD || git commit -am "Prepare release $(VERSION_S)" -q
push: commit
@echo " GIT push release preparation"
@git push -q
release: clean version commit
@"$(MAKE)" $(MAKEFLAGS) signatures
@echo " ZIP $(ZIP)_$(VERSION_S).zip"
@cp *.dll mod.cpp README.md docs/README_DE.md docs/README_PL.md AUTHORS.txt LICENSE logo_ace3_ca.paa meta.cpp $(BIN)
@zip -qr $(ZIP)_$(VERSION_S).zip $(BIN)
clean:
rm -rf $(BIN) $(ZIP)_*.zip
.PHONY: all filepatching signatures extensions extensions-win64 version commit push release clean

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.12.6-blue.svg?style=flat-square" alt="ACE3 Version">
<img src="https://img.shields.io/github/release/acemod/ACE3.svg?style=flat-square&label=Version" 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,11 +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://slackin.ace3mod.com/badge.svg?style=flat-square&label=Slack" alt="ACE3 Slack">
</a>
<a href="https://circleci.com/gh/acemod/ACE3">
<img src="https://circleci.com/gh/acemod/ACE3.svg?style=svg" alt="ACE3 Build Status">
<a href="https://acemod.org/discord">
<img src="https://img.shields.io/badge/Discord-Join-darkviolet.svg?style=flat-square" alt="ACE3 Discord">
</a>
</p>
@ -78,8 +76,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 +85,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. Remember to add yourself to the author array of any PBO you will be editing and the [`AUTHORS.txt`](https://github.com/acemod/ACE3/blob/master/AUTHORS.txt) file; including a valid email address.
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 "Anrop ACE3 Master" on the workshop 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

@ -1 +0,0 @@
3.12.6.43

BIN
ace_artillerytables.dll Normal file

Binary file not shown.

BIN
ace_artillerytables_x64.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,45 +1,20 @@
class ACE_Settings {
class GVAR(enabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(enabled_DisplayName);
description = CSTRING(enabled_Description);
typeName = "BOOL";
value = 0;
movedToSQF = 1;
};
class GVAR(muzzleVelocityVariationEnabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(muzzleVelocityVariationEnabled_DisplayName);
description = CSTRING(muzzleVelocityVariationEnabled_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
class GVAR(ammoTemperatureEnabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(ammoTemperatureEnabled_DisplayName);
description = CSTRING(ammoTemperatureEnabled_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
class GVAR(barrelLengthInfluenceEnabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName);
description = CSTRING(barrelLengthInfluenceEnabled_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
class GVAR(bulletTraceEnabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(bulletTraceEnabled_DisplayName);
description = CSTRING(bulletTraceEnabled_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
class GVAR(simulationInterval) {
category = CSTRING(DisplayName);
displayName = CSTRING(simulationInterval_DisplayName);
description = CSTRING(simulationInterval_Description);
typeName = "SCALAR";
value = 0.05;
sliderSettings[] = {0, 0.2, 0.05, 2};
movedToSQF = 1;
};
};

View File

@ -1,18 +1,18 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -2,10 +2,3 @@ ace_advanced_ballistics
===============
The Advanced Ballistics module introduces advanced external- and internal ballistics to the game.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [Ruthberg](http://github.com/Ulteq)

View File

@ -42,12 +42,12 @@ 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="";
};
class RscProtractorMarker : RscProtractorBase {
class RscProtractorMarker: RscProtractorBase {
idc=132951;
};
};

View File

@ -1,7 +1,5 @@
#include "script_component.hpp"
#include "initKeybinds.sqf"
GVAR(currentbulletID) = -1;
GVAR(Protractor) = false;
@ -11,7 +9,9 @@ GVAR(currentGrid) = 0;
if (!hasInterface) exitWith {};
["ace_settingsInitialized", {
#include "initKeybinds.inc.sqf"
["CBA_settingsInitialized", {
//If not enabled, dont't add PFEH
if (!GVAR(enabled)) exitWith {};
@ -19,13 +19,16 @@ if (!hasInterface) exitWith {};
[] call FUNC(initializeTerrainExtension);
// Register fire event handler
["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
["ace_firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
["ace_firedPlayer", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler;
["ace_firedPlayerNonLocal", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler;
// Register Perframe Handler
[LINKFUNC(handleFirePFH), GVAR(simulationInterval)] call CBA_fnc_addPerFrameHandler;
//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

@ -6,4 +6,6 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
#include "initSettings.inc.sqf"
ADDON = true;

View File

@ -20,5 +20,8 @@ class CfgPatches {
#include "ACE_Settings.hpp"
class ACE_Extensions {
extensions[] += {"ace_advanced_ballistics"};
class ace_advanced_ballistics {
windows = 1;
client = 1;
};
};

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
*

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
@ -15,12 +15,11 @@
* Public: No
*/
private _deleted = false;
{
_x params ["_bullet","_caliber","_bulletTraceVisible","_index"];
if (!alive _bullet) then {
GVAR(allBullets) deleteAt (GVAR(allBullets) find _x);
} else {
if (alive _bullet) then {
private _bulletVelocity = velocity _bullet;
private _bulletPosition = getPosASL _bullet;
@ -29,11 +28,12 @@
};
_bullet setVelocity (_bulletVelocity vectorAdd (parseSimpleArray ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6", _index, _bulletVelocity, _bulletPosition, wind, ASLToATL(_bulletPosition) select 2, CBA_missionTime toFixed 6])));
} else {
GVAR(allBullets) set [_forEachIndex, objNull];
_deleted = true;
};
nil
} count +GVAR(allBullets);
} forEach GVAR(allBullets);
if (GVAR(allBullets) isEqualTo []) then {
[_this select 1] call CBA_fnc_removePerFrameHandler;
GVAR(BulletPFH) = nil;
if (_deleted) then {
GVAR(allBullets) = GVAR(allBullets) - [objNull];
};

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Glowbal, Ruthberg
*
@ -17,9 +17,9 @@
*/
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);
if (!(_ammo isKindOf "BulletBase")) exitWith {};
if !(_ammo isKindOf "BulletBase") exitWith {};
if (!alive _projectile) exitWith {};
if (underwater _unit) exitWith {};
@ -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 {};
@ -123,7 +125,3 @@ GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _ammoCount, _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _transonicStabilityCoef, getPosASL _projectile, _bulletVelocity, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), EGVAR(weather,currentOvercast), CBA_missionTime toFixed 6];
GVAR(allBullets) pushBack [_projectile, _caliber, _bulletTraceVisible, GVAR(currentbulletID)];
if (isNil QGVAR(BulletPFH)) then {
GVAR(BulletPFH) = [FUNC(handleFirePFH), GVAR(simulationInterval), []] call CBA_fnc_addPerFrameHandler;
};

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,7 +1,7 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
* Initializes the advanced ballistics dll extension with terrain data
* Initializes the advanced ballistics extension with terrain data
*
* Arguments:
* None
@ -19,10 +19,10 @@ 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);
INFO_1("Terrain already initialized [world: %1]",worldName);
#ifdef DEBUG_MODE_FULL
systemChat "AdvancedBallistics: Terrain already initialized";
#endif
@ -33,14 +33,14 @@ private _gridCells = _mapGrids * _mapGrids;
GVAR(currentGrid) = 0;
INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldName);
INFO_2("Starting Terrain Extension [cells: %1] [world: %2]",_gridCells,worldName);
[{
params ["_args","_idPFH"];
_args params ["_mapGrids", "_gridCells", "_initStartTime"];
if (GVAR(currentGrid) >= _gridCells) exitWith {
INFO_2("Finished terrain initialization in %1 seconds [world: %2]", (diag_tickTime - _initStartTime) toFixed 2, worldName);
INFO_2("Finished terrain initialization in %1 seconds [world: %2]",(diag_tickTime - _initStartTime) toFixed 2,worldName);
#ifdef DEBUG_MODE_FULL
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", (diag_tickTime - _initStartTime) toFixed 2];
#endif
@ -53,7 +53,7 @@ INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldNa
private _gridCenter = [_x + 25, _y + 25];
private _gridHeight = round(getTerrainHeightASL _gridCenter);
private _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]);
private _gridSurfaceIsWater = if (surfaceIsWater _gridCenter) then {1} else {0};
private _gridSurfaceIsWater = parseNumber (surfaceIsWater _gridCenter);
"ace_advanced_ballistics" callExtension format["set:%1:%2:%3", _gridHeight, _gridNumObjects, _gridSurfaceIsWater];
GVAR(currentGrid) = GVAR(currentGrid) + 1;
if (GVAR(currentGrid) >= _gridCells) exitWith {};

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*
@ -40,10 +40,13 @@ if (_transonicStabilityCoef == 0) then {
_transonicStabilityCoef = 0.5;
};
private _dragModel = getNumber(_ammoConfig >> "ACE_dragModel");
if (!(_dragModel in [1, 2, 5, 6, 7, 8])) then {
if !(_dragModel in [1, 2, 5, 6, 7, 8]) then {
_dragModel = 1;
};
private _ballisticCoefficients = getArray(_ammoConfig >> "ACE_ballisticCoefficients");
if (_ballisticCoefficients isEqualTo []) then {
_ballisticCoefficients = [0.5];
};
private _velocityBoundaries = getArray(_ammoConfig >> "ACE_velocityBoundaries");
private _atmosphereModel = getText(_ammoConfig >> "ACE_standardAtmosphere");
if (_atmosphereModel isEqualTo "") then {
@ -60,20 +63,20 @@ private _barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths");
//Handle subsonic ammo that would have a huge muzzle velocity shift (when ballistic configs not explicitly defined)
private _typicalSpeed = getNumber (_ammoConfig >> "typicalSpeed");
if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
private _inheritedBarrelConfig = (!(_muzzleVelocityTable isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []};
private _inheritedTempConfig = (!(_ammoTempMuzzleVelocityShifts isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []};
private _inheritedBarrelConfig = (_muzzleVelocityTable isNotEqualTo []) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []};
private _inheritedTempConfig = (_ammoTempMuzzleVelocityShifts isNotEqualTo []) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []};
TRACE_3("subsonic",_typicalSpeed,_inheritedBarrelConfig,_inheritedTempConfig);
if (_inheritedBarrelConfig || _inheritedTempConfig) then {
private _parentConfig = inheritsFrom _ammoConfig;
private _parentSpeed = getNumber (_parentConfig >> "typicalSpeed");
WARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig, _parentSpeed);
WARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig,_parentSpeed);
if (_parentSpeed <= 0) exitWith {//Handle weird or null parent
_muzzleVelocityTable = [];
_ammoTempMuzzleVelocityShifts = [];
};
private _linearMuliplier = _typicalSpeed / _parentSpeed;
if (_inheritedBarrelConfig) then {
if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo [])) then {
if ((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isNotEqualTo []) then {
TRACE_2("Parent Has Defined Barrel MV",_linearMuliplier,_muzzleVelocityTable);
{ _muzzleVelocityTable set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _muzzleVelocityTable;
} else {
@ -82,7 +85,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
};
};
if (_inheritedTempConfig) then {
if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo [])) then {
if ((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isNotEqualTo []) then {
TRACE_2("Parent Has Defined Ammo Temp Shifts",_linearMuliplier,_muzzleVelocityTable);
{ _ammoTempMuzzleVelocityShifts set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _ammoTempMuzzleVelocityShifts;
} else {

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Ruthberg
*
@ -21,7 +21,7 @@
private _weaponConfig = (configFile >> "CfgWeapons" >> _this);
private _barrelTwist = 0 max getNumber(_weaponConfig >> "ACE_barrelTwist");
private _twistDirection = [0, 1] select (_barrelTwist != 0);
private _twistDirection = parseNumber (_barrelTwist != 0);
if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
if !(_twistDirection in [-1, 0, 1]) then {

View File

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

View File

@ -0,0 +1,49 @@
private _category = format ["ACE %1", localize LSTRING(DisplayName)];
[
QGVAR(enabled), "CHECKBOX",
[LSTRING(enabled_DisplayName), LSTRING(enabled_Description)],
_category,
false,
1
] call CBA_fnc_addSetting;
[
QGVAR(muzzleVelocityVariationEnabled), "CHECKBOX",
[LSTRING(muzzleVelocityVariationEnabled_DisplayName), LSTRING(muzzleVelocityVariationEnabled_Description)],
_category,
true,
1
] call CBA_fnc_addSetting;
[
QGVAR(ammoTemperatureEnabled), "CHECKBOX",
[LSTRING(ammoTemperatureEnabled_DisplayName), LSTRING(ammoTemperatureEnabled_Description)],
_category,
true,
1
] call CBA_fnc_addSetting;
[
QGVAR(barrelLengthInfluenceEnabled), "CHECKBOX",
[LSTRING(barrelLengthInfluenceEnabled_DisplayName), LSTRING(barrelLengthInfluenceEnabled_Description)],
_category,
true,
1
] call CBA_fnc_addSetting;
[
QGVAR(bulletTraceEnabled), "CHECKBOX",
[LSTRING(bulletTraceEnabled_DisplayName), LSTRING(bulletTraceEnabled_Description)],
_category,
true,
1
] call CBA_fnc_addSetting;
[
QGVAR(simulationInterval), "SLIDER",
[LSTRING(simulationInterval_DisplayName), LSTRING(simulationInterval_Description)],
_category,
[0, 0.2, 0.05, 2],
1
] call CBA_fnc_addSetting;

View File

@ -4,9 +4,9 @@
<Key ID="STR_ACE_Advanced_Ballistics_WindInfoKey">
<English>Show Wind Info</English>
<Polish>Pokaż inf. o wietrze</Polish>
<Italian>Mostra indicazioni del vento</Italian>
<Italian>Mostra indicazioni vento</Italian>
<Russian>Показать информацию о ветре</Russian>
<French>Afficher les info sur le vent</French>
<French>Afficher les infos sur le vent</French>
<Spanish>Mostrar información del viento</Spanish>
<German>Windinformationen anzeigen</German>
<Hungarian>Széladatok mutatása</Hungarian>
@ -16,10 +16,11 @@
<Korean>바람의 정보를 표시</Korean>
<Chinese>顯示風況</Chinese>
<Chinesesimp>显示风况</Chinesesimp>
<Turkish>Rüzgar bilgilerini göster</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_ProtractorKey">
<English>Show Protractor</English>
<Polish>Pokaż kątomierz</Polish>
<Polish>Pokaż protraktor</Polish>
<Italian>Mostra il rapportatore</Italian>
<Russian>Показать транспортир</Russian>
<French>Afficher le rapporteur</French>
@ -32,6 +33,7 @@
<Korean>각도기 표시</Korean>
<Chinese>顯示量角器</Chinese>
<Chinesesimp>显示量角器</Chinesesimp>
<Turkish>ı Ölçeri Göster</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_DisplayName">
<English>Advanced Ballistics</English>
@ -44,10 +46,11 @@
<Hungarian>Fejlett ballisztika</Hungarian>
<Russian>Продвинутая баллистика</Russian>
<Italian>Balistica Avanzata</Italian>
<Japanese>アドバンスド バリスティックス</Japanese>
<Japanese>アドバンスド弾道計算</Japanese>
<Korean>고급 탄도학</Korean>
<Chinese>先進彈道系統</Chinese>
<Chinesesimp>先进弹道系统</Chinesesimp>
<Chinesesimp>进阶弹道系统</Chinesesimp>
<Turkish>Gelişmiş Balistik</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_enabled_DisplayName">
<English>Advanced Ballistics</English>
@ -60,10 +63,11 @@
<Hungarian>Fejlett ballisztika</Hungarian>
<Russian>Продвинутая баллистика</Russian>
<Italian>Balistica Avanzata</Italian>
<Japanese>アドバンスド バリスティックス</Japanese>
<Japanese>アドバンスド弾道計算を有効化</Japanese>
<Korean>고급 탄도학</Korean>
<Chinese>先進彈道系統</Chinese>
<Chinesesimp>先进弹道系统</Chinesesimp>
<Chinesesimp>进阶弹道系统</Chinesesimp>
<Turkish>Gelişmiş Balistik</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_enabled_Description">
<English>Enables advanced ballistics</English>
@ -71,39 +75,48 @@
<Spanish>Activa la balística avanzada</Spanish>
<German>Aktiviert die erweiterte Ballistik</German>
<Czech>Aktivuje pokročilou balistiku</Czech>
<Portuguese>Ativa balística avançada</Portuguese>
<French>Activer la balistique avancée</French>
<Portuguese>Ativa a balística avançada</Portuguese>
<French>Active la balistique avancée.</French>
<Hungarian>Engedélyezi a fejlett ballisztikát</Hungarian>
<Russian>Включает продвинутую баллистику</Russian>
<Italian>Abilita Balistica Avanzata</Italian>
<Japanese>アドバンスド バリスティックスを有効化します。</Japanese>
<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">
<English>Enable Muzzle Velocity Variation</English>
<Spanish>Activar variación de velocidad inicial</Spanish>
<German>Variation der Mündungsgeschwindigkeit aktivieren</German>
<Japanese>銃口初速の変動を有効化する</Japanese>
<Japanese>銃口初速の変動を有効化</Japanese>
<Italian>Abilita Variazione Velocità Volata</Italian>
<Korean>총구속도 변화적용</Korean>
<Chinese>啟用槍口初速變化</Chinese>
<Chinesesimp>启用枪口初速变化</Chinesesimp>
<French>Activer les variations de la vitesse initiale</French>
<French>Activer la variation de vitesse initiale</French>
<Polish>Aktywuj wariację prędkości wylotowej</Polish>
<Russian>Вкл. вариацию начальной скорости</Russian>
<Portuguese>Ativar Variação de Velocidade no Freio de boca </Portuguese>
<Czech>Povoluje variantu rychlosti ústí</Czech>
<Turkish>Namlu Hızı Değişimini Etkinleştir</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_muzzleVelocityVariationEnabled_Description">
<English>Simulates slight variations in muzzle velocity between each shot</English>
<Spanish>Simula variaciones ligeras de velocidad entre cada disparo</Spanish>
<German>Simuliert leichte Variationen der Mündungsgeschwindigkeit zwischen jedem Schuss.</German>
<Japanese>発射毎の銃口初速の変動をシミュレートします。</Japanese>
<Italian>Simula lievi variazioni della velocità della volata tra un colpo e l'altro</Italian>
<Japanese>発射毎の銃口初速のわずかな変動をシミュレートします。</Japanese>
<Italian>Simula piccole variazioni della velocità alla volata tra ogni colpo.</Italian>
<Korean>각 사격 사이에 총구속도 변화를 시뮬레이션 합니다.</Korean>
<Chinese>模擬每發子彈的槍口初速都略有不同</Chinese>
<Chinesesimp>模拟每发子弹的枪口初速都略有不同</Chinesesimp>
<French>Simule les légères variations</French>
<French>Simule de légères variations de vitesse initiale entre chaque tir.</French>
<Polish>Symuluje lekkie zmiany w prędkości wylotowej między każdym strzałem</Polish>
<Russian>Имитирует небольшие изменения начальной скорости при каждом выстреле</Russian>
<Portuguese>Simula pequenas variações na velocidade do Freio de Boca entre cada tiro</Portuguese>
<Czech>Simuluje malé odchylky v úsťové rychlosti mezi jednotlivými výstřely</Czech>
<Turkish>Her atış arasında namlu çıkış hızındaki küçük değişiklikleri simüle eder</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
<English>Enable Ammo Temperature Simulation</English>
@ -112,14 +125,15 @@
<German>Simulation der Munitionstemperatur aktivieren</German>
<Czech>Povolit simulaci teploty munice</Czech>
<Portuguese>Ativar simulação de temperatura de munição</Portuguese>
<French>Active la simulation de la température</French>
<French>Activer la simulation de la température</French>
<Hungarian>Lőszer-hő szimuláció engedélyezése</Hungarian>
<Russian>Симуляция температуры для боеприпасов</Russian>
<Italian>Abilita simulazione della temperatura delle munizioni</Italian>
<Japanese>弾薬温度シミュレーションを有効化する</Japanese>
<Italian>Abilita simulazione temperatura munizioni</Italian>
<Japanese>弾薬温度シミュレーションを有効化</Japanese>
<Korean>탄약 온도 구현 적용</Korean>
<Chinese>啟用彈藥溫度模擬系統</Chinese>
<Chinesesimp>启用弹药温度模拟系统</Chinesesimp>
<Turkish>Cephane Sıcaklık Simülasyonunu Etkinleştir</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_Description">
<English>Muzzle velocity varies with ammo temperature</English>
@ -128,14 +142,15 @@
<German>Munitionstemperatur hat Einfluss auf die Mündungsgeschwindigkeit</German>
<Czech>Úsťová rychlost je závislá na teplotě munice</Czech>
<Portuguese>A velocidade de saída varia com a temperatura da munição</Portuguese>
<French>La température de la munition influe sur la vélocité intiale</French>
<French>La vitesse initiale varie en fonction de la température des munitions.</French>
<Hungarian>A kezdősebesség a lőszer hőmérsékletétől függően változó</Hungarian>
<Russian>Начальная скорость пули зависит от температуры</Russian>
<Italian>La velocità dello sparo varia a seconda della temperatura delle munizioni</Italian>
<Italian>La velocità alla volata varia a seconda della temperatura delle munizioni.</Italian>
<Japanese>弾薬の温度により銃口初速を変動させます。</Japanese>
<Korean>탄약 온도에 비례해 총구 속도가 달라집니다</Korean>
<Chinese>子彈初速將隨彈藥溫度而有所變化</Chinese>
<Chinesesimp>子弹初速将随弹药温度而有所变化</Chinesesimp>
<Turkish>Mermi çıkış hızı cephane sıcaklığına göre değişir</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_DisplayName">
<English>Enable Barrel Length Simulation</English>
@ -147,11 +162,12 @@
<French>Activer la simulation de la longueur de canon</French>
<Hungarian>Csőhossz-szimuláció engedélyezése</Hungarian>
<Russian>Симуляция длины ствола</Russian>
<Italian>Abilita simulazione della lunghezza della canna</Italian>
<Japanese>銃身長シミュレーションを有効化する</Japanese>
<Italian>Abilita simulazione lunghezza canna</Italian>
<Japanese>銃身長シミュレーションを有効化</Japanese>
<Korean>총열 길이 구현 적용</Korean>
<Chinese>啟用槍管長度模擬系統</Chinese>
<Chinesesimp>启用枪管长度模拟系统</Chinesesimp>
<Turkish>Namlu Uzunluğu Simülasyonunu Etkinleştir</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_Description">
<English>Muzzle velocity varies with barrel length</English>
@ -160,14 +176,15 @@
<German>Lauflänge beeinflusst Mündungsgeschwindigkeit</German>
<Czech>Úsťová rychlost je závislá na délce hlavně</Czech>
<Portuguese>A velocidade de saída caria com o comprimento do cano</Portuguese>
<French>La longueur du canon influe sur la vélocité initale</French>
<French>La vitesse initiale varie en fonction de la longueur du canon.</French>
<Hungarian>A kezdősebesség a cső hosszától függően változó</Hungarian>
<Russian>Начальная скорость пули зависит от длины ствола</Russian>
<Italian>La velocità di sparo varia a seconda della lunghezza della canna</Italian>
<Italian>La velocità alla volata varia a seconda della lunghezza della canna.</Italian>
<Japanese>銃身長により銃口初速を変動させます。</Japanese>
<Korean>총구 속도가 총열에 비례해 달라집니다</Korean>
<Chinese>子彈初速將隨槍管長度而有所變化</Chinese>
<Chinesesimp>子弹初速将随枪管长度而有所变化</Chinesesimp>
<Turkish>Mermi çıkış hızı namlu uzunluğuna göre değişir</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_DisplayName">
<English>Enable Bullet Trace Effect</English>
@ -176,14 +193,15 @@
<German>Geschossspureffekt aktivieren</German>
<Czech>Povolit efekt trasírek</Czech>
<Portuguese>Ativa efeito traçante de projétil</Portuguese>
<French>Activer l'effet balle traçante</French>
<French>Activer l'effet de balle traçante</French>
<Hungarian>Nyomkövető-effekt engedélyezése</Hungarian>
<Russian>Следы пуль</Russian>
<Italian>Abilita effetto dei Proiettili Traccianti</Italian>
<Japanese>弾丸の軌跡エフェクトを有効化する</Japanese>
<Italian>Abilita effetto di traccia proiettile</Italian>
<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">
<English>Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)</English>
@ -192,14 +210,15 @@
<German>Aktiviere Geschossspureffekt für hohe Kaliber (bei Benutzung von Optiken mit starker Vergrößerung)</German>
<Czech>Aktivuje efekt trasírek z vysokokaliberních zbraní (viditelné pouze skrze výkonnou optiku)</Czech>
<Portuguese>Ativa o efeito traçante de projétil para projéteis de alto calibre (somente visível quando observado por miras telescópicas)</Portuguese>
<French>Active une tracante pour les munitions de gros calibre (seulement visible en utilisant des optiques avancées)</French>
<French>Active un effet de balle traçante pour les munitions de gros calibre (seulement visible en utilisant une optique à fort grossissement).</French>
<Hungarian>Engedélyezi a nagy kaliberű lövedékek nyomának vizuális követését (csak nagy teljesítményű optikán keresztül látható)</Hungarian>
<Russian>Включает эффект следов пуль для больших калибров (видны только через мощную оптику)</Russian>
<Italian>Abilita effetto dei proiettili traccianti di alto calibro (visibile solo attraverso ottiche ad alto potenziale)</Italian>
<Italian>Abilita effetto di traccia lasciata da proiettili di alto calibro (visibile solo attraverso ottiche ad alto ingrandimento)</Italian>
<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">
<English>Simulation Interval</English>
@ -211,8 +230,8 @@
<French>Intervalle de simulation</French>
<Hungarian>Szimuláció intervalluma</Hungarian>
<Russian>Интервал симуляции</Russian>
<Italian>Intervallo Simulazione</Italian>
<Japanese>シミュレーション間隔</Japanese>
<Italian>Intervallo di Simulazione</Italian>
<Japanese>シミュレーション間隔</Japanese>
<Korean>구현 간격</Korean>
<Chinese>模擬間隔</Chinese>
<Chinesesimp>模拟间隔</Chinesesimp>
@ -224,14 +243,14 @@
<German>Definiert das Intervall zwischen den einzelnen Simulationsschritten</German>
<Czech>Určuje interval mezi každým výpočtem</Czech>
<Portuguese>Define o intervalo entre cada cálculo</Portuguese>
<French>Définit un intervalle de calcul entre deux simulations</French>
<French>Définit l'intervalle entre chacune des étapes de calcul.</French>
<Hungarian>Meghatározza a számítási lépések közötti időintervallumot</Hungarian>
<Russian>Определяет временной интервал между вычислениями</Russian>
<Italian>Definisce l'intervallo tra ogni step di calcolo</Italian>
<Japanese>計算毎の間隔を定義します。</Japanese>
<Italian>Definisce l'intervallo tra ogni passo del calcolo</Italian>
<Japanese>シミュレーション毎の間隔を定義します。</Japanese>
<Korean>각 계산 단위의 간격을 정의합니다</Korean>
<Chinese>定義每個模擬計算之間的時間間隔</Chinese>
<Chinesesimp>定义每个模拟计算之间的时间间隔</Chinesesimp>
<Chinesesimp>定义每个计算步骤之间的间隔</Chinesesimp>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_DisplayName">
<English>Simulation Radius</English>
@ -239,15 +258,16 @@
<Spanish>Radio de simulación</Spanish>
<German>Simulationsradius</German>
<Czech>Rozsah simulace</Czech>
<Portuguese>Raio de simulação</Portuguese>
<Portuguese>Raio da simulação</Portuguese>
<French>Rayon de simulation</French>
<Hungarian>Szimuláció hatóköre</Hungarian>
<Russian>Радиус симуляции</Russian>
<Italian>Raggio Simulazione</Italian>
<Japanese>シミュレーションの範囲</Japanese>
<Japanese>シミュレーションの半径</Japanese>
<Korean>구현 범위</Korean>
<Chinese>模擬半徑</Chinese>
<Chinesesimp>模拟半径</Chinesesimp>
<Turkish>Similasyon Yarıçapı</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_Description">
<English>Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles</English>
@ -256,30 +276,32 @@
<German>Gibt den Radius (in Metern) um den Spieler an, bei dem die erweiterte Ballistik auf Geschosse angewendet wird</German>
<Czech>Určuje oblast kolem hráče (v metrech), kde je pokročilá balistika použita na projektil</Czech>
<Portuguese>Define o raio ao redor do jogador (em metros) onde a balística avançada será aplicada aos projéteis</Portuguese>
<French>Définit le rayon autour du joueur (en mètres) d'application de la balistique avancée</French>
<French>Définit le rayon autour du joueur (en mètres), dans lequel la balistique avancée est appliquée aux projectiles.</French>
<Hungarian>Meghatározza a játékos körüli hatókört (méterben), ahol a lövedékek fejlett ballisztikát használnak</Hungarian>
<Russian>Определяет радиус вокруг игрока (в метрах), в котором продвинутая баллистика применяется к снарядам</Russian>
<Italian>Definisce il raggio attorno al giocatore (in metri) per cui la Balistica Avanzata è applicata ai proiettili</Italian>
<Japanese>アドバンスド バリスティックスの適用半径範囲 (プレイヤー中心、メートル単位) を定義します。</Japanese>
<Italian>Definisce il raggio attorno al giocatore (in metri) entro il quale la Balistica Avanzata è applicata ai proiettili</Italian>
<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">
<English>This module enables advanced ballistics simulation - meaning the trajectory of projectiles is influenced by variables like air temperature, atmospheric pressure, humidity, gravity, the type of ammunition and the weapon from which it was fired.</English>
<German>Dieses Modul aktiviert die Erweiterte Ballisitk. Die Flugbahn eines Geschosses wird nun von Einflüssen wie z.B Temperatur, Luftdruck, Luftfeuchtigkeit, Schwerkraft, Geschossart sowie der Waffe aus dem es gefeuert wird, beeinflusst.</German>
<Polish>Moduł ten pozwala aktywować zaawansowaną balistykę biorącą przy obliczeniach trajektorii lotu pocisku pod uwagę takie rzeczy jak temperatura powietrza, ciśnienie atmosferyczne, wilgotność powietrza, siły Coriolisa i Eotvosa, grawitację a także broń z jakiej wykonywany jest strzał oraz rodzaj amunicji. Wszystko to sprowadza się na bardzo dokładne odwzorowanie balistyki.</Polish>
<Czech>Tento modul umožňuje aktivovat pokročilou balistiku, která vypočítává trajektorii kulky a bere do úvahy věci jako je teplota vzduchu, atmosférický tlak, vlhkost vzduchu, gravitaci, typ munice a zbraň, ze které je náboj vystřelen. To vše přispívá k velmi přesné balistice.</Czech>
<Portuguese>Este módulo permite que você ative cálculos de balística avançada, fazendo a trajetória do projétil levar em consideração coisas como temperatura do ar, pressão atmosférica, umidade, força de Coriolis, a gravidade, o modelo da arma no qual o disparo é realizado e o tipo de munição. Tudo isso acrescenta-se a um balística muito precisa.</Portuguese>
<French>Ce module active la simulation de balistique avancée - les projectiles sont influencés par des variables comme le vent, la température, la pression atmosphérique, l'humidité, la gravité, le type de munition et l'arme avec laquelles ils sont tirés.</French>
<Portuguese>Este módulo permite que você ative cálculos de balística avançada, fazendo a trajetória do projétil levar em consideração coisas como temperatura do ar, pressão atmosférica, umidade, a gravidade, a arma no qual o disparo é realizado e o tipo de munição.</Portuguese>
<French>Ce module permet une simulation balistique avancée ; c'est à dire que la trajectoire des projectiles est influencée par des facteurs tels que la température de l'air, la pression atmosphérique, l'humidité, la gravité, le type de munition et l'arme depuis laquelle elle est tirée.</French>
<Hungarian>Ez a modul engedélyezi a fejlett ballisztikai szimulációt - a lövedékek röppályáját befolyásolni fogja a levegő hőmérséklete, légnyomás, páratartalom, gravitáció, a lövedék fajtája, valamint a fegyver, amiből kilőtték a lövedéket.</Hungarian>
<Russian>Этот модуль включает симуляцию продвинутой баллистики - при этом на траекторию полета снаряда влияют различные параметры, такие как температура воздуха, атмосферное давление, влажность, гравитация, тип боеприпаса и оружия, из которого произвели выстрел.</Russian>
<Spanish>Este módulo permite la simulación balística avanzada - es decir, la trayectoria de los proyectiles está influenciada por variables como la temperatura del aire, la presión atmosférica, la humedad, la gravedad, el tipo de municiones y el arma desde el que fue disparada.</Spanish>
<Italian>Questo modulo abilita la simulazione della Balistica Avanzata - cioè la traiettoria dei proiettili è influenzata da variabili come la temperatura dell'aria, pressione atmosferica, umidità, gravità, il tipo di munizione e l'arma da cui è sparata</Italian>
<Japanese>アドバンスド バリスティックスのシミュレーションを有効化します。 弾道は気温・気圧・湿度・重力・弾薬の種類・発射する武器などの変化による影響を受けるようになります。</Japanese>
<Italian>Questo modulo abilita la simulazione della Balistica Avanzata - essa comporta che la traiettoria dei proiettili è influenzata da variabili come la temperatura dell'aria, pressione atmosferica, umidità, gravità, il tipo di munizione e l'arma da cui è sparata.</Italian>
<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>
</Project>

View File

@ -1,18 +1,18 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -2,9 +2,3 @@ ace_advanced_fatigue
==========
An in depth stamina and fatigue simulation.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [BaerMitUmlaut](https://github.com/BaerMitUmlaut)

View File

@ -2,9 +2,11 @@ PREP(addDutyFactor);
PREP(createStaminaBar);
PREP(getAnimDuty);
PREP(getMetabolicCosts);
PREP(getWeaponInertia);
PREP(handleEffects);
PREP(handlePlayerChanged);
PREP(handleStaminaBar);
PREP(mainLoop);
PREP(moduleSettings);
PREP(removeDutyFactor);
PREP(renderDebugLines);

View File

@ -2,25 +2,32 @@
if (!hasInterface) exitWith {};
[missionNamespace, "ACE_setCustomAimCoef", QUOTE(ADDON), {
private _unit = ACE_player;
private _fatigue = _unit getVariable [QGVAR(aimFatigue), 0];
#ifdef DEBUG_MODE_FULL
call FUNC(renderDebugLines);
#endif
switch (stance _unit) do {
// 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 {};
["baseline", {
private _fatigue = ACE_player getVariable [QGVAR(aimFatigue), 0];
switch (stance ACE_player) do {
case ("CROUCH"): {
1.0 + _fatigue ^ 2 * 0.1
(1.0 + _fatigue ^ 2 * 0.1)
};
case ("PRONE"): {
1.0 + _fatigue ^ 2 * 2.0
(1.0 + _fatigue ^ 2 * 2.0)
};
default {
1.5 + _fatigue ^ 2 * 3.0
(1.5 + _fatigue ^ 2 * 3.0)
};
};
}] call EFUNC(common,arithmeticSetSource);
["ace_settingsInitialized", {
if (!GVAR(enabled)) exitWith {};
}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor);
// - Post process effect ------------------------------------------------------
GVAR(ppeBlackout) = ppEffectCreate ["ColorCorrections", 4220];
@ -30,35 +37,34 @@ if (!hasInterface) exitWith {};
GVAR(ppeBlackout) ppEffectCommit 0.4;
// - GVAR updating and initialization -----------------------------------------
["unit", FUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler;
["unit", LINKFUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler;
["visibleMap", {
params ["", "_visibleMap"]; // command visibleMap is updated one frame later
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlShow ((!_visibleMap) && {(vehicle ACE_player) == ACE_player});
(uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]) ctrlShow (!_visibleMap && isNull objectParent ACE_player);
}, true] call CBA_fnc_addPlayerEventHandler;
["vehicle", {
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlShow ((!visibleMap) && {(vehicle ACE_player) == ACE_player});
(uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]) ctrlShow (!visibleMap && isNull objectParent ACE_player);
}, true] call CBA_fnc_addPlayerEventHandler;
// - Duty factors -------------------------------------------------------------
if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
if (GETEGVAR(medical,enabled,false)) then {
[QEGVAR(medical,pain), { // 0->1.0, 0.5->1.05, 1->1.1
linearConversion [0, 1, (_this getVariable [QEGVAR(medical,pain), 0]), 1, 1.1, true];
linearConversion [0, 1, _this getVariable [QEGVAR(medical,pain), 0], 1, 1.1, true];
}] call FUNC(addDutyFactor);
[QEGVAR(medical,bloodVolume), { // 6->1.0, 5->1.167, 4->1.33
linearConversion [6, 0, (_this getVariable [QEGVAR(medical,bloodVolume), 6]), 1, 2, true];
linearConversion [6, 0, _this getVariable [QEGVAR(medical,bloodVolume), 6], 1, 2, true];
}] call FUNC(addDutyFactor);
};
if (["ACE_Dragging"] call EFUNC(common,isModLoaded)) then {
if (["ace_dragging"] call EFUNC(common,isModLoaded)) then {
[QEGVAR(dragging,isCarrying), {
[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];
linearConversion [35, 45, missionNamespace getVariable [QEGVAR(weather,currentTemperature), 25], 1, 2, true];
}] call FUNC(addDutyFactor);
};

View File

@ -6,10 +6,12 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
#include "initSettings.sqf"
#include "initSettings.inc.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,7 +1,7 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Calculates the duty of the current animation.
* Calculates the duty ('postureWeight') of the current animation.
*
* Arguments:
* 0: Unit <OBJECT>
@ -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,51 +1,74 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Calculates the current metabolic costs for a unit.
* Author: BaerMitUmlaut, ulteq
* Calculates the current metabolic costs.
* Calculation is done according to the Pandolf/Wojtowicz formulas.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Speed <NUMBER>
* 0: Duty of animation
* 1: Mass of unit <NUMBER>
* 2: Terrain gradient <NUMBER>
* 3: Terrain factor <NUMBER>
* 4: Speed <NUMBER>
*
* Return Value:
* Metabolic cost <NUMBER>
*
* Example:
* [player, 3.3] call ace_advanced_fatigue_fnc_getMetabolicCosts
* [1, 840, 20, 1, 4] call ace_advanced_fatigue_fnc_getMetabolicCosts
*
* Public: No
*/
params ["_unit", "_velocity"];
private _gearMass = ((_unit getVariable [QEGVAR(movement,totalLoad), loadAbs _unit]) / 22.046) * GVAR(loadFactor);
params ["_duty", "_gearMass", "_terrainGradient", "_terrainFactor", "_speed"];
private _terrainAngle = asin (1 - ((surfaceNormal getPosASL _unit) select 2));
private _terrainGradient = (_terrainAngle / 45 min 1) * 5 * GVAR(terrainGradientFactor);
private _duty = GVAR(animDuty);
// Metabolic cost for walking and running is different
if (_speed > 2) then {
// Running
#ifdef DEBUG_MODE_FULL
private _baseline = 2.1 * SIM_BODYMASS + 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2) + (SIM_BODYMASS + _gearMass) * 0.9 * (_speed ^ 2);
private _graded = 2.1 * SIM_BODYMASS + 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2) + _terrainFactor * (SIM_BODYMASS + _gearMass) * (0.9 * (_speed ^ 2) + 0.66 * _speed * _terrainGradient);
private _terrainImpact = abs ((_graded / _baseline) - 1);
hintSilent format ["FwdAngle: %1 | SideAngle: %2 \n TerrainFactor: %3 | TerrainGradient: %4 \n TerrainImpact: %5 \n Speed: %6 | CarriedLoad: %7 \n Duty: %8 | Work: %9",
_fwdAngle toFixed 1,
_sideAngle toFixed 1,
_terrainFactor toFixed 2,
_terrainGradient toFixed 1,
_terrainImpact toFixed 2,
_speed toFixed 2,
_gearMass toFixed 1,
_duty toFixed 2,
round (_graded * BIOMECH_EFFICIENCY * _duty)
];
#endif
{
if (_x isEqualType 0) then {
_duty = _duty * _x;
} else {
_duty = _duty * (_unit call _x);
};
} forEach (GVAR(dutyList) select 1);
if (GVAR(isSwimming)) then {
_terrainGradient = 0;
};
if (_velocity > 2) then {
(
2.10 * SIM_BODYMASS
2.1 * SIM_BODYMASS
+ 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ (SIM_BODYMASS + _gearMass) * (0.90 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
) * 0.23 * _duty
+ _terrainFactor * (SIM_BODYMASS + _gearMass) * (0.9 * (_speed ^ 2) + 0.66 * _speed * _terrainGradient)
) * BIOMECH_EFFICIENCY * _duty
} else {
// Walking
#ifdef DEBUG_MODE_FULL
private _baseline = 1.05 * SIM_BODYMASS + 2 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2) + (SIM_BODYMASS + _gearMass) * 1.15 * (_speed ^ 2);
private _graded = 1.05 * SIM_BODYMASS + 2 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2) + _terrainFactor * (SIM_BODYMASS + _gearMass) * (1.15 * (_speed ^ 2) + 0.66 * _speed * _terrainGradient);
private _terrainImpact = abs ((_graded / _baseline) - 1);
hintSilent format ["FwdAngle: %1 | SideAngle: %2 \n TerrainFactor: %3 | TerrainGradient: %4 \n TerrainImpact: %5 \n Speed: %6 | CarriedLoad: %7 \n Duty: %8 | Work: %9",
_fwdAngle toFixed 1,
_sideAngle toFixed 1,
_terrainFactor toFixed 2,
_terrainGradient toFixed 1,
_terrainImpact toFixed 2,
_speed toFixed 2,
_gearMass toFixed 1,
_duty toFixed 2,
round (_graded * BIOMECH_EFFICIENCY * _duty)
];
#endif
(
1.05 * SIM_BODYMASS
+ 4 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ (SIM_BODYMASS + _gearMass) * (1.15 * (_velocity ^ 2) + 0.66 * _velocity * _terrainGradient)
) * 0.23 * _duty
+ 2 * (SIM_BODYMASS + _gearMass) * ((_gearMass / SIM_BODYMASS) ^ 2)
+ _terrainFactor * (SIM_BODYMASS + _gearMass) * (1.15 * (_speed ^ 2) + 0.66 * _speed * _terrainGradient)
) * BIOMECH_EFFICIENCY * _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,43 +1,44 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Author: BaerMitUmlaut, ulteq
* Handles any audible, visual and physical effects of fatigue.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Fatigue <NUMBER>
* 2: Speed <NUMBER>
* 3: Overexhausted <BOOL>
* 2: Overexhausted <BOOL>
* 3: Forward Angle <NUMBER>
* 4: Side Angle <NUMBER>
*
* Return Value:
* None
*
* Example:
* [_player, 0.5, 3.3, true] call ace_advanced_fatigue_fnc_handleEffects
* [_player, 0.5, 3.3, true, 0, 0] call ace_advanced_fatigue_fnc_handleEffects
*
* Public: No
*/
params ["_unit", "_fatigue", "_speed", "_overexhausted"];
#ifdef DEBUG_MODE_FULL
systemChat str _fatigue;
systemChat str vectorMagnitude velocity _unit;
#endif
params ["_unit", "_fatigue", "_overexhausted", "_fwdAngle", "_sideAngle"];
// - Audible effects ----------------------------------------------------------
GVAR(lastBreath) = GVAR(lastBreath) + 1;
if (_fatigue > 0.4 && {GVAR(lastBreath) > (_fatigue * -10 + 9)} && {!underwater _unit}) then {
if (!isGameFocused) exitWith {};
switch (true) do {
case (_fatigue < 0.6): {
playSound (QGVAR(breathLow) + str(floor random 6));
playSound (QGVAR(breathLow) + str (floor random 6));
};
case (_fatigue < 0.85): {
playSound (QGVAR(breathMid) + str(floor random 6));
playSound (QGVAR(breathMid) + str (floor random 6));
};
default {
playSound (QGVAR(breathMax) + str(floor random 6));
playSound (QGVAR(breathMax) + str (floor random 6));
};
};
GVAR(lastBreath) = 0;
};
@ -61,31 +62,35 @@ if (GVAR(isSwimming)) exitWith {
if (GVAR(setAnimExclusions) isEqualTo []) then {
_unit setAnimSpeedCoef linearConversion [0.7, 0.9, _fatigue, 1, 0.5, true];
};
if ((isSprintAllowed _unit) && {_fatigue > 0.7}) then {
if (isSprintAllowed _unit && _fatigue > 0.7) then { // small checks like these are faster without lazy eval
[_unit, "blockSprint", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
} else {
if ((!isSprintAllowed _unit) && {_fatigue < 0.7}) then {
if (!isSprintAllowed _unit && _fatigue < 0.7) then {
[_unit, "blockSprint", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
};
};
};
if ((getAnimSpeedCoef _unit) != 1) then {
if (GVAR(setAnimExclusions) isEqualTo []) then {
// If other components are setting setAnimSpeedCoef, do not change animSpeedCoef
if (getAnimSpeedCoef _unit != 1 && {GVAR(setAnimExclusions) isEqualTo []}) then {
TRACE_1("reset",getAnimSpeedCoef _unit);
_unit setAnimSpeedCoef 1;
};
};
if (_overexhausted) then {
if (!isForcedWalk _unit && _fatigue >= 1) then { // small checks like these are faster without lazy eval
[_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
[_unit, "blockSprint", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
} else {
if (isForcedWalk _unit && {_fatigue < 0.7}) then {
if (isForcedWalk _unit && _fatigue < 0.7) then {
[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
[_unit, "blockSprint", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
} else {
if ((isSprintAllowed _unit) && {_fatigue > 0.7}) then {
// Forward angle is the slope of the terrain, side angle simulates the unevenness/roughness of the terrain
if (isSprintAllowed _unit && {_fatigue > 0.7 || abs _fwdAngle > 20 || abs _sideAngle > 20}) then {
[_unit, "blockSprint", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
} else {
if ((!isSprintAllowed _unit) && {_fatigue < 0.6}) then {
if (!isSprintAllowed _unit && _fatigue < 0.6 && abs _fwdAngle < 20 && abs _sideAngle < 20) then {
[_unit, "blockSprint", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
};
};
@ -93,6 +98,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,7 +1,7 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Handles switching units (once on init and afterwards via Zeus).
* Author: BaerMitUmlaut, ulteq
* Handles switching units (once on init and afterwards via Zeus). Also handles CBA setting change for performance factor.
*
* Arguments:
* 0: New Unit <OBJECT>
@ -15,20 +15,24 @@
*
* Public: No
*/
params ["_newUnit", "_oldUnit"];
TRACE_2("unit changed",_newUnit,_oldUnit);
if !(isNull _oldUnit) then {
if (!isNull _oldUnit) then {
TRACE_1("remove old",_oldUnit getVariable QGVAR(animHandler));
_oldUnit enableStamina true;
_oldUnit removeEventHandler ["AnimChanged", _oldUnit getVariable [QGVAR(animHandler), -1]];
_oldUnit setVariable [QGVAR(animHandler), nil];
TRACE_1("remove old",_oldUnit getVariable QGVAR(animHandler));
_oldUnit setVariable [QGVAR(ae1Reserve), GVAR(ae1Reserve)];
_oldUnit setVariable [QGVAR(ae2Reserve), GVAR(ae2Reserve)];
_oldUnit setVariable [QGVAR(anReserve), GVAR(anReserve)];
_oldUnit setVariable [QGVAR(anFatigue), GVAR(anFatigue)];
_oldUnit setVariable [QGVAR(muscleDamage), GVAR(muscleDamage)];
_oldUnit setVariable [QGVAR(respiratoryRate), GVAR(respiratoryRate)];
};
_newUnit enableStamina false;
@ -38,6 +42,7 @@ if (_newUnit getVariable [QGVAR(animHandler), -1] == -1) then {
private _animHandler = _newUnit addEventHandler ["AnimChanged", {
GVAR(animDuty) = _this call FUNC(getAnimDuty);
}];
TRACE_1("add new",_animHandler);
_newUnit setVariable [QGVAR(animHandler), _animHandler];
};
@ -47,18 +52,27 @@ GVAR(ae2Reserve) = _newUnit getVariable [QGVAR(ae2Reserve), AE2_MAXRESERVE]
GVAR(anReserve) = _newUnit getVariable [QGVAR(anReserve), AN_MAXRESERVE];
GVAR(anFatigue) = _newUnit getVariable [QGVAR(anFatigue), 0];
GVAR(muscleDamage) = _newUnit getVariable [QGVAR(muscleDamage), 0];
GVAR(respiratoryRate) = _newUnit getVariable [QGVAR(respiratoryRate), 0];
// Clean variables for respawning units
{
_newUnit setVariable [_x, nil];
} forEach [QGVAR(ae1Reserve), QGVAR(ae2Reserve), QGVAR(anReserve), QGVAR(anFatigue), QGVAR(muscleDamage)];
} forEach [QGVAR(ae1Reserve), QGVAR(ae2Reserve), QGVAR(anReserve), QGVAR(anFatigue), QGVAR(muscleDamage), QGVAR(respiratoryRate)];
GVAR(VO2Max) = 35 + 20 * (_newUnit getVariable [QGVAR(performanceFactor), GVAR(performanceFactor)]);
GVAR(VO2MaxPower) = GVAR(VO2Max) * SIM_BODYMASS * 0.23 * JOULES_PER_ML_O2 / 60;
GVAR(VO2MaxPower) = GVAR(VO2Max) * SIM_BODYMASS * BIOMECH_EFFICIENCY * JOULES_PER_ML_O2 / 60;
GVAR(peakPower) = VO2MAX_STRENGTH * GVAR(VO2MaxPower);
GVAR(ae1PathwayPower) = GVAR(peakPower) / (13.3 + 16.7 + 113.3) * 13.3 * ANTPERCENT ^ 1.28 * 1.362;
GVAR(ae2PathwayPower) = GVAR(peakPower) / (13.3 + 16.7 + 113.3) * 16.7 * ANTPERCENT ^ 1.28 * 1.362;
GVAR(ae1PathwayPower) = GVAR(peakPower) / (AE1_ATP_RELEASE_RATE + AE2_ATP_RELEASE_RATE + AN_ATP_RELEASE_RATE) * AE1_ATP_RELEASE_RATE * ANTPERCENT ^ 1.28 * 1.362;
GVAR(ae2PathwayPower) = GVAR(peakPower) / (AE1_ATP_RELEASE_RATE + AE2_ATP_RELEASE_RATE + AN_ATP_RELEASE_RATE) * AE2_ATP_RELEASE_RATE * ANTPERCENT ^ 1.28 * 1.362;
GVAR(aePathwayPower) = GVAR(ae1PathwayPower) + GVAR(ae2PathwayPower);
GVAR(anPathwayPower) = GVAR(peakPower) - GVAR(aePathwayPower);
GVAR(aeWattsPerATP) = GVAR(ae1PathwayPower) / AE1_ATP_RELEASE_RATE;
GVAR(anWattsPerATP) = GVAR(anPathwayPower) / AN_ATP_RELEASE_RATE;
GVAR(respiratoryBufferDivisor) = (RESPIRATORY_BUFFER - 1) / RESPIRATORY_BUFFER;
GVAR(maxPowerFatigueRatio) = 0.057 / GVAR(peakPower);
GVAR(ppeBlackoutLast) = 100;
GVAR(lastBreath) = 0;

View File

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

View File

@ -1,6 +1,6 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: BaerMitUmlaut
* Author: BaerMitUmlaut, ulteq
* Main looping function that updates fatigue values.
*
* Arguments:
@ -14,68 +14,134 @@
*
* Public: No
*/
if (!alive ACE_player) exitWith { // Dead people don't breath, Will also handle null (Map intros)
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
// Dead people don't breathe, will also handle null (map intros)
if (!alive ACE_player) exitWith {
[LINKFUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlSetFade 1;
_staminaBarContainer ctrlCommit 1;
};
private _velocity = velocity ACE_player;
private _normal = surfaceNormal (getPosWorld ACE_player);
private _movementVector = vectorNormalized _velocity;
private _sideVector = vectorNormalized (_movementVector vectorCrossProduct _normal);
private _fwdAngle = asin (_movementVector select 2);
private _sideAngle = asin (_sideVector select 2);
private _currentWork = REE;
private _currentSpeed = (vectorMagnitude (velocity ACE_player)) min 6;
private _currentSpeed = (vectorMagnitude _velocity) min 6;
// fix #4481. Diving to the ground is recorded as PRONE stance with running speed velocity. Cap maximum speed to fix.
if (GVAR(isProne)) then {
_currentSpeed = _currentSpeed min 1.5;
};
if ((vehicle ACE_player == ACE_player) && {_currentSpeed > 0.1} && {isTouchingGround ACE_player || {underwater ACE_player}}) then {
_currentWork = [ACE_player, _currentSpeed] call FUNC(getMetabolicCosts);
// Get the current duty
private _duty = GVAR(animDuty);
{
if (_x isEqualType 0) then {
_duty = _duty * _x;
} else {
_duty = _duty * (ACE_player call _x);
};
} forEach (values GVAR(dutyList));
private _terrainGradient = abs _fwdAngle;
private _terrainFactor = 1;
private _gearMass = 0 max (((ACE_player getVariable [QEGVAR(movement,totalLoad), loadAbs ACE_player]) / 22.046 - UNDERWEAR_WEIGHT) * GVAR(loadFactor));
if (isNull objectParent ACE_player && {_currentSpeed > 0.1} && {isTouchingGround ACE_player || {underwater ACE_player}}) then {
if (!GVAR(isSwimming)) then {
// If the unit is going downhill, it's much less demanding
if (_fwdAngle < 0) then {
_terrainGradient = 0.15 * _terrainGradient;
};
// Used to simulate the unevenness/roughness of the terrain
if ((getPosATL ACE_player) select 2 < 0.01) then {
private _sideGradient = abs (_sideAngle / 45) min 1;
_terrainFactor = 1 + _sideGradient ^ 4;
};
};
_currentWork = [_duty, _gearMass, _terrainGradient * GVAR(terrainGradientFactor), _terrainFactor, _currentSpeed] call FUNC(getMetabolicCosts);
_currentWork = _currentWork max REE;
};
// Oxygen calculation
private _oxygen = if (GETEGVAR(medical,enabled,false) && {EGVAR(medical_vitals,simulateSpo2)}) then { // Defer to medical
(ACE_player getVariable [QEGVAR(medical,spo2), 97]) / 100
} else {
1 - 0.131 * GVAR(respiratoryRate) ^ 2 // Default AF oxygen saturation
};
// 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;
private _muscleIntegritySqrt = sqrt (1 - GVAR(muscleDamage));
GVAR(muscleDamage) = GVAR(muscleDamage) + (_currentWork / GVAR(peakPower)) ^ 3.2 * MUSCLE_TEAR_RATE;
// Calculate muscle damage recovery
GVAR(muscleDamage) = 0 max (GVAR(muscleDamage) - MUSCLE_RECOVERY * GVAR(recoveryFactor)) min 1;
private _muscleIntegrity = 1 - GVAR(muscleDamage);
private _muscleFactor = sqrt _muscleIntegrity;
// Calculate available power
private _ae1PathwayPowerFatigued = GVAR(ae1PathwayPower) * sqrt (GVAR(ae1Reserve) / AE1_MAXRESERVE) * OXYGEN * _muscleIntegritySqrt;
private _ae2PathwayPowerFatigued = GVAR(ae2PathwayPower) * sqrt (GVAR(ae2Reserve) / AE2_MAXRESERVE) * OXYGEN * _muscleIntegritySqrt;
private _ae1PathwayPowerFatigued = GVAR(ae1PathwayPower) * sqrt (GVAR(ae1Reserve) / AE1_MAXRESERVE) * _oxygen * _muscleFactor;
private _ae2PathwayPowerFatigued = GVAR(ae2PathwayPower) * sqrt (GVAR(ae2Reserve) / AE2_MAXRESERVE) * _oxygen * _muscleFactor;
private _aePathwayPowerFatigued = _ae1PathwayPowerFatigued + _ae2PathwayPowerFatigued;
private _anPathwayPowerFatigued = GVAR(anPathwayPower) * sqrt (GVAR(anReserve) / AN_MAXRESERVE) * _oxygen * _muscleIntegrity;
// Calculate how much power is consumed from each reserve
private _ae1Power = _currentWork min _ae1PathwayPowerFatigued;
private _ae2Power = ((_currentWork - _ae1Power) max 0) min _ae2PathwayPowerFatigued;
private _anPower = (_currentWork - _ae1Power - _ae2Power) max 0;
private _ae2Power = (_currentWork - _ae1Power) min _ae2PathwayPowerFatigued;
private _anPower = 0 max (_currentWork - _ae1Power - _ae2Power);
// Remove ATP from reserves for current work
GVAR(ae1Reserve) = GVAR(ae1Reserve) - _ae1Power / WATTSPERATP;
GVAR(ae2Reserve) = GVAR(ae2Reserve) - _ae2Power / WATTSPERATP;
GVAR(anReserve) = GVAR(anReserve) - _anPower / WATTSPERATP;
// Increase anearobic fatigue
GVAR(anFatigue) = GVAR(anFatigue) + _anPower * (0.057 / GVAR(peakPower)) * 1.1;
GVAR(ae1Reserve) = 0 max (GVAR(ae1Reserve) - _ae1Power / GVAR(aeWattsPerATP));
GVAR(ae2Reserve) = 0 max (GVAR(ae2Reserve) - _ae2Power / GVAR(aeWattsPerATP));
GVAR(anReserve) = 0 max (GVAR(anReserve) - _anPower / GVAR(anWattsPerATP));
// Acidosis accumulation
GVAR(anFatigue) = GVAR(anFatigue) + _anPower * GVAR(maxPowerFatigueRatio) * 1.1;
// Aerobic ATP reserve recovery
GVAR(ae1Reserve) = ((GVAR(ae1Reserve) + OXYGEN * 6.60 * (GVAR(ae1PathwayPower) - _ae1Power) / GVAR(ae1PathwayPower) * GVAR(recoveryFactor)) min AE1_MAXRESERVE) max 0;
GVAR(ae2Reserve) = ((GVAR(ae2Reserve) + OXYGEN * 5.83 * (GVAR(ae2PathwayPower) - _ae2Power) / GVAR(ae2PathwayPower) * GVAR(recoveryFactor)) min AE2_MAXRESERVE) max 0;
GVAR(ae1Reserve) = (GVAR(ae1Reserve) + _oxygen * GVAR(recoveryFactor) * AE1_ATP_RECOVERY * (GVAR(ae1PathwayPower) - _ae1Power) / GVAR(ae1PathwayPower)) min AE1_MAXRESERVE;
GVAR(ae2Reserve) = (GVAR(ae2Reserve) + _oxygen * GVAR(recoveryFactor) * AE2_ATP_RECOVERY * (GVAR(ae2PathwayPower) - _ae2Power) / GVAR(ae2PathwayPower)) min AE2_MAXRESERVE;
// Anaerobic ATP reserver and fatigue recovery
GVAR(anReserve) = ((GVAR(anReserve)
+ (_ae1PathwayPowerFatigued + _ae2PathwayPowerFatigued - _ae1Power - _ae2Power) / GVAR(VO2MaxPower) * 56.7 * GVAR(anFatigue) ^ 2 * GVAR(recoveryFactor)
) min AN_MAXRESERVE) max 0;
private _aeSurplus = _ae1PathwayPowerFatigued + _ae2PathwayPowerFatigued - _ae1Power - _ae2Power;
GVAR(anFatigue) = ((GVAR(anFatigue)
- (_ae1PathwayPowerFatigued + _ae2PathwayPowerFatigued - _ae1Power - _ae2Power) * (0.057 / GVAR(peakPower)) * GVAR(anFatigue) ^ 2 * GVAR(recoveryFactor)
) min 1) max 0;
// Anaerobic ATP reserve recovery
GVAR(anReserve) = 0 max (GVAR(anReserve) + _aeSurplus / GVAR(VO2MaxPower) * AN_ATP_RECOVERY * GVAR(recoveryFactor) * (GVAR(anFatigue) max linearConversion [AN_MAXRESERVE, 0, GVAR(anReserve), 0, 0.75, true]) ^ 2) min AN_MAXRESERVE; // max linearConversion ensures that if GVAR(anFatigue) is very low, it will still regenerate reserves
// Acidosis recovery
GVAR(anFatigue) = 0 max (GVAR(anFatigue) - _aeSurplus * GVAR(maxPowerFatigueRatio) * GVAR(recoveryFactor) * GVAR(anFatigue) ^ 2) min 1;
private _aeReservePercentage = (GVAR(ae1Reserve) / AE1_MAXRESERVE + GVAR(ae2Reserve) / AE2_MAXRESERVE) / 2;
private _anReservePercentage = GVAR(anReserve) / AN_MAXRESERVE;
private _perceivedFatigue = 1 - (_anReservePercentage min _aeReservePercentage);
// Respiratory rate decrease
GVAR(respiratoryRate) = GVAR(respiratoryRate) * GVAR(respiratoryBufferDivisor);
[ACE_player, _perceivedFatigue, _currentSpeed, GVAR(anReserve) == 0] call FUNC(handleEffects);
// Respiratory rate increase
private _aePowerRatio = (GVAR(aePathwayPower) / _aePathwayPowerFatigued) min 2;
private _respiratorySampleDivisor = 1 / (RESPIRATORY_BUFFER * 4.72 * GVAR(VO2Max));
GVAR(respiratoryRate) = (GVAR(respiratoryRate) + _currentWork * _respiratorySampleDivisor * _aePowerRatio) min 1;
// Calculate a pseudo-perceived fatigue, which is used for effects
GVAR(aeReservePercentage) = (GVAR(ae1Reserve) / AE1_MAXRESERVE + GVAR(ae2Reserve) / AE2_MAXRESERVE) / 2;
GVAR(anReservePercentage) = GVAR(anReserve) / AN_MAXRESERVE;
private _perceivedFatigue = 1 - (GVAR(anReservePercentage) min GVAR(aeReservePercentage));
#ifdef DEBUG_MODE_FULL
systemChat format ["---- muscleDamage: %1 ----", GVAR(muscleDamage) toFixed 8];
systemChat format ["---- ae2: %1 - an: %2 ----", (GVAR(ae2Reserve) / AE2_MAXRESERVE) toFixed 2, (GVAR(anReserve) / AN_MAXRESERVE) toFixed 2];
systemChat format ["---- anFatigue: %1 - perceivedFatigue: %2 ----", GVAR(anFatigue) toFixed 2, _perceivedFatigue toFixed 2];
systemChat format ["---- velocity %1 - respiratoryRate: %2 ----", (vectorMagnitude _velocity) toFixed 2, GVAR(respiratoryRate) toFixed 2];
// systemChat format ["---- aePower: %1 ----", _aePathwayPowerFatigued toFixed 1];
#endif
[ACE_player, _perceivedFatigue, GVAR(anReserve) == 0, _fwdAngle, _sideAngle] call FUNC(handleEffects);
if (GVAR(enableStaminaBar)) then {
[GVAR(anReserve) / AN_MAXRESERVE] call FUNC(handleStaminaBar);
};
[FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;
[LINKFUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute;

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

@ -0,0 +1,40 @@
#include "..\script_component.hpp"
/*
* Author: ulteq
* Draw lines for debugging.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ace_advanced_fatigue_fnc_renderDebugLines
*
* Public: No
*/
addMissionEventHandler ["Draw3D", {
private _normal = surfaceNormal (getPosWorld ACE_player);
private _beg = (getPosWorld ACE_player) vectorAdd (_normal vectorMultiply 0.5);
private _end = _beg vectorAdd (_normal vectorMultiply 2);
drawLine3D [ASLToATL _beg, ASLToATL _end, [0, 1, 0, 1]];
private _side = vectorNormalized (_normal vectorCrossProduct [0, 0, 1]);
private _end = _beg vectorAdd (_side vectorMultiply 2);
drawLine3D [ASLToATL _beg, ASLToATL _end, [0, 0, 1, 1]];
private _up = vectorNormalized (_normal vectorCrossProduct _side);
private _end = _beg vectorAdd (_up vectorMultiply 2);
drawLine3D [ASLToATL _beg, ASLToATL _end, [1, 0, 0, 1]];
private _movementVector = vectorNormalized (velocity ACE_player);
private _end = _beg vectorAdd (_movementVector vectorMultiply 2);
drawLine3D [ASLToATL _beg, ASLToATL _end, [1, 1, 0, 1]];
private _sideVector = vectorNormalized (_movementVector vectorCrossProduct _normal);
_sideVector set [2, 0];
private _end = _beg vectorAdd (_sideVector vectorMultiply 2);
drawLine3D [ASLToATL _beg, ASLToATL _end, [0, 1, 1, 1]];
}];

View File

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

View File

@ -0,0 +1,92 @@
[
QGVAR(enabled),
"CHECKBOX",
[LSTRING(Enabled), LSTRING(Enabled_Description)],
LSTRING(DisplayName),
true,
1,
{
if (!_this) then {
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlSetFade 1;
_staminaBarContainer ctrlCommit 0;
};
[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)
},
true // Needs mission restart
] call CBA_fnc_addSetting;
[
QGVAR(enableStaminaBar),
"CHECKBOX",
[LSTRING(EnableStaminaBar), LSTRING(EnableStaminaBar_Description)],
LSTRING(DisplayName),
true,
1,
{
if (!_this) then {
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlSetFade 1;
_staminaBarContainer ctrlCommit 0;
};
}
] call CBA_fnc_addSetting;
[
QGVAR(fadeStaminaBar),
"CHECKBOX",
[LSTRING(FadeStaminaBar), LSTRING(FadeStaminaBar_Description)],
LSTRING(DisplayName),
true,
0,
{
if (!_this && GVAR(enabled) && GVAR(enableStaminaBar)) then {
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlSetFade 0;
_staminaBarContainer ctrlCommit 0;
};
}
] call CBA_fnc_addSetting;
[
QGVAR(performanceFactor),
"SLIDER",
[LSTRING(PerformanceFactor), LSTRING(PerformanceFactor_Description)],
LSTRING(DisplayName),
[0, 10, 1, 2],
1,
{
// Recalculate values if the setting is changed mid-mission
if (GVAR(enabled) && hasInterface && !isNull ACE_player) then {
[ACE_player, ACE_player] call FUNC(handlePlayerChanged);
};
}
] call CBA_fnc_addSetting;
[
QGVAR(recoveryFactor),
"SLIDER",
[LSTRING(RecoveryFactor), LSTRING(RecoveryFactor_Description)],
LSTRING(DisplayName),
[0, 10, 1, 2],
1
] call CBA_fnc_addSetting;
[
QGVAR(loadFactor),
"SLIDER",
[LSTRING(LoadFactor), LSTRING(LoadFactor_Description)],
LSTRING(DisplayName),
[0, 5, 1, 2],
1
] call CBA_fnc_addSetting;
[
QGVAR(terrainGradientFactor),
"SLIDER",
[LSTRING(TerrainGradientFactor), LSTRING(TerrainGradientFactor_Description)],
LSTRING(DisplayName),
[0, 5, 1, 2],
1
] call CBA_fnc_addSetting;

View File

@ -1,70 +0,0 @@
[
QGVAR(enabled),
"CHECKBOX",
[LSTRING(Enabled), LSTRING(Enabled_Description)],
LSTRING(DisplayName),
true,
true,
{[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_Settings_fnc_init;
[
QGVAR(enableStaminaBar),
"CHECKBOX",
[LSTRING(EnableStaminaBar), LSTRING(EnableStaminaBar_Description)],
LSTRING(DisplayName),
true,
true, {
if (!_this) then {
private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull];
_staminaBarContainer ctrlSetFade 1;
_staminaBarContainer ctrlCommit 0;
};
}
] call CBA_Settings_fnc_init;
[
QGVAR(performanceFactor),
"SLIDER",
[LSTRING(PerformanceFactor), LSTRING(PerformanceFactor_Description)],
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
[
QGVAR(recoveryFactor),
"SLIDER",
[LSTRING(RecoveryFactor), LSTRING(RecoveryFactor_Description)],
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
[
QGVAR(loadFactor),
"SLIDER",
[LSTRING(LoadFactor), LSTRING(LoadFactor_Description)],
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
[
QGVAR(terrainGradientFactor),
"SLIDER",
[LSTRING(TerrainGradientFactor), LSTRING(TerrainGradientFactor_Description)],
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
[
QGVAR(swayFactor),
"SLIDER",
[LSTRING(SwayFactor), LSTRING(SwayFactor_Description)],
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;

View File

@ -16,14 +16,28 @@
#include "\z\ace\addons\main\script_macros.hpp"
#define UNDERWEAR_WEIGHT 3.5
#define ANTPERCENT 0.8
#define SIM_BODYMASS 70
#define JOULES_PER_ML_O2 20.9
#define VO2MAX_STRENGTH 4.1
#define REE 18.83 //((0.5617 * SIM_BODYMASS + 42.57) * 0.23)
#define OXYGEN 0.9
#define WATTSPERATP 7
#define BIOMECH_EFFICIENCY 0.23
#define REE 18.83 // ((0.5617 * SIM_BODYMASS + 42.57) * BIOMECH_EFFICIENCY)
#define AE1_MAXRESERVE 4000000
#define AE2_MAXRESERVE 84000
#define AN_MAXRESERVE 2300
#define RESPIRATORY_BUFFER 60
#define MUSCLE_TEAR_RATE 0.00004
#define MUSCLE_RECOVERY 0.00000386
#define AE1_ATP_RELEASE_RATE 13.3 // mmol
#define AE2_ATP_RELEASE_RATE 16.7 // mmol
#define AN_ATP_RELEASE_RATE 113.3 // mmol
#define AE1_ATP_RECOVERY 6.60 // mmol
#define AE2_ATP_RECOVERY 5.83 // mmol
#define AN_ATP_RECOVERY 56.70 // mmol
#define AE1_MAXRESERVE 4000000 // mmol
#define AE2_MAXRESERVE 84000 // mmol
#define AN_MAXRESERVE 2300 // mmol

View File

@ -3,18 +3,23 @@
<Package name="Advanced_Fatigue">
<Key ID="STR_ACE_Advanced_Fatigue_DisplayName">
<English>ACE Advanced Fatigue</English>
<Spanish>ACE Fatiga Avanzada</Spanish>
<German>ACE Erweiterte Ausdauer</German>
<Chinese>ACE 進階疲勞</Chinese>
<Chinesesimp>ACE 进阶疲劳</Chinesesimp>
<Japanese>ACE アドバンスド ファティーグ</Japanese>
<Chinesesimp>ACE 进阶体力</Chinesesimp>
<Japanese>ACE アドバンスド疲労</Japanese>
<Italian>ACE Fatica Avanzata</Italian>
<Korean>ACE 고급 피로도</Korean>
<French>ACE Fatigue Avancée</French>
<French>ACE Fatigue avancée</French>
<Polish>ACE Zaawansowane Zmęczenie</Polish>
<Russian>ACE Продвинутая усталость</Russian>
<Portuguese>ACE Fadiga Avançada</Portuguese>
<Czech>ACE Pokročilá únava</Czech>
<Turkish>ACE Gelişmiş Yorgunluk</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor">
<English>Performance Factor</English>
<Spanish>Factor de rendimiento</Spanish>
<German>Leistungsfaktor</German>
<Japanese>パフォーマンス因数</Japanese>
<Polish>Współczynnik wydolności</Polish>
@ -24,33 +29,43 @@
<Chinese>體力值</Chinese>
<Chinesesimp>体力值</Chinesesimp>
<Russian>Фактор производительности</Russian>
<Portuguese>Fator de Performance</Portuguese>
<Czech>Faktor výkonu</Czech>
<Turkish>Performans Faktörü</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor_Description">
<English>Influences the overall performance of all players with no custom factor. Higher means better.</English>
<Spanish>Afecta al rendimiento general de todos los jugadores sin opciones personalizadas. Más alto significa mejor</Spanish>
<German>Beinflusst die Leistungsfähigkeit aller Spieler ohne eigenen Leistungsfaktor. Ein höherer Wert bedeutet bessere Leistung.</German>
<Japanese>個別の因数を設定されていない、全てのプレイヤーのあらゆるパフォーマンスに影響を与えます。 値が高ければ高いほど、良い効果が得られます。</Japanese>
<Polish>Wpływa na ogólną wydolność organizmu u wszystkich graczy bez ustawionego niestandardowego współczynnika. Więcej znaczy lepiej.</Polish>
<Korean>모든 성능이 임의로 설정된 값 없이 영향받습니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
<French>Influence les performances générales de tous les joueurs sans facteurs personalisés. Une valeur plus élevée implique de meilleures performances.</French>
<Italian>Influenza qualsiasi prestazione di tutti i giocatori smuniti di un fattore personalizzato. Maggiore significa migliore.</Italian>
<French>Impacte la performance globale de tous les joueurs n'ayant pas de facteur personnalisé.\nPlus la valeur est élevée, plus le joueur est performant.</French>
<Italian>Influenza la prestazione generale di tutti i giocatori smuniti di un fattore personalizzato. Maggiore significa migliore.</Italian>
<Chinese>影響所有玩家的體力表現,值越高代表體力越好</Chinese>
<Chinesesimp>影响所有玩家的体力表现,值越高代表体力越好</Chinesesimp>
<Russian>Влияет на общую производительность игроков, у которых не задано персональное значение.</Russian>
<Russian>Влияет на общую производительность игроков, у которых не задано персональное значение. Чем выше, тем лучше.</Russian>
<Portuguese>Influencia na performance geral de todos os jogadores sem nenhum fator personalizado. Quanto maior, melhor.</Portuguese>
<Czech>Ovlivňuje celkový výkon všech hráčů bez vlastního faktoru. Vyšší znamená lépe.</Czech>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor_EdenDescription">
<English>Influences the overall performance of this unit. Higher means better.</English>
<Spanish>Afecta al rendimiento de esta unidad. Más alto significa mejor</Spanish>
<German>Beinflusst die Leistungsfähigkeit dieser Einheit. Ein höherer Wert bedeutet bessere Leistung.</German>
<Japanese>このユニットのあらゆるパフォーマンスに影響を与えます。 値が高ければ高いほど、良い効果が得られます。</Japanese>
<Polish>Wpływa na ogólną wydolność tej jednostki. Więcej znaczy lepiej.</Polish>
<Korean>모든 성능이 이 단위로 영향을 받습니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
<French>Influence les performances générales de cette unité. Une valeur plus élevée implique de meilleures performances.</French>
<Italian>Influenza qualsiasi prestazione di questa unità. Maggiore significa migliore.</Italian>
<French>Impacte la performance globale de cette unité.\nPlus la valeur est élevée, plus l'unité est performante.</French>
<Italian>Influenza la prestazione personalizzata di questa unità. Maggiore significa migliore.</Italian>
<Chinese>影響這個單位的體力表現,值越高代表體力越好</Chinese>
<Chinesesimp>影响这个单位的体力表现,值越高代表体力越好</Chinesesimp>
<Russian>Влияет на общую производительность юнита.</Russian>
<Russian>Влияет на общую производительность юнита.Чем выше, тем лучше.</Russian>
<Portuguese>Influencia na performance geral dessa unidade. Quanto maior, melhor.</Portuguese>
<Czech>Ovlivňuje celkový výkon této jednotky. Vyšší znamená lépe.</Czech>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_RecoveryFactor">
<English>Recovery Factor</English>
<Spanish>Factor de recuperación</Spanish>
<German>Erholungsfaktor</German>
<Japanese>回復因数</Japanese>
<Polish>Współczynnik regeneracji</Polish>
@ -58,47 +73,60 @@
<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>
<Turkish>Kurtarma Faktörü</Turkish>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_RecoveryFactor_Description">
<English>Changes how fast the player recovers when resting. Higher is faster.</English>
<Spanish>Modifica cómo de rápido se recupera el jugador cuando descansa. Más alto significa mejor</Spanish>
<German>Ändert, wie schnell ein Spieler Ausdauer regeneriert. Ein höherer Wert bedeutet eine schnellere Regeneration.</German>
<Japanese>プレイヤーが休憩をとる際に、どのくらいの速度でスタミナ回復するかを設定します。 値が高ければ高いほど、早くなります。</Japanese>
<Polish>Wpływa na czas regeneracji podczas postoju. Więcej znaczy szybciej.</Polish>
<Korean>얼마나 빨리 회복하는지를 바꿉니다. 값이 클수록 더 나은 성능을 발휘합니다</Korean>
<French>Change la vitesse à laquelle les joueurs récupèrent leur endurance lorsqu'ils se reposent. Une valeur plus élevée implique une récupération plus rapide.</French>
<Italian>Determina in quanto tempo il giocatore recupera quando rilassato. Maggiore significa migliore.</Italian>
<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 quanto velocemente il giocatore recupera le energie quando si ferma. 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>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_LoadFactor">
<English>Load Factor</English>
<Spanish>Factor de carga</Spanish>
<German>Gewichtsfaktor</German>
<Japanese>重量因数</Japanese>
<Polish>Współczynnik masy ekwipunku</Polish>
<Korean>부담 요인</Korean>
<French>Facteur d'encombrement</French>
<Italian>Fattore Caricamento</Italian>
<French>Facteur de charge</French>
<Italian>Fattore Carico</Italian>
<Chinese>負重量</Chinese>
<Chinesesimp>重量</Chinesesimp>
<Chinesesimp>重量系数</Chinesesimp>
<Russian>Фактор нагрузки</Russian>
<Portuguese>Fator de Carga</Portuguese>
<Czech>Faktor zatížení</Czech>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_LoadFactor_Description">
<English>Increases or decreases how much weight influences the players performance. Zero means equipment weight has no performance influence.</English>
<Spanish>Aumenta o disminuye cuanto influye el peso en el rendimiento del jugador. Cero significa que el peso no influye en el rendimiento</Spanish>
<German>Erhöht oder verringert, wie viel Einfluss das Ausrüstungsgewicht auf die Leistung hat. Null heißt, dass es keinen Einfluss hat.</German>
<Japanese>装備重量がプレイヤーのパフォーマンスにもたらす影響を増減させます。 値をゼロに設定した場合、装備重量はパフォーマンスに影響を与えません。</Japanese>
<Polish>Zmniejsza lub zwiększa wpływ ciężaru ekwipunku na wydolność gracza. Zero oznacza kompletny brak wpływu na wydolność.</Polish>
<Korean>플레이어가 무게에 따라 얼마나 영향받는지를 증가시키거나 감소시킵니다. 0의 경우 플레이어가 장비 무게에 영향받지 않습니다.</Korean>
<French>Augmente ou réduit l'influence que le poids à sur les performances des joueurs. Zéro implique que le poids de l'équipement n'a pas d'influence 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>
<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>Determina quanto il peso trasportato influenza le prestazioni dei giocatori. Zero significa che il peso dell'equipaggiamento non influisce sulle 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>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_TerrainGradientFactor">
<English>Terrain Gradient Factor</English>
<Spanish>Factor de inclinación del terreno</Spanish>
<German>Terrainsteigungsfaktor</German>
<Japanese>地形勾配因数</Japanese>
<Polish>Współczynnik terenu</Polish>
@ -106,71 +134,61 @@
<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>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_TerrainGradientFactor_Description">
<English>Sets how much steep terrain increases stamina loss. Higher means higher stamina loss.</English>
<Spanish>Modifica cuanto afecta la inclinación al cansansio. Más alto significa más cansancio</Spanish>
<German>Beeinflusst, wie stark Steigungen den Ausdauerverbrauch erhöhen. Ein höherer Wert erhöht den Ausdauerverbrauch.</German>
<Japanese>急勾配の地形がどれだけスタミナ消費を増大させるかを設定します。 値が高ければ高いほど、スタミナ消費が大きくなります。</Japanese>
<Polish>Wpływa na to w jakim stopniu stromy teren wpływa na utratę wytrzymałości. Więcej oznacza szybszą utratę wytrzymałości.</Polish>
<Korean>경사도에 따라 얼마나 피로해지는지를 정합니다. 값이 클수록 더 많은 피로를 유발합니다.</Korean>
<French>Configure l'influence de l'inclinaison du terrain sur la perte d'endurance. Une valeur plus élevée implique une perte d'endurance plus importante.</French>
<Italian>Stabilisce quanto la pendenza del terreno incrementa la perdita della stamina. Maggiore significa più stamina persa.</Italian>
<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>Determina quanto la pendenza del terreno incrementa la perdita della stamina. Maggiore significa più stamina persa.</Italian>
<Chinese>設定陡峭的地形將會影響多少體力的流失,值越高代表體力流失越快</Chinese>
<Chinesesimp>设定陡峭的地形将会影响多少体力的流失值越高代表体力流失越快</Chinesesimp>
<Chinesesimp>设定陡峭的地形将会影响多少体力的流失速度,值越高代表体力流失越快</Chinesesimp>
<Russian>Устанавливает, насколько крутая местность увеличивает потерю выносливости. Чем выше, тем быстрее теряется выносливость.</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_SwayFactor">
<English>Sway factor</English>
<German>Verwacklungsfaktor</German>
<Japanese>手ぶれ因数</Japanese>
<Chinesesimp>抖动因数</Chinesesimp>
<Chinese>抖動因素</Chinese>
<French>Facteur de stabilisation</French>
<Italian>Fattore di oscillazione</Italian>
<Polish>Czynnik kołysania</Polish>
<Russian>Фактор колебания прицела</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_SwayFactor_Description">
<English>Influences the amount of weapon sway. Higher means more sway.</English>
<German>Beeinflusst den Faktor, wie ruhig man eine Waffe halten kann. Ein höherer Wert bedeutet weniger Stabilisierung</German>
<Japanese>武器を持つ手のぶれ度合いを設定します。 値が高ければ高いほど、手ぶれが強くなります。</Japanese>
<Chinesesimp>影响手持武器的晃动程度,数值越高,抖动的越厉害.</Chinesesimp>
<Chinese>影響手持武器晃動程度,數值越高抖動越厲害</Chinese>
<French>Influence les mouvements de l'arme, une valeur plus élevée signifie plus de mouvements</French>
<Italian>Influenza l'ammontare di oscillazione dell'arma. Maggiore significa più oscillazione.</Italian>
<Polish>Wpływa na poziom kołysania broni. Większa ilość znaczy większe kołysanie.</Polish>
<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>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_Enabled">
<English>Enabled</English>
<Spanish>Activada</Spanish>
<German>Aktiv</German>
<Japanese>アドバンスド ファティーグを有効化する</Japanese>
<Japanese>有効化</Japanese>
<Polish>Włączone</Polish>
<Korean>활성화</Korean>
<French>Activé</French>
<Italian>Abilitato</Italian>
<Italian>Abilitata</Italian>
<Chinese>啟用</Chinese>
<Chinesesimp>启用</Chinesesimp>
<Russian>Включена</Russian>
<Portuguese>Ativado</Portuguese>
<Czech>Povoleno</Czech>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_Enabled_Description">
<English>Enables/disables Advanced Fatigue.</English>
<Spanish>Activa/desactiva la fatiga avanzada</Spanish>
<German>Aktiviert/deaktiviert Advanced Fatigue.</German>
<Japanese>アドバンスド ファティーグを有効化します。</Japanese>
<Japanese>アドバンスド疲労は高度な疲労管理システムを有効化します。</Japanese>
<Polish>Włącza/wyłącza zaawansowaną wytrzymałość</Polish>
<Korean>고급 피로도 활성화/비활성화</Korean>
<French>Active/désactive la fatigue avancée.</French>
<Italian>Abilita/disabilita la Fatica Avanzata.</Italian>
<French>Active/Désactive la fatigue avancée.</French>
<Italian>Abilita/Disabilita la Fatica Avanzata.</Italian>
<Chinese>啟用/關閉進階體力.</Chinese>
<Chinesesimp>启用/关闭进阶体力.</Chinesesimp>
<Russian>Включает / Отключает Продвинутую усталость</Russian>
<Chinesesimp>启用/关闭进阶体力。</Chinesesimp>
<Russian>Включает/отключает Продвинутую усталость</Russian>
<Portuguese>Ativa/Desativa Fadiga Avançada.</Portuguese>
<Czech>Aktivuje / deaktivuje Pokročilou únavu.</Czech>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_EnableStaminaBar">
<English>Show stamina bar</English>
<Spanish>Mostrar barra de cansancio</Spanish>
<German>Zeige Ausdauerleiste</German>
<Japanese>スタミナバーを表示する</Japanese>
<Japanese>スタミナバーを表示</Japanese>
<Polish>Pokaż pasek wytrzymałości</Polish>
<Korean>피로도 막대</Korean>
<French>Afficher la barre d'endurance</French>
@ -178,9 +196,12 @@
<Chinese>顯示體力條</Chinese>
<Chinesesimp>显示体力条</Chinesesimp>
<Russian>Показать шкалу усталости</Russian>
<Portuguese>Exibir barra de estamina</Portuguese>
<Czech>Zobrazit lištu výdrže</Czech>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_EnableStaminaBar_Description">
<English>Shows the stamina bar.</English>
<Spanish>Muestra la barra de cansancio</Spanish>
<German>Zeigt die Ausdauerleiste an.</German>
<Japanese>スタミナバーを表示します。</Japanese>
<Polish>Pokazuje pasek wytrzymałości.</Polish>
@ -190,6 +211,39 @@
<Chinese>顯示體力條</Chinese>
<Chinesesimp>显示体力条</Chinesesimp>
<Russian>Показывает шкалу усталости.</Russian>
<Portuguese>Exibe a barra de estamina.</Portuguese>
<Czech>Zobrazuje lištu výdrže</Czech>
</Key>
<Key ID="STR_ACE_Advanced_Fatigue_FadeStaminaBar">
<English>Fade Stamina bar automatically</English>
<Spanish>Desvanecer la barra de cansancio</Spanish>
<Russian>Скрыть шкалу усталости автоматически</Russian>
<German>Blende Ausdauerleiste automatisch aus</German>
<Chinese>體力條自動淡去</Chinese>
<Chinesesimp>自动淡化体力条</Chinesesimp>
<Italian>Nascondi in automatico la barra della stamina</Italian>
<Czech>Automaticky schovat lištu výdrže</Czech>
<French>Fondu automatique de la barre d'endurance</French>
<Japanese>自動的にスタミナバーを非表示</Japanese>
<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>
<Spanish>Ajusta la ocultación progresiva de la barra de cansancio</Spanish>
<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,40 +1,17 @@
class ACE_Settings {
class GVAR(enabled) {
category = CSTRING(Category);
displayName = CSTRING(Enable_DisplayName);
description = CSTRING(Enable_Description);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
movedToSQF = 1;
};
class GVAR(showThrowArc) {
category = CSTRING(Category);
displayName = CSTRING(ShowThrowArc_DisplayName);
description = CSTRING(ShowThrowArc_Description);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
movedToSQF = 1;
};
class GVAR(showMouseControls) {
category = CSTRING(Category);
displayName = CSTRING(ShowMouseControls_DisplayName);
description = CSTRING(ShowMouseControls_Description);
typeName = "BOOL";
value = 1;
isClientSettable = 1;
movedToSQF = 1;
};
class GVAR(enablePickUp) {
category = CSTRING(Category);
displayName = CSTRING(EnablePickUp_DisplayName);
description = CSTRING(EnablePickUp_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
class GVAR(enablePickUpAttached) {
category = CSTRING(Category);
displayName = CSTRING(EnablePickUpAttached_DisplayName);
description = CSTRING(EnablePickUpAttached_Description);
typeName = "BOOL";
value = 1;
movedToSQF = 1;
};
};

View File

@ -1,17 +1,17 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

View File

@ -2,10 +2,3 @@ ace_advanced_throwing
===================
Integrates advanced throwing by [Dslyecxi](https://github.com/dslyecxi).
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [Jonpas](https://github.com/jonpas)

View File

@ -1,26 +1,19 @@
#include "script_component.hpp"
// Fired XEH
[QGVAR(throwFiredXEH), FUNC(throwFiredXEH)] call CBA_fnc_addEventHandler;
GVAR(ammoEventHandlers) = createHashMap;
[QGVAR(throwFiredXEH), LINKFUNC(throwFiredXEH)] call CBA_fnc_addEventHandler;
// Exit on HC
if (!hasInterface) exitWith {};
// Ammo/Magazines look-up hash for correctness of initSpeed
GVAR(ammoMagLookup) = call CBA_fnc_createNamespace;
{
{
private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo");
if (_ammo != "") then { GVAR(ammoMagLookup) setVariable [_ammo, _x]; };
} count (getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines"));
nil
} count getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
// Temporary Wind Info indication
GVAR(tempWindInfo) = false;
// Add keybinds
["ACE3 Weapons", QGVAR(prepare), localize LSTRING(Prepare), {
// Condition
if (!([ACE_player] call FUNC(canPrepare))) exitWith {false};
if !([ACE_player] call FUNC(canPrepare)) exitWith {false};
if (EGVAR(common,isReloading)) exitWith {true};
// Statement

View File

@ -6,4 +6,6 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
#include "initSettings.inc.sqf"
ADDON = true;

View File

@ -1,3 +1,21 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"
// Ammo/Magazines look-up hash for correctness of initSpeed
private _cfgMagazines = configFile >> "CfgMagazines";
private _cfgAmmo = configFile >> "CfgAmmo";
private _cfgThrow = configFile >> "CfgWeapons" >> "Throw";
private _ammoMagLookup = createHashMap;
{
{
private _ammo = getText (_cfgMagazines >> _x >> "ammo");
if (_ammo != "") then {
_ammoMagLookup set [configName (_cfgAmmo >> _ammo), _x];
};
} forEach (getArray (_cfgThrow >> _x >> "magazines"));
} forEach (getArray (_cfgThrow >> "muzzles"));
uiNamespace setVariable [QGVAR(ammoMagLookup), compileFinal _ammoMagLookup];

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.
@ -19,7 +19,7 @@ params ["_unit"];
if !(_unit getVariable [QGVAR(inHand), false]) exitWith {false};
if (vehicle _unit != _unit) exitWith {
if (!isNull objectParent _unit) exitWith {
private _startPos = eyePos _unit;
private _aimLinePos = AGLToASL (positionCameraToWorld [0, 0, 1]);
private _intersections = lineIntersectsSurfaces [_startPos, _aimLinePos, _unit, objNull, false];

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Zapat, Dslyecxi, Jonpas
* Draws throw arc.
@ -53,7 +53,7 @@ for "_i" from 0.05 to 1.45 step 0.1 do {
if (lineIntersects [_prevTrajASL, _newTrajASL]) then { // Checks the "VIEW" LOD
_cross = 2; // 2: View LOD Block (Red)
} else {
if (!((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isEqualTo [])) then {
if ((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isNotEqualTo []) then {
_cross = 3; // 3: GEOM/FIRE LOD Block (Yellow) - pass a3 bulding glass, but blocked on some CUP glass
};
};

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:
@ -43,13 +43,10 @@ if ((!_primed) && {!((_throwableMag in (uniformItems ACE_player)) || {_throwable
// Get correct throw power for primed grenade
if (_primed) then {
private _ammoType = typeOf _activeThrowable;
_throwableMag = GVAR(ammoMagLookup) getVariable _ammoType;
if (isNil "_throwableMag") then {
// If ammo type is not found:
// What we're trying to throw must not be a normal throwable because it is not in our lookup hash (e.g. 40mm smoke)
// Just use HandGrenade as it has an average initSpeed value
_throwableMag = "HandGrenade";
};
_throwableMag = (uiNamespace getVariable QGVAR(ammoMagLookup)) getOrDefault [typeOf _activeThrowable, "HandGrenade"];
};
// Some throwables have different classname for magazine and ammo
@ -118,7 +115,7 @@ if (abs _leanCoef < 0.15 || {vehicle ACE_player != ACE_player} || {weaponLowered
private _posCameraWorld = AGLToASL (positionCameraToWorld [0, 0, 0]);
_posHeadRel = _posHeadRel vectorAdd [-0.03, 0.01, 0.15]; // Bring closer to eyePos value
private _posFin = AGLToASL (ACE_player modelToWorldVisual _posHeadRel);
private _posFin = ACE_player modelToWorldVisualWorld _posHeadRel;
private _throwType = ACE_player getVariable [QGVAR(throwType), THROW_TYPE_DEFAULT];

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Exits throw mode.
@ -53,6 +53,12 @@ _unit setVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT];
// Remove controls hint (check if ever enabled is inside the function)
call EFUNC(interaction,hideMouseHint);
// Hide wind info after throw, if it was temporarily enabled for the throw
if (GVAR(tempWindInfo)) then {
EGVAR(weather,WindInfo) = false;
GVAR(tempWindInfo) = false;
};
// Remove throw action
[_unit, "DefaultAction", _unit getVariable [QGVAR(throwAction), -1]] call EFUNC(common,removeActionEventHandler);

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: PabstMirror
* Retrieve muzzle name from config.
@ -17,9 +17,9 @@
params ["_magazineClassname"];
_magazineClassname = toLower _magazineClassname;
_magazineClassname = toLowerANSI _magazineClassname;
private _throwMuzzles = getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
_throwMuzzles = _throwMuzzles select {_magazineClassname in ((getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines")) apply {toLower _x})};
_throwMuzzles = _throwMuzzles select {_magazineClassname in ((getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines")) apply {toLowerANSI _x})};
[_throwMuzzles select 0, ""] select (_throwMuzzles isEqualTo [])

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.
@ -21,7 +21,7 @@ TRACE_1("params",_unit);
// Select next throwable if one already in hand
if (_unit getVariable [QGVAR(inHand), false]) exitWith {
TRACE_1("inHand",_unit);
if (!(_unit getVariable [QGVAR(primed), false])) then {
if !(_unit getVariable [QGVAR(primed), false]) then {
TRACE_1("not primed",_unit);
// Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory)
// selectNextGrenade relies on muzzles array (setAmmo 0 removes the muzzle from the array and current can't be found, cycles between 0 and 1 muzzles)
@ -35,6 +35,11 @@ if (isNull (_unit getVariable [QGVAR(activeThrowable), objNull]) && {(currentThr
TRACE_1("no throwables",_unit);
};
// Temporarily enable wind info, to aid in throwing smoke grenades effectively
if (GVAR(enableTempWindInfo) && {!(missionNamespace getVariable [QEGVAR(weather,WindInfo), false])}) then {
[] call EFUNC(weather,displayWindInfo);
GVAR(tempWindInfo) = true;
};
_unit setVariable [QGVAR(inHand), true];

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).
@ -31,7 +31,7 @@
_nearThrowables append (ACE_player nearObjects ["ACE_Chemlight_IR_Dummy", PICK_UP_DISTANCE]);
{
if (!(_x in _throwablesHelped) &&
if (!(_x in _throwablesHelped) && {!((attachedTo _x) getVariable [QGVAR(disablePickUp), false])} &&
{!(_x isKindOf "SmokeShellArty")} && {!(_x isKindOf "G_40mm_Smoke")} && // All smokes inherit from "GrenadeHand" >> "SmokeShell"
{GVAR(enablePickUpAttached) || {!GVAR(enablePickUpAttached) && {isNull (attachedTo _x)}}}
) then {
@ -44,8 +44,7 @@
_addedPickUpHelpers pushBack _pickUpHelper;
_throwablesHelped pushBack _x;
};
nil
} count _nearThrowables;
} forEach _nearThrowables;
_args set [0, getPosASL ACE_player];
_args set [3, _nearThrowables];
@ -56,11 +55,10 @@
{
// Only handling with attachTo works nicely
_x attachTo [_x getVariable [QGVAR(throwable), objNull], [0, 0, 0]];
nil
} count _addedPickUpHelpers;
} forEach _addedPickUpHelpers;
} else {
TRACE_1("Cleaning Pick Up Helpers",count _addedPickUpHelpers);
{deleteVehicle _x} count _addedPickUpHelpers;
{deleteVehicle _x} forEach _addedPickUpHelpers;
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
}, 0, [(getPosASL ACE_player) vectorAdd [-100, 0, 0], [], [], []]] call CBA_fnc_addPerFrameHandler;

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: Dslyecxi, Jonpas
* Throw selected throwable.
@ -20,7 +20,7 @@ TRACE_1("params",_unit);
// Prime the throwable if it hasn't been cooking already
// Next to proper simulation this also has to happen before delay for orientation of the throwable to be set
if (!(_unit getVariable [QGVAR(primed), false])) then {
if !(_unit getVariable [QGVAR(primed), false]) then {
[_unit] call FUNC(prime);
};
@ -40,12 +40,12 @@ if (!(_unit getVariable [QGVAR(primed), false])) then {
_velocity = [_velocity, THROWSTYLE_DROP_VEL] select _dropMode;
private _p2 = (eyePos _unit) vectorAdd (AGLToASL (positionCameraToWorld _direction)) vectorDiff (AGLToASL (positionCameraToWorld [0, 0, 0]));
private _p1 = AGLtoASL (_activeThrowable modelToWorldVisual [0, 0, 0]);
private _p1 = _activeThrowable modelToWorldVisualWorld [0, 0, 0];
private _newVelocity = (_p1 vectorFromTo _p2) vectorMultiply _velocity;
// Adjust for throwing from inside vehicles, where we have a vehicle-based velocity that can't be compensated for by a human
if (vehicle _unit != _unit) then {
if (!isNull objectParent _unit) then {
_newVelocity = _newVelocity vectorAdd (velocity (vehicle _unit));
};

View File

@ -1,4 +1,4 @@
#include "script_component.hpp"
#include "..\script_component.hpp"
/*
* Author: CBA Team
* Throws Fired XEH.
@ -20,14 +20,25 @@
*
* Public: No
*/
params ["_unit", "", "_muzzle", "", "_ammo"];
TRACE_1("Fired",_this);
{
_this call _x;
} forEach ((_this select 0) getVariable "cba_xeh_fired");
} forEach (_unit getVariable "cba_xeh_fired");
// Call muzzle fired EH
{
_this call compile getText (_x >> "fired");
} forEach (configProperties [configFile >> "CfgWeapons" >> "Throw" >> (_this select 2) >> "EventHandlers", "isClass _x", true]);
} forEach (configProperties [configFile >> "CfgWeapons" >> "Throw" >> _muzzle >> "EventHandlers", "isClass _x", true]);
// Call ammo fired EH
{ _this call _x } forEach (GVAR(ammoEventHandlers) getOrDefaultCall [_ammo, {
private _cfg = configFile >> "CfgAmmo" >> _ammo >> "EventHandlers";
private _eventHandlers = [];
{
private _eh = getText (_x >> "fired");
if (_eh != "") then { _eventHandlers pushBack compile _eh };
} forEach ([_cfg] + configProperties [_cfg, "isClass _x", true]);
_eventHandlers
}, true]);

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