manual merge

This commit is contained in:
commy2 2016-02-19 11:50:17 +01:00
commit 08e09d5cbd
1839 changed files with 31991 additions and 28045 deletions

31
.github/CONTRIBUTING.md vendored Normal file
View File

@ -0,0 +1,31 @@
# Reporting an issue
## Before reporting
If you have found an issue with ACE3 please make sure that ACE3 really is the cause of the problem. To do this try to reproduce the issue with using only `@CBA_A3` and `@ace` on a newly created mission.
Indicate if the issue appears on stable or development version. In case it is the development version, please also include the commit SHA-1 hash.
<div class="panel callout">
<h5>Please note:</h5>
<p>It's not a valid to simply remove <code>@ace</code> from the mod list to confirm that ACE3 is the culprit.</p>
<p>If the error happens when using a <b>third-party mod</b> contact the author of the appropriate mod and report the issue there.</p>
</div>
## Reporting the issue
Head over to the [ACE3 GitHub issue tracker](https://github.com/acemod/ACE3/issues) and press the [New issue](https://github.com/acemod/ACE3/issues/new) button in the top right corner. Add a descriptive title and complete the issue template.
A video of the issue might be helpful in resolving it faster.
# Feature Requests
## Background
ACE2, AGM and CSE had a lot of features implemented or planned. All of them are or have been evaluated for inclusion in ACE3 itself, and we'd like to port the majority of them eventually. However, due to time constraints, we have managed to finish only a fraction of the job so far.
Please refrain from making requests for any planned or existing features from either ACE2, AGM or CSE. Most of them are already being or have been considered for porting or a rewrite.
## Requesting a feature
In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](https://github.com/acemod/ACE3/issues/414). Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier.
Following their approval, feature requests may be moved by moderators to a separate issue for further discussion.

25
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,25 @@
**Arma 3 Version:** `x.xx`
*(indicate if stable, rc or dev*)
**ACE3 Version:** `3.x.x`
*(indicate if stable or dev, if dev indicate the commit the version is based on)*
**Mods:**
* `@CBA_A3`
* `@ace`
* ...
**Placed Modules:**
* *Add the list of modules you have placed on the map. Use 'None' if the error occurs without using any modules.*
**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?**
* *A possible answer might be "Dedicated Server", "Local Multiplayer", "Editor", or "Singleplayer"*
**RPT log file:**
* *Add a link (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)*

10
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,10 @@
### When merged this pull request will:
1. *Describe what this pull request will do*
2. *Each change in a seperate line*
---
*Delete this line and everything below*
- [Make sure to respect the file structure](http://ace3mod.com/wiki/development/modularity-and-pbo-structure.html)
- [Make sure to respect the coding guidelines](http://ace3mod.com/wiki/development/coding-guidelines.html)

View File

@ -1,14 +1,29 @@
branches:
only:
- master
- master
- release
language: python
python:
- "3.4"
- '3.4'
before_script:
- pip install pygithub
- pip install pygithub3
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
pip install pygithub;
pip install pygithub3;
fi
script:
- python3 tools/deploy.py
- python3 tools/sqf_validator.py
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
python3 tools/deploy.py;
fi
env:
global:
- secure: "KcJQbknBOdC5lA4nFGKPXVRVIGLDXDRzC8XkHuXJCE9pIR/wbxbkvx8fHKcC6SC9eHgzneC3+o4m4+CjIbVvIwDgslRbJ8Y59i90ncONmdoRx1HUYHwuYWVZm9HJFjCsIbrEqhSyyKS+PB3WZVOLbErtNHsgS8f43PTh5Ujg7Vg="
- secure: KcJQbknBOdC5lA4nFGKPXVRVIGLDXDRzC8XkHuXJCE9pIR/wbxbkvx8fHKcC6SC9eHgzneC3+o4m4+CjIbVvIwDgslRbJ8Y59i90ncONmdoRx1HUYHwuYWVZm9HJFjCsIbrEqhSyyKS+PB3WZVOLbErtNHsgS8f43PTh5Ujg7Vg=
notifications:
slack:
rooms:
- secure: byZMNBl8PMlgjT9NA1WmhgCdGfX4b3g1kA0vEiwfm+IFNlx7BiM4J/5rp6zV/jV470xl/epAejx2tsa5SdTyFbO87NH63ILJSt5QnjUZjRuGKSutFs9WE671DtZkPRSJXHS4N6x802PRkyBz/84/lsc34FWvHvjwOuYAtOcJRFk=
- secure: V22TNaLWV+yUNWqR7c6HVvIxkRDz7Dyz9xqa43FY8iFgvNL4Q/X69h5DYHU/ILNFM00tx8OBjtPRbcjWQ+F6eY8Sje/A2axJAU+qNurAvoyiTahXUprdUUpPdkgXWuSRTZ9kALxOq5e11RC8XUietghoMcl8zPcqdrZCOOKgoEM=
on_success: change
email:
on_success: never
on_failure: change

View File

@ -1,4 +1,4 @@
# ACE3 CONTRIBUTOR LIST
# ACE3 CONTRIBUTOR LIST
# If you contributed, but are not listed here, contact me:
# koffeinflummi@gmail.com
#
@ -37,6 +37,7 @@ alef <alefor@gmail.com>
Aleksey EpMAK Yermakov <epmak777@gmail.com>
Alganthe <alganthe@live.fr>
Anthariel <Contact@storm-simulation.com>
Arkhir <wonsz666@gmail.com >
Asgar Serran <piechottaf@web.de>
Bamse <bamsis@gmail.com>
Bla1337
@ -44,6 +45,7 @@ BlackPixxel <blackpixxel96@gmail.com>
BlackQwar
Brakoviejo
Brisse <brisse@outlook.com>
Brostrom.A | Evul <andreas.brostrom.ce@gmail.com>
BullHorn <bullhorn7@gmail.com>
Clon1998 <ps.patti1998@gmail.com>
Codingboy
@ -51,7 +53,10 @@ Coren <coren4@gmail.com>
Crusty
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
Dimaslg <dimaslg@telecable.es>
dixon13 <dixonbegay@gmail.com>
Drill <drill87@gmail.com>
Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
Dslyecxi <dslyecxi@gmail.com>
eRazeri
evromalarkey <evromalarkey@gmail.com>
F3 Project <alanr@ferstaberinde.com>
@ -59,11 +64,13 @@ Falke75
Ferenczi
Ferenzi
Filip Basara <filip.basara93@googlemail.com>
fr89k <kaschitoku@web.de>
FreeZbe <freeseb@gmail.com>
geraldbolso1899
Ghost
Gianmarco Varriale (TeamNuke) <admin@forhost.org>
GieNkoV <gienkov.grzegorz@gmail.com>
GitHawk <githawk@gmx.net>
gpgpgpgp
Grzegorz
Hamburger SV
@ -99,12 +106,15 @@ Robert Boklahánics <bokirobi@gmail.com>
ruPaladin <happyworm24@rambler.ru>
simon84 <badguy360th@gmail.com>
Sniperwolf572 <tenga6@gmail.com>
System98
SzwedzikPL <szwedzikpl@gmail.com>
Tachi <zaveruha007@gmail.com>
Toaster <jonathan.pereira@gmail.com>
Tonic
Tourorist <tourorist@gmail.com>
Valentin Torikian <valentin.torikian@gmail.com>
voiper
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
Winter <simon@agius-muscat.net>
zGuba
Grey-Soldierman <gungamer101@hotmail.com>

View File

@ -22,13 +22,13 @@ source code of the individual modules.
When publishing a derivative of this product you may not use a name that
might create the impression that your version is an official release.
Some folders of this project may contain a seperate LICENSE file. Should
Some folders of this project may contain a separate LICENSE file. Should
that be the case, everything in that folder and all subfolders is subject
to that license instead.
============================================================================
Full Gnu General Public License Text
Full GNU General Public License Text
============================================================================

View File

@ -1,24 +1,35 @@
<p align="center">
<img src="https://github.com/acemod/ACE3/blob/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.jpg" width="480">
</p>
<p align="center">
<a href="https://github.com/acemod/ACE3/releases">
<img src="https://img.shields.io/badge/Version-3.2.1-blue.svg" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.4.2-blue.svg?style=flat-square" alt="ACE3 Version">
</a>
<a href="https://github.com/acemod/ACE3/releases/download/v3.2.1/ace3_3.2.1.zip">
<img src="http://img.shields.io/badge/Download-56.5_MB-green.svg" alt="ACE3 Download">
<a href="https://github.com/acemod/ACE3/releases/download/v3.4.2/ace3_3.4.2.zip">
<img src="https://img.shields.io/badge/Download-72.6_MB-green.svg?style=flat-square" alt="ACE3 Download">
</a>
<a href="https://github.com/acemod/ACE3/issues">
<img src="http://img.shields.io/github/issues-raw/acemod/ACE3.svg?label=Issues" alt="ACE3 Issues">
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
</a>
<a href="https://forums.bistudio.com/topic/181341-ace3-a-collaborative-merger-between-agm-cse-and-ace/?p=2859670">
<img src="https://img.shields.io/badge/BIF-Thread-lightgrey.svg" alt="BIF Thread">
<img src="https://img.shields.io/badge/BIF-Thread-lightgrey.svg?style=flat-square" alt="BIF Thread">
</a>
<a href="https://github.com/acemod/ACE3/blob/master/LICENSE">
<img src="http://img.shields.io/badge/License-GPLv2-red.svg" alt="ACE3 License">
<img src="https://img.shields.io/badge/License-GPLv2-red.svg?style=flat-square" alt="ACE3 License">
</a>
<a href="http://slackin.ace3mod.com/">
<img src="http://slackin.ace3mod.com/badge.svg?style=flat-square&label=Slack" alt="ACE3 Slack">
</a>
<a href="https://travis-ci.org/acemod/ACE3">
<img src="https://img.shields.io/travis/acemod/ACE3.svg?style=flat-square&label=Build" alt="ACE3 Build Status">
</a>
</p>
<p align="center"><sup><strong>Requires the latest version of <a href="https://github.com/CBATeam/CBA_A3/releases">CBA A3</a>. Visit us on <a href="https://www.facebook.com/ACE3Mod">Facebook</a> | <a href="https://www.youtube.com/c/ACE3Mod">YouTube</a> | <a href="https://twitter.com/ACE3Mod">Twitter</a> | <a href="http://www.reddit.com/r/arma/search?q=ACE&restrict_sr=on&sort=new&t=all">Reddit</a></strong></sup></p>
<p align="center">
<sup><strong>Requires the latest version of <a href="https://github.com/CBATeam/CBA_A3/releases">CBA A3</a>.<br/>
Visit us on <a href="https://twitter.com/ACE3Mod">Twitter</a> | <a href="https://www.facebook.com/ACE3Mod">Facebook</a> | <a href="https://www.youtube.com/c/ACE3Mod">YouTube</a> | <a href="http://www.reddit.com/r/arma/search?q=ACE&restrict_sr=on&sort=new&t=all">Reddit</a></strong></sup>
</p>
**ACE3** is a joint effort by the teams behind **ACE2**, **AGM** and **CSE** to improve the realism and authenticity of Arma 3.
@ -37,6 +48,7 @@ The mod is **built modularly**, so almost any included PBO can be easily removed
- Captivity system
- Explosives system, including different trigger types
- Map screen improvements marker placement and map tools
- Logistics
- Advanced missile guidance and laser designation
#### Additional features
@ -52,7 +64,6 @@ The mod is **built modularly**, so almost any included PBO can be easily removed
- Magazine repacking
- Realistic weapon overheating mechanic
- Combat deafness (temporary loss of hearing) simulation
- Improved ragdoll physics
- Improved interactions for AARs and ammo bearers
- Adjustable sniper scopes
- No idle animation with lowered weapon
@ -63,7 +74,8 @@ The mod is **built modularly**, so almost any included PBO can be easily removed
### Guides & how-tos
If you installed ACE3 but have trouble understanding how it all works, or where to start, read this first:
- [Getting started](http://ace3mod.com/wiki/user/getting-started.html)
- [Installation guide](http://ace3mod.com/wiki/user/installation-guide.html)
- [Information center](http://ace3mod.com/wiki/user/information-center.html)
#### Contributing
You can help out with the ongoing development by looking for potential bugs in our code base, or by contributing new features. 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.

Binary file not shown.

Binary file not shown.

View File

@ -9,11 +9,3 @@ class Extended_PostInit_EventHandlers {
init = QUOTE( call COMPILE_FILE(XEH_postInit) );
};
};
class Extended_FiredBIS_EventHandlers {
class CAManBase {
class ADDON {
firedBIS = QUOTE(_this call FUNC(handleFired));
};
};
};

View File

@ -22,3 +22,17 @@ if (!GVAR(extensionAvailable)) exitWith {
};
*/
[] call FUNC(initializeTerrainExtension);
if (!hasInterface) exitWith {};
["SettingsInitialized", {
//If not enabled, dont't add PFEH
if (!GVAR(enabled)) exitWith {};
// Register fire event handler
["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
[] call FUNC(updateTrajectoryPFH);
}] call EFUNC(common,addEventHandler);

View File

@ -18,7 +18,8 @@ private ["_muzzleVelocityShiftTableUpperLimit", "_temperatureIndexFunction",
"_temperatureIndexA", "_temperatureIndexB", "_interpolationRatio"];
params["_muzzleVelocityShiftTable", "_temperature"];
// Check if muzzleVelocityShiftTable is Larger Than 11 Entrys
// Check if muzzleVelocityShiftTable is Less Than 11 Entrys
if ((count _muzzleVelocityShiftTable) < 11) exitWith {0};
_muzzleVelocityShiftTableUpperLimit = _muzzleVelocityShiftTable select 10;
if (isNil "_muzzleVelocityShiftTableUpperLimit") exitWith { 0 };

View File

@ -28,7 +28,7 @@ if (currentWeapon ACE_player != primaryWeapon ACE_player) exitWith { false };
2 cutText ["", "PLAIN"];
EGVAR(weather,WindInfo) = false;
0 cutText ["", "PLAIN"];
(["RscWindIntuitive"] call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
GVAR(Protractor) = true;
[{
@ -36,7 +36,7 @@ GVAR(Protractor) = true;
if !(GVAR(Protractor) && !(weaponLowered ACE_player) && currentWeapon ACE_player == primaryWeapon ACE_player) exitWith {
GVAR(Protractor) = false;
1 cutText ["", "PLAIN"];
[_idPFH] call cba_fnc_removePerFrameHandler;
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
1 cutRsc ["RscProtractor", "PLAIN", 1, false];

View File

@ -12,11 +12,7 @@
*/
#include "script_component.hpp"
private "_deleted";
_deleted = 0;
private _aceTimeSecond = floor ACE_time;
{
private ["_bulletVelocity", "_bulletPosition", "_bulletSpeed"];
@ -26,20 +22,19 @@ _deleted = 0;
_bulletSpeed = vectorMagnitude _bulletVelocity;
if (!alive _bullet || _bulletSpeed < 100) exitWith {
GVAR(allBullets) deleteAt (_forEachIndex - _deleted);
_deleted = _deleted + 1;
if (!alive _bullet || _bulletSpeed < 100) then {
GVAR(allBullets) deleteAt (GVAR(allBullets) find _x);
} else {
_bulletPosition = getPosASL _bullet;
if (_bulletTraceVisible && _bulletSpeed > 500) then {
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""];
};
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, ACE_time - _aceTimeSecond]);
};
_bulletPosition = getPosASL _bullet;
if (_bulletTraceVisible && _bulletSpeed > 500) then {
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""];
};
_aceTimeSecond = floor ACE_time;
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, ACE_time - _aceTimeSecond]);
} forEach GVAR(allBullets);
nil
} count +GVAR(allBullets);
if (GVAR(allBullets) isEqualTo []) then {
[_this select 1] call CBA_fnc_removePerFrameHandler;

View File

@ -1,16 +1,10 @@
/*
* Author: Glowbal, Ruthberg
*
* Handles advanced ballistics for (BulletBase) projectiles
* Handles advanced ballistics for (BulletBase) projectiles. Called from the unified fired EH only for players.
*
* Arguments:
* 0: unit - Object the event handler is assigned to <OBJECT>
* 1: weapon - Fired weapon <STRING>
* 2: muzzle - Muzzle that was used <STRING>
* 3: mode - Current mode of the fired weapon <STRING>
* 4: ammo - Ammo used <STRING>
* 5: magazine - magazine name which was used <STRING>
* 6: projectile - Object of the projectile that was shot <OBJECT>
* None. Parameters inherited from EFUNC(common,firedEH)
*
* Return Value:
* None
@ -19,20 +13,16 @@
*/
#include "script_component.hpp"
// Early Quiting
if (!hasInterface) exitWith {};
if (!GVAR(enabled)) exitWith {};
//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);
// Parameterization
private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_barrelTwist", "_stabilityFactor"];
params ["_unit", "_weapon", "", "_mode", "_ammo", "_magazine", "_bullet"];
private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletLength", "_barrelTwist", "_stabilityFactor", "_aceTimeSecond", "_barrelVelocityShift", "_ammoTemperatureVelocityShift"];
_abort = false;
if (!(_ammo isKindOf "BulletBase")) exitWith {};
if (!alive _bullet) exitWith {};
if (!([_unit] call EFUNC(common,isPlayer))) exitWith {};
if (!alive _projectile) exitWith {};
if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {};
if (underwater _unit) exitWith {};
if (!GVAR(simulateForEveryone) && !(local _unit)) then {
@ -53,7 +43,9 @@ if (!GVAR(simulateForEveryone) && !(local _unit)) then {
if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; };
if (_abort || !(GVAR(extensionAvailable))) exitWith {
[_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")] call EFUNC(winddeflection,updateTrajectoryPFH);
if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then {
EGVAR(windDeflection,trackedBullets) pushBack [_projectile, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")];
};
};
// Get Weapon and Ammo Configurations
@ -70,27 +62,27 @@ _AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMas
_WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"];
_bulletVelocity = velocity _bullet;
_bulletVelocity = velocity _projectile;
_muzzleVelocity = vectorMagnitude _bulletVelocity;
_barrelVelocityShift = 0;
if (GVAR(barrelLengthInfluenceEnabled)) then {
_barrelVelocityShift = uiNamespace getVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],nil];
if (isNil "_barrelVelocityShift") then {
_barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift);
uiNamespace setVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],_muzzleVelocityShift];
};
_barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift);
};
_ammoTemperatureVelocityShift = 0;
if (GVAR(ammoTemperatureEnabled)) then {
_temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight);
_temperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift));
_ammoTemperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift));
};
if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then {
_muzzleVelocityShift = _barrelVelocityShift + _ammoTemperatureVelocityShift;
TRACE_4("shift",_muzzleVelocity,_muzzleVelocityShift, _barrelVelocityShift, _ammoTemperatureVelocityShift);
if (_muzzleVelocityShift != 0) then {
_muzzleVelocity = _muzzleVelocity + (_barrelVelocityShift + _ammoTemperatureVelocityShift);
_muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift;
_bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift));
_bullet setVelocity _bulletVelocity;
_projectile setVelocity _bulletVelocity;
};
};
@ -112,16 +104,16 @@ if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) th
if (isNil "_temperature") then {
_temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight);
};
_barometricPressure = ((getPosASL _bullet) select 2) call EFUNC(weather,calculateBarometricPressure);
_barometricPressure = ((getPosASL _projectile) select 2) call EFUNC(weather,calculateBarometricPressure);
_stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor);
};
GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000;
_aceTimeSecond = floor ACE_time;
"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), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _bullet, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, _aceTimeSecond, ACE_time - _aceTimeSecond];
"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), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _projectile, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, _aceTimeSecond, ACE_time - _aceTimeSecond];
GVAR(allBullets) pushBack [_bullet, _caliber, _bulletTraceVisible, GVAR(currentbulletID)];
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

@ -40,7 +40,7 @@ GVAR(currentGrid) = 0;
#ifdef DEBUG_MODE_FULL
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)];
#endif
[_idPFH] call cba_fnc_removePerFrameHandler;
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
for "_i" from 1 to 50 do {

View File

@ -20,9 +20,11 @@ _weaponConfig = (configFile >> "CfgWeapons" >> _this);
_barrelTwist = getNumber(_weaponConfig >> "ACE_barrelTwist");
_twistDirection = 1;
_twistDirection = getNumber(_weaponConfig >> "ACE_twistDirection");
if !(_twistDirection in [-1, 0, 1]) then {
_twistDirection = 1;
if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
if !(_twistDirection in [-1, 0, 1]) then {
_twistDirection = 1;
};
};
_barrelLength = getNumber(_weaponConfig >> "ACE_barrelLength");

View File

@ -1,6 +1,11 @@
#define COMPONENT advanced_ballistics
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_ADVANCEDBALLISTICS
#define DEBUG_MODE_FULL
#endif

View File

@ -10,7 +10,7 @@
<Spanish>Mostrar información del viento</Spanish>
<German>Windinformationen anzeigen</German>
<Hungarian>Széladatok mutatása</Hungarian>
<Czech>Zobrazit informace o větru</Czech>
<Czech>Zobrazit údaje o větru</Czech>
<Portuguese>Mostrar Informação do Vento</Portuguese>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_ProtractorKey">
@ -32,7 +32,9 @@
<German>Erweiterte Ballistik</German>
<Czech>Pokročilá balistika</Czech>
<Portuguese>Balística avançada</Portuguese>
<French>Balistique avancée</French>
<Hungarian>Fejlett ballisztika</Hungarian>
<Russian>Продвинутая баллистика</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_enabled_DisplayName">
<English>Advanced Ballistics</English>
@ -41,7 +43,9 @@
<German>Erweiterte Ballistik</German>
<Czech>Pokročilá balistika</Czech>
<Portuguese>Balística avançada</Portuguese>
<French>Balistique avancée</French>
<Hungarian>Fejlett ballisztika</Hungarian>
<Russian>Продвинутая баллистика</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_enabled_Description">
<English>Enables advanced ballistics</English>
@ -50,7 +54,9 @@
<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>
<Hungarian>Engedélyezi a fejlett ballisztikát</Hungarian>
<Russian>Включает продвинутую баллистику</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_DisplayName">
<English>Enabled For Snipers</English>
@ -59,16 +65,20 @@
<German>Für Scharfschützen aktiviert</German>
<Czech>Povoleno pro odstřelovače</Czech>
<Portuguese>Ativar para caçadores</Portuguese>
<French>Activer pour les snipers</French>
<Hungarian>Mesterlövészeknek engedélyezve</Hungarian>
<Russian>Включена для снайперов</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_Description">
<English>Enables advanced ballistics for non local snipers (when using high power optics)</English>
<Spanish>Activa la balística avanzada para francotiradores no locales (cuando se usa una mira telescópica)</Spanish>
<Polish>Aktywuje zaawansowaną balistykę dla nielokalnych snajperów (kiedy używają optyki)</Polish>
<German>Aktiviert die erweiterte Ballistik für nicht lokale Scharfschützen (bei Benutzung von Optiken mit starker Vergrößerung)</German>
<Czech>Aktivuje pokročilou balistiku pro nelokální odstřelovače (když používá výkonnou optiku)</Czech>
<Czech>Aktivuje pokročilou balistiku pro nelokální odstřelovače (při použití optiky)</Czech>
<Portuguese>Ativa balística avançada para caçadores não locais (quando usando miras telescópicas)</Portuguese>
<French>Active la balistique avancée pour les snipers non locaux (en utilisant les optiques avancées)</French>
<Hungarian>Engedélyezi a fejlett ballisztikát nem-helyi mesterlövészeknek (nagy-teljesítményű optika használatakor)</Hungarian>
<Russian>Включает продвинутую баллистику для нелокальных снайперов (при использовании мощной оптики)</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_DisplayName">
<English>Enabled For Group Members</English>
@ -77,7 +87,9 @@
<German>Für Gruppenmitglieder aktiviert</German>
<Czech>Povoleno pro členy skupiny</Czech>
<Portuguese>Ativada para membros do grupo</Portuguese>
<French>Activer pour les membres groupés</French>
<Hungarian>Csoporttagoknak engedélyezve</Hungarian>
<Russian>Включена для группы</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_Description">
<English>Enables advanced ballistics for non local group members</English>
@ -86,7 +98,9 @@
<German>Aktiviert die erweiterte Ballistik für nicht lokale Gruppenmitglieder</German>
<Czech>Aktivuje pokročilou balistiku pro nelokální členy skupiny</Czech>
<Portuguese>Ativa balística avançada para membros de grupo não locais</Portuguese>
<French>Active la balistique avancée pour les membres groupés non locaux</French>
<Hungarian>Engedélyezi a fejlett ballisztikát nem-helyi csoporttagoknak</Hungarian>
<Russian>Включает продвинутую баллистику для нелокальных членов группы</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_DisplayName">
<English>Enabled For Everyone</English>
@ -95,16 +109,20 @@
<German>Für jeden aktiviert</German>
<Czech>Povoleno pro všechny</Czech>
<Portuguese>Ativada para todos</Portuguese>
<French>Activer pour tout le monde</French>
<Hungarian>Mindenkinek engedélyezve</Hungarian>
<Russian>Включена для всех</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_Description">
<English>Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)</English>
<Spanish>Activada la balística avanzada para todos los jugadores no locales (activarlo puede degradar el rendimiento durante grandes tiroteos en multijugador).</Spanish>
<Polish>Aktywuje zaawansowaną balistykę dla wszystkich nielokalnych graczy (aktywacja tej opcji może spodowować spory spadek wydajności podczas ciężkiej wymiany ognia)</Polish>
<German>Aktiviert die erweiterte Ballistik für alle nicht lokalen Spieler (das Aktivieren dieser Funktion kann zur Beeinträchtigung des Spielerlebnisses im Multiplayer führen)</German>
<Czech>Aktivovat pokročilou balistiku pro všechny nelokální hráče (aktivace této možnosti způsobuje pokles snímu za sekundu během těžké přestřelky v multiplayeru)</Czech>
<Czech>Aktivuje pokročilou balistiku pro všechny nelokální hráče (aktivace této možnosti způsobuje pokles FPS během velké přestřelky v multiplayeru)</Czech>
<Portuguese>Ativa balística avançada para todos os jogadores não locais (ativando isso pode degradar a performance durante troca de tiros intensas no multiplayer)</Portuguese>
<French>Active la balistique avancé pour tous les joueurs non locaux (activer cette option peut avoir un impact sur les performance en multi durant les grands échanges de tirs)</French>
<Hungarian>Engedélyezi a fejlett ballisztikát az összes nem-helyi játékosnak (ez a funkció leronthatja a teljesítményt intenzív többjátékos tűzharcok alatt)</Hungarian>
<Russian>Включает продвинутую баллистику для всех нелокальных игроков (включение этой опции может снизить производительность при массовых перестрелках в мультиплеере)</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_DisplayName">
<English>Always Enabled For Group Members</English>
@ -113,7 +131,9 @@
<German>Für Gruppenmitglieder immer aktiviert</German>
<Czech>Vždy povoleno pro členy skupiny</Czech>
<Portuguese>Sempre ativada para membros do grupo</Portuguese>
<French>Toujours activer pour les membres groupés</French>
<Hungarian>Mindig engedélyezve csoporttagoknak</Hungarian>
<Russian>Всегда включена для членов группы</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_Description">
<English>Always enables advanced ballistics when a group member fires</English>
@ -122,7 +142,9 @@
<German>Aktiviert die erweiterte Ballistik immer, wenn ein Gruppenmitglied schießt</German>
<Czech>Aktivuje pokročilou balistiku pro členy skupiny</Czech>
<Portuguese>Sempre ative balística avançada quando um membro do grupo disparar</Portuguese>
<French>Active tout le temps la balistique avancée quand un membre du groupe ouvre le feu</French>
<Hungarian>Mindig engedélyezi a fejlett ballisztikát, ha egy csoporttag tüzel</Hungarian>
<Russian>Всегда включает продвинутую баллистику когда стреляет член группы</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_DisplayName">
<English>Disabled In FullAuto Mode</English>
@ -131,7 +153,9 @@
<German>Beim vollautomatischen Feuern deaktiviert</German>
<Czech>Zakázáno v automatickém režimu střelby</Czech>
<Portuguese>Desabilitar no modo automático</Portuguese>
<French>Désactiver en mode rafale libre</French>
<Hungarian>Automata módban letiltva</Hungarian>
<Russian>Выкл. для автомат. режима</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_Description">
<English>Disables the advanced ballistics during full auto fire</English>
@ -140,7 +164,9 @@
<German>Deaktiviert die erweiterte Ballistik beim vollautomatischen Feuern</German>
<Czech>Zákáže pokročilou balistiku během střelby v režimu automat</Czech>
<Portuguese>Desabilitar a balística avançada durante fogo automático</Portuguese>
<French>Désactive la balistique avancée pour les tirs en rafale libre</French>
<Hungarian>Letiltja a fejlett ballisztikát automata tüzelés folyamán</Hungarian>
<Russian>Выключает продвинутую баллистику при стрельбе в полностью автоматическом режиме</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
<English>Enable Ammo Temperature Simulation</English>
@ -149,7 +175,9 @@
<German>Simulation der Munitionstemperatur aktivieren</German>
<Czech>Povolit simulaci teploty munice</Czech>
<Portuguese>Ativar simulação de temperatura de munição</Portuguese>
<French>Activer la simulation de la température</French>
<Hungarian>Lőszer-hő szimuláció engedélyezése</Hungarian>
<Russian>Симуляция температуры для боеприпасов</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_Description">
<English>Muzzle velocity varies with ammo temperature</English>
@ -158,7 +186,9 @@
<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>
<Hungarian>A kezdősebesség a lőszer hőmérsékletétől függően változó</Hungarian>
<Russian>Начальная скорость пули зависит от температуры</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_DisplayName">
<English>Enable Barrel Length Simulation</English>
@ -167,7 +197,9 @@
<German>Simulation der Lauflänge aktivieren</German>
<Czech>Povolit simulaci délky hlavně</Czech>
<Portuguese>Ativar a simulação de comprimento do cano</Portuguese>
<French>Activer la simulation de la longueur de canon</French>
<Hungarian>Csőhossz-szimuláció engedélyezése</Hungarian>
<Russian>Симуляция длины ствола</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_barrelLengthInfluenceEnabled_Description">
<English>Muzzle velocity varies with barrel length</English>
@ -176,7 +208,9 @@
<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>
<Hungarian>A kezdősebesség a cső hosszától függően változó</Hungarian>
<Russian>Начальная скорость пули зависит от длины ствола</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_bulletTraceEnabled_DisplayName">
<English>Enable Bullet Trace Effect</English>
@ -185,7 +219,9 @@
<German>Geschossspureffekt aktivieren</German>
<Czech>Povolit efekt trasírek</Czech>
<Portuguese>Ativa efeito traçante de projétil</Portuguese>
<French>Activer l'effet traçante</French>
<Hungarian>Nyomkövető-effekt engedélyezése</Hungarian>
<Russian>Следы пуль</Russian>
</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>
@ -194,7 +230,9 @@
<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>
<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>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_DisplayName">
<English>Simulation Interval</English>
@ -203,7 +241,9 @@
<German>Simulationsintervall</German>
<Czech>Interval simulace</Czech>
<Portuguese>Intervalo da simulação</Portuguese>
<French>Intervalle de simulation</French>
<Hungarian>Szimuláció intervalluma</Hungarian>
<Russian>Интервал симуляции</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_Description">
<English>Defines the interval between every calculation step</English>
@ -212,7 +252,9 @@
<German>Legt das Intervall zwischen den Berechnungsschritten fest</German>
<Czech>Určuje interval mezi každým výpočtem</Czech>
<Portuguese>Define o intervalo entre cada cálculo</Portuguese>
<French>Défini un intervalle de calcul entre deux simulations</French>
<Hungarian>Meghatározza a számítási lépések közötti időintervallumot</Hungarian>
<Russian>Определяет временной интервал между вычислениями</Russian>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_simulationRadius_DisplayName">
<English>Simulation Radius</English>
@ -221,7 +263,9 @@
<German>Simulationsradius</German>
<Czech>Rozsah simulace</Czech>
<Portuguese>Raio de simulação</Portuguese>
<French>Rayon de simulation</French>
<Hungarian>Szimuláció hatóköre</Hungarian>
<Russian>Радиус симуляции</Russian>
</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>
@ -230,14 +274,20 @@
<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éfini le rayon autour du joueur (en mètres) d'application de la balistique avancée</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>
</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 - ie les projectiles sont influencé par des varibles 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>
<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>
</Key>
</Package>
</Project>
</Project>

View File

@ -1,6 +1,11 @@
#define COMPONENT ai
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_AI
#define DEBUG_MODE_FULL
#endif

View File

@ -1,6 +1,11 @@
#define COMPONENT aircraft
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_AIRCRAFT
#define DEBUG_MODE_FULL
#endif

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Aircraft">
<Key ID="STR_ACE_Aircraft_CMFlareLauncher_Burst_Name">

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,75 @@
ambient[]={1,1,1,1};
diffuse[]={2,2,2,0};
forcedDiffuse[]={0,0,0,0};
emmisive[]={0,0,0,1};
specular[]={0.054000214,0.054000214,0.058000047,0};
specularPower=50.700001;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
texture="z\ace\addons\apl\data\entrchtool_nohq.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage2
{
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
uvSource="tex";
class uvTransform
{
aside[]={4,0,0};
up[]={0,6,0};
dir[]={0,0,2};
pos[]={0,0,0};
};
Filter="Anizotropic";
};
class Stage3
{
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
Filter="Anizotropic";
};
class Stage4
{
texture="z\ace\addons\apl\data\entrchtool_as.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage5
{
texture="z\ace\addons\apl\data\entrchtool_smdi.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage6
{
texture="a3\data_f\env_co.paa";
uvSource="none";
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,11 @@
#define COMPONENT APL
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_APL
#define DEBUG_MODE_FULL
#endif

View File

@ -54,7 +54,7 @@ GVAR(active) = true;
GVAR(DialogPFH) = [{
if (!GVAR(active)) exitWith {
[_this select 1] call cba_fnc_removePerFrameHandler;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
__ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
}, 60, []] call CBA_fnc_addPerFrameHandler;

View File

@ -2,4 +2,4 @@
uiNamespace setVariable ['ATragMX_Display', nil];
GVAR(active) = false;
[GVAR(DialogPFH)] call cba_fnc_removePerFrameHandler;
[GVAR(DialogPFH)] call CBA_fnc_removePerFrameHandler;

View File

@ -37,7 +37,7 @@ if !(ctrlVisible 9000) then {
false call FUNC(show_target_speed_assist_timer);
true call FUNC(show_target_speed_assist);
[_this select 1] call cba_fnc_removePerFrameHandler;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
ctrlSetText [9001, Str(Round((ACE_time - _startTime) * 10) / 10)];

View File

@ -1,6 +1,11 @@
#define COMPONENT atragmx
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_ATRAGMX
#define DEBUG_MODE_FULL
#endif

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="ATragMX">
<Key ID="STR_ACE_ATragMX_Name">
@ -50,4 +50,4 @@
<Portuguese>Abrir ATragMX</Portuguese>
</Key>
</Package>
</Project>
</Project>

View File

@ -61,7 +61,6 @@ class CfgVehicles {
showDisabled = 0;
priority = 5;
icon = PATHTOF(UI\attach_ca.paa);
// hotkey = "T";
};
class GVAR(Detach) {
displayName = CSTRING(Detach);
@ -71,7 +70,6 @@ class CfgVehicles {
showDisabled = 0;
priority = 5;
icon = PATHTOF(UI\detach_ca.paa);
hotkey = "T";
};
};
};

View File

@ -49,7 +49,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
} else {
GVAR(placeAction) = PLACE_WAITING;
[_unit, QGVAR(vehAttach), true] call EFUNC(common,setForceWalkStatus);
[_unit, "forceWalk", "ACE_Attach", true] call EFUNC(common,statusEffect_set);
[{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call EFUNC(common,execNextFrame);
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
@ -88,7 +88,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
{!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then {
[_idPFH] call CBA_fnc_removePerFrameHandler;
[_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
[_unit, "forceWalk", "ACE_Attach", false] call EFUNC(common,statusEffect_set);
[] call EFUNC(interaction,hideMouseHint);
[_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);
_unit removeAction _actionID;

View File

@ -19,6 +19,8 @@
params ["_attachToVehicle", "_unit"];
TRACE_2("params",_attachToVehicle,_unit);
if ((vehicle _unit) != _unit) exitWith {false};
_attachedList = _attachToVehicle getVariable [QGVAR(attached), []];
if ((count _attachedList) == 0) exitWith {false};

View File

@ -17,11 +17,11 @@
*/
#include "script_component.hpp"
if (!isServer) exitWith {};
params ["", "", "_unit"];
TRACE_1("params",_unit);
if (!local _unit) exitWith {};
private ["_attachedList"];
_attachedList = _unit getVariable [QGVAR(attached), []];
@ -29,9 +29,14 @@ if ((count _attachedList) == 0) exitWith {};
(_attachedList select 0) params ["_xObject"];
if (!isNull _xObject) then {
TRACE_1("detaching and moving attached light",_xObject);
detach _xObject;
_xObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]);
[{deleteVehicle (_this select 0)}, [_xObject], 2] call EFUNC(common,waitAndExecute);
[{
params ["_detachedLight"];
TRACE_1("delayed delete",_detachedLight);
deleteVehicle _detachedLight;
}, [_xObject], 2] call EFUNC(common,waitAndExecute);
(_attachedList select 0) set [0, objNull];
};

View File

@ -17,11 +17,11 @@
*/
#include "script_component.hpp"
if (!isServer) exitWith {};
params ["", "", "_unit"];
TRACE_1("params",_unit);
if (!local _unit) exitWith {};
private ["_attachedList"];
_attachedList = _unit getVariable [QGVAR(attached), []];

View File

@ -10,7 +10,7 @@
* Arguments:
* 0: Unit (player) <OBJECT>
* 1: attachToVehicle <OBJECT>
* 2: Item Classname (cfgWeapon/cfgMagazine) <STRING>
* 2: Item Classname (CfgWeapon/CfgMagazine) <STRING>
* 3: Light Vehicle Classname <STRING>
* 4: On Attach Text <STRING>
* 5: Starting Pos of dummy item <ARRAY>

View File

@ -1,6 +1,11 @@
#define COMPONENT attach
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_ATTACH
#define DEBUG_MODE_FULL
#endif

View File

@ -7,7 +7,7 @@
<Spanish>Acoplar objeto &gt;&gt;</Spanish>
<Polish>Przyczep &gt;&gt;</Polish>
<French>Attacher l'objet &gt;&gt;</French>
<Czech>Připnout předmět &gt;&gt;</Czech>
<Czech>Připnout &gt;&gt;</Czech>
<Portuguese>Fixar item &gt;&gt;</Portuguese>
<Italian>Attacca l'oggetto &gt;&gt;</Italian>
<Hungarian>Tárgy hozzácsatolása &gt;&gt;</Hungarian>
@ -115,7 +115,7 @@
<Spanish>Sin espacio en inventario</Spanish>
<Polish>Brak miejsca w ekwipunku</Polish>
<French>Pas de place dans l'inventaire</French>
<Czech>Není místo v inventáři</Czech>
<Czech>Nedostatek místa v inventáři</Czech>
<Portuguese>Sem espaço no inventário</Portuguese>
<Italian>Non hai più spazio</Italian>
<Hungarian>Nincs több hely</Hungarian>
@ -175,7 +175,7 @@
<German>Befestigen fehlgeschlagen</German>
<Russian>Не удалось присоединить</Russian>
<Spanish>Error al acoplar</Spanish>
<Czech>Připnutí selhalo</Czech>
<Czech>Připnout přesmět se nezdařilo</Czech>
<Portuguese>Erro ao fixar</Portuguese>
<Polish>Przyczepianie nie powiodło się</Polish>
<Hungarian>Hozzácsatolás sikertelen</Hungarian>
@ -187,7 +187,7 @@
<Spanish>%1&lt;br/&gt;acoplada</Spanish>
<Polish>Przyczepiono&lt;br/&gt;%1</Polish>
<French>%1&lt;br/&gt;attachée</French>
<Czech>%1&lt;br/&gt;Připnutý</Czech>
<Czech>%1&lt;br/&gt;Připnuto</Czech>
<Portuguese>%1&lt;br/&gt;Fixada</Portuguese>
<Italian>%1&lt;br/&gt;attaccata</Italian>
<Hungarian>%1&lt;br/&gt;hozzácsatolva</Hungarian>
@ -199,7 +199,7 @@
<Spanish>%1&lt;br/&gt;quitada</Spanish>
<Polish>Odczepiono&lt;br/&gt;%1</Polish>
<French>%1&lt;br/&gt;détachée</French>
<Czech>%1&lt;br/&gt;Odepnutý</Czech>
<Czech>%1&lt;br/&gt;Odepnuto</Czech>
<Portuguese>%1&lt;br/&gt;Separada</Portuguese>
<Italian>%1&lt;br/&gt;staccata</Italian>
<Hungarian>%1&lt;br/&gt;lecsatolva</Hungarian>

View File

@ -1,3 +1,3 @@
#include "script_component.hpp"
["backpackOpened", DFUNC(backpackOpened)] call EFUNC(common,addEventHandler);
["backpackOpened", {_this call FUNC(backpackOpened)}] call EFUNC(common,addEventHandler);

View File

@ -1,42 +1,36 @@
/*
* Author: commy2
* Someone opened your backpack. Play sound and camshake. Execute locally.
*
* Someone opened your backpack. Execute locally.
*
* Argument:
* Arguments:
* 0: Who accessed your inventory? (Object)
* 1: Unit that wields the backpack (Object)
* 2: The backpack object (Object)
*
* Return value:
* None.
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
private ["_sounds", "_position"];
params ["_target", "_backpack"];
// do cam shake if the target is the player
if ([_target] call EFUNC(common,isPlayer)) then {
if (_target call EFUNC(common,isPlayer)) then {
addCamShake [4, 0.5, 5];
};
// play a rustling sound
_sounds = [
/*"a3\sounds_f\characters\ingame\AinvPknlMstpSlayWpstDnon_medic.wss",
"a3\sounds_f\characters\ingame\AinvPknlMstpSlayWrflDnon_medic.wss",
"a3\sounds_f\characters\ingame\AinvPpneMstpSlayWpstDnon_medic.wss",
"a3\sounds_f\characters\ingame\AinvPpneMstpSlayWrflDnon_medic.wss"*/
// play a zipper sound effect
private _sounds = [
QUOTE(PATHTO_R(sounds\zip_in.wav)),
QUOTE(PATHTO_R(sounds\zip_out.wav))
];
_position = _target modelToWorldVisual (_target selectionPosition "Spine3");
_position = _position call EFUNC(common,positionToASL);
private _position = AGLToASL (_target modelToWorldVisual (_target selectionPosition "Spine3"));
playSound3D [
_sounds select floor random count _sounds,
selectRandom _sounds,
objNull,
false,
_position,

View File

@ -1,23 +1,23 @@
/*
* Author: commy2
* Check if the given backpack is an actual backpack that can store items. Parachute, static weapon packs, etc. will return false.
*
* Check if the given backpack is an actual backpack that can store items. Parachute backpacks will return false for example.
* Arguments:
* 0: Backpack <OBJECT, STRING>
*
* Argument:
* 0: A backpack (Object or String)
* Return Value:
* Boolean <BOOL>
*
* Return value:
* Boolean (Bool)
* Public: Yes
*/
#include "script_component.hpp"
private ["_config"];
params ["_backpack"];
params [["_backpack", objNull, [objNull]]];
if (typeName _backpack == "OBJECT") then {
if (_backpack isEqualType objNull) then {
_backpack = typeOf _backpack;
};
_config = configFile >> "CfgVehicles" >> _backpack;
private _config = configFile >> "CfgVehicles" >> _backpack;
getText (_config >> "vehicleClass") == "backpacks" && {getNumber (_config >> "maximumLoad") > 0}
getText (_config >> "vehicleClass") == "backpacks" && {getNumber (_config >> "maximumLoad") > 0} // return

View File

@ -1,24 +1,25 @@
/*
* Author: commy2
* Handle the open inventory event. Camshake and sound on target client.
*
* Handle the open inventory event. Display message on target client.
* Arguments:
* 0: Unit <OBJECT>
* 1: Backpack <OBJECT>
*
* Argument:
* Input from "InventoryOpened" eventhandler
*
* Return value:
* Return Value:
* false. Always open the inventory dialog. (Bool)
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit","_backpack"];
params ["_unit", "_backpack"];
// exit if the target is not a real backpack, i.e. parachute, static weapon bag etc.
if !([_backpack] call FUNC(isBackpack)) exitWith {false};
if !(_backpack call FUNC(isBackpack)) exitWith {false};
// get the unit that wears the backpack object
private "_target";
_target = objectParent _backpack;
private _target = objectParent _backpack;
if (isNull _target) exitWith {false};

View File

@ -1,6 +1,11 @@
#define COMPONENT backpacks
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_BACKPACKS
#define DEBUG_MODE_FULL
#endif

View File

@ -6,23 +6,11 @@ class CfgAmmo {
timeToLive=6;
};
class B_20mm : BulletBase {
timeToLive=30;
};
class B_25mm : BulletBase {
timeToLive=30;
};
class B_35mm_AA : BulletBase {
timeToLive=30;
};
class B_30mm_AP : BulletBase {
timeToLive=30;
};
class B_556x45_Ball : BulletBase {
airFriction=-0.00126466;
hit=8;
typicalSpeed=750;
tracerScale = 1;
tracerStartTime=0.073; // M856 tracer burns out to 800m
tracerEndTime=1.57123; // Time in seconds calculated with ballistics calculator
ACE_caliber=5.69;
@ -128,9 +116,13 @@ class CfgAmmo {
ACE_muzzleVelocities[]={785, 883, 925};
ACE_barrelLengths[]={254.0, 414.02, 508.0};
};
class B_56x15_dual: BulletBase {
tracerScale = 0.5;
};
class B_65x39_Caseless : BulletBase {
airFriction=-0.00075308;
typicalSpeed=800;
tracerScale = 1.1; //1.0;
ACE_caliber=6.706;
ACE_bulletLength=32.893;
ACE_bulletMass=7.9704;
@ -180,10 +172,15 @@ class CfgAmmo {
ACE_muzzleVelocities[]={750, 820, 840, 852, 860};
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
};
class SubmunitionBullet;
class B_65x39_Minigun_Caseless: SubmunitionBullet {
tracerScale = 1.1; //1.0;
};
class B_762x51_Ball : BulletBase {
airFriction=-0.00100957;
typicalSpeed=833;
hit=9;
tracerScale = 1.2; //0.6;
tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m
tracerEndTime=2.15957; // Time in seconds calculated with ballistics calculator
ACE_caliber=7.823;
@ -479,6 +476,7 @@ class CfgAmmo {
class B_9x21_Ball : BulletBase {
airFriction=-0.00226847;
typicalSpeed=390;
tracerScale = 0.5;
hit=6;
ACE_caliber=9.042;
ACE_bulletLength=15.494;
@ -491,6 +489,9 @@ class CfgAmmo {
ACE_muzzleVelocities[]={440, 460, 480};
ACE_barrelLengths[]={101.6, 127.0, 228.6};
};
class B_9x21_Ball_Tracer_Green: B_9x21_Ball {
tracerScale = 0.5;
};
class ACE_9x18_Ball_57N181S : B_9x21_Ball {
hit=5;
airFriction=-0.00190333;
@ -584,6 +585,7 @@ class CfgAmmo {
timeToLive=10;
airFriction=-0.00038944;
typicalSpeed=910;
tracerScale = 1.3; //1.2;
ACE_caliber=10.363;
ACE_bulletLength=54.0;
ACE_bulletMass=26.568;
@ -670,9 +672,13 @@ class CfgAmmo {
ACE_muzzleVelocities[]={880, 915, 925};
ACE_barrelLengths[]={508.0, 660.4, 711.2};
};
class B_127x33_Ball: BulletBase {
tracerScale = 1.3; //1.2;
};
class B_127x54_Ball : BulletBase {
airFriction=-0.00019268;
typicalSpeed=300;
tracerScale = 1.3;//
ACE_caliber=12.954;
ACE_bulletLength=64.516;
ACE_bulletMass=48.6;
@ -688,6 +694,7 @@ class CfgAmmo {
timeToLive=10;
airFriction=-0.00057503;
typicalSpeed=900;
tracerScale = 1.3; //1.2;
ACE_caliber=12.954;
ACE_bulletLength=58.674;
ACE_bulletMass=41.9256;
@ -703,6 +710,7 @@ class CfgAmmo {
timeToLive=10;
airFriction=-0.00057503;
typicalSpeed=900;
tracerScale = 1.3;//
hit=25;
caliber=4.0;
ACE_caliber=12.954;
@ -736,6 +744,7 @@ class CfgAmmo {
timeToLive=10;
airFriction=-0.00063800;
typicalSpeed=820;
tracerScale = 1.3; //1.5;
ACE_caliber=12.979;
ACE_bulletLength=64.008;
ACE_bulletMass=48.276;
@ -750,6 +759,7 @@ class CfgAmmo {
class B_45ACP_Ball : BulletBase {
airFriction=-0.00081221;
typicalSpeed=250;
tracerScale = 0.6;
ACE_caliber=11.481;
ACE_bulletLength=17.272;
ACE_bulletMass=14.904;
@ -761,4 +771,36 @@ class CfgAmmo {
ACE_muzzleVelocities[]={230, 250, 285};
ACE_barrelLengths[]={101.6, 127.0, 228.6};
};
class B_19mm_HE: BulletBase {
tracerScale = 1;
};
class B_30mm_HE: B_19mm_HE {
tracerScale = 2.5;
};
class B_20mm: BulletBase {
timeToLive=30;
tracerScale = 1.5; //1;
};
class B_25mm: BulletBase {
timeToLive=30;
tracerScale = 2.0; //1;
};
class B_30mm_AP: BulletBase {
timeToLive=30;
tracerScale = 2.5;
};
class B_35mm_AA: BulletBase {
timeToLive=30;
tracerScale = 2.75; //1.85;
};
class ShellBase;
class Sh_120mm_HE: ShellBase {
tracerScale = 3;
};
class Sh_120mm_APFSDS: ShellBase {
tracerScale = 3;
};
class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {
tracerScale = 2.5;
};
};

View File

@ -1,6 +1,11 @@
#define COMPONENT ballistics
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_BALLISTICS
#define DEBUG_MODE_FULL
#endif

View File

@ -33,7 +33,7 @@
<Spanish>Calibre: 6,5x39mm Trazadoras IR-DIM&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: MX/C/M/SW/3GL</Spanish>
<French>Calibre: 6,5x39mm Traçantes IR-DIM&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: MX/C/M/SW/3GL</French>
<Polish>Kaliber: 6,5x39mm Smugacz IR-DIM&lt;br /&gt;Pociski: 30&lt;br /&gt;Używane w: MX/C/M/SW/3GL</Polish>
<Czech>Ráže: 6.5x39mm Svítící IR-DIM&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: MX/C/M/SW/3GL</Czech>
<Czech>Ráže: 6.5x39mm Svítící IR-DIM&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: MX</Czech>
<Portuguese>Calibre: 6,5x39mm Traçante IR-DIM&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: MX/C/M/SW/3GL</Portuguese>
<Italian>Calibro: 6.5x39mm Traccianti IR-DIM &lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: MX/C/M/SW/3GL</Italian>
<Russian>Калибр: 6,5x39 мм ИК-трассирующие&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: MX/C/M/SW/3GL</Russian>
@ -69,7 +69,7 @@
<Spanish>Calibre: 6,5x39mm SD&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: MX/C/M/SW/3GL</Spanish>
<French>Calibre: 6,5x39mm SD&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: MX/C/M/SW/3GL</French>
<Polish>Kaliber: 6,5x39mm SD&lt;br /&gt;Pociski: 30&lt;br /&gt;Używane w: MX/C/M/SW/3GL</Polish>
<Czech>Ráže: 6.5x39mm SD&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: MX/C/M/SW/3GL</Czech>
<Czech>Ráže: 6.5x39mm SD&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: MX</Czech>
<Portuguese>Calibre: 6,5x39mm SD&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: MX/C/M/SW/3GL</Portuguese>
<Italian>Calibro: 6.5x39mm Sil.&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: MX/C/M/SW/3GL </Italian>
<Russian>Калибр: 6,5x39 мм дозвуковые&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: MX/C/M/SW/3GL</Russian>
@ -105,7 +105,7 @@
<Spanish>Calibre: 6,5x39mm AP&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: MX/C/M/SW/3GL</Spanish>
<French>Calibre: 6,5x39mm AP&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: MX/C/M/SW/3GL</French>
<Polish>Kaliber: 6,5x39mm AP&lt;br /&gt;Pociski: 30&lt;br /&gt;Używane w: MX/C/M/SW/3GL</Polish>
<Czech>Ráže: 6.5x39mm AP&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: MX/C/M/SW/3GL</Czech>
<Czech>Ráže: 6.5x39mm AP&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: MX</Czech>
<Portuguese>Calibre: 6,5x39mm AP&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: MX/C/M/SW/3GL</Portuguese>
<Italian>Calibro: 6.5x39mm AP&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: MX/C/M/SW/3GL</Italian>
<Russian>Калибр: 6,5x39 мм бронебойные&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: MX/C/M/SW/3GL</Russian>
@ -142,7 +142,7 @@
<Spanish>Calibre: 6,5x39mm Trazadoras IR-DIM&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: Katiba</Spanish>
<French>Calibre: 6,5x39mm Traçantes IR-DIM&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: Katiba</French>
<Polish>Kaliber: 6,5x39mm Smugacz IR-DIM&lt;br /&gt;Pociski: 30&lt;br /&gt;Używane w: Katiba</Polish>
<Czech>Ráže: 6.5x39mm Svítící IR-DIM&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: Katiba</Czech>
<Czech>Ráže: 6.5x39mm Svítící IR-DIM&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: KH 2002 Sama</Czech>
<Portuguese>Calibre: 6,5x39mm Traçante IR-DIM&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: Katiba</Portuguese>
<Italian>Calibro: 6.5x39mm Tracciant IR-DIM&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: Katiba</Italian>
<Russian>Калибр: 6,5x39 мм ИК-трассирующие&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: Katiba</Russian>
@ -178,7 +178,7 @@
<Spanish>Calibre: 6,5x39mm SD&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: Katiba</Spanish>
<French>Calibre: 6,5x39mm SD&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: Katiba</French>
<Polish>Kaliber: 6,5x39mm SD&lt;br /&gt;Naboje: 30&lt;br /&gt;Używane w: Katiba</Polish>
<Czech>Ráže: 6.5x39mm SD&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: Katiba</Czech>
<Czech>Ráže: 6.5x39mm SD&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: KH 2002 Sama</Czech>
<Portuguese>Calibre: 6,5x39mm SD&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: Katiba</Portuguese>
<Italian>Calibro: 6.5x39mm Sil.&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: Katiba</Italian>
<Russian>Калибр: 6,5x39 мм дозвуковые&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: Katiba</Russian>
@ -214,7 +214,7 @@
<Spanish>Calibre: 6,5x39mm AP&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: Katiba</Spanish>
<French>Calibre: 6,5x39mm AP&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: Katiba</French>
<Polish>Kaliber: 6,5x39mm AP&lt;br /&gt;Pociski: 30&lt;br /&gt;Używane w: Katiba</Polish>
<Czech>Ráže: 6.5x39mm AP&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: Katiba</Czech>
<Czech>Ráže: 6.5x39mm AP&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: KH 2002 Sama</Czech>
<Portuguese>Calibre: 6,5x39mm AP&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: Katiba</Portuguese>
<Italian>Calibro: 6.5x39mm AP&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: Katiba</Italian>
<Russian>Калибр: 6,5x39 мм бронебойные&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: Katiba</Russian>
@ -251,7 +251,7 @@
<Spanish>Calibre: 5,56x45mm Trazadoras IR-DIM&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Spanish>
<French>Calibre: 5,56x45mm Traçantes IR-DIM&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</French>
<Polish>Kaliber: 5,56x45mm Smugacz IR-DIM&lt;br /&gt;Pociski: 30&lt;br /&gt;Używane w: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Polish>
<Czech>Ráže: 5.56x45mm Svítící IR-DIM&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Czech>
<Czech>Ráže: 5.56x45mm Svítící IR-DIM&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: CTAR-21, TAR-21, F2000, RFB SDAR</Czech>
<Portuguese>Calibre: 5,56x45mm Traçante IR-DIM&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Portuguese>
<Italian>Calibro: 5.56x45mm Traccianti IR-DIM&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Italian>
<Russian>Калибр: 5,56x45 мм ИК-трассирующие&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Russian>
@ -288,7 +288,7 @@
<Spanish>Calibre: 7,62x51mm Trazadora&lt;br /&gt;Balas: 20&lt;br /&gt;Se usa en: Mk18 ABR</Spanish>
<French>Calibre: 7,62x51mm Traçantes&lt;br /&gt;Cartouches: 20&lt;br /&gt;Utilisé avec: EBR</French>
<Polish>Kaliber: 7,62x51mm Smugacz&lt;br /&gt;Pociski: 20&lt;br /&gt;Używane w: Mk18 ABR</Polish>
<Czech>Ráže: 7.62x51mm Svítící&lt;br /&gt;Munice: 20&lt;br /&gt;Použití: Mk18 ABR</Czech>
<Czech>Ráže: 7.62x51mm Svítící&lt;br /&gt;Nábojů: 20&lt;br /&gt;Použití u: Mk14 Mod 1 EBR</Czech>
<Portuguese>Calibre: 7,62x51mm Traçante&lt;br /&gt;Projéteis: 20&lt;br /&gt;Usado em: Mk18 ABR</Portuguese>
<Italian>Calibro: 7.62x51mm Traccianti&lt;br /&gt;Munizioni: 20&lt;br /&gt;In uso su: Mk18 ABR</Italian>
<Russian>Калибр: 7,62x51 мм трассирующие&lt;br /&gt;Патронов: 20&lt;br /&gt;Используются с: Mk18 ABR</Russian>
@ -324,7 +324,7 @@
<Spanish>Calibre: 7,62x51mm Trazadoras IR-DIM&lt;br /&gt;Balas: 20&lt;br /&gt;Se usa en: Mk18 ABR</Spanish>
<French>Calibre: 7,62x51mm Traçantes IR-DIM&lt;br /&gt;Cartouches: 20&lt;br /&gt;Utilisé avec: EBR</French>
<Polish>Kaliber: 7,62x51mm Smugacz IR-DIM&lt;br /&gt;Pociski: 20&lt;br /&gt;Używane w: Mk18 ABR</Polish>
<Czech>Ráže: 7.62x51mm Svítící IR-DIM&lt;br /&gt;Munice: 20&lt;br /&gt;Použití: Mk18 ABR</Czech>
<Czech>Ráže: 7.62x51mm Svítící IR-DIM&lt;br /&gt;Nábojů: 20&lt;br /&gt;Použití u: Mk14 Mod 1 EBR</Czech>
<Portuguese>Calibre: 7,62x51mm Traçante IR-DIM&lt;br /&gt;Projéteis: 20&lt;br /&gt;Usado em: Mk18 ABR</Portuguese>
<Italian>Calibro: 7.62x51mm Traccianti IR-DIM&lt;br /&gt;Munizioni: 20&lt;br /&gt;In uso su: Mk18 ABR</Italian>
<Russian>Калибр: 7,62x51 мм ИК-трассирующие&lt;br /&gt;Патронов: 20&lt;br /&gt;Используются с: Mk18 ABR</Russian>
@ -360,7 +360,7 @@
<Spanish>Calibre: 7,62x51mm SD&lt;br /&gt;Balas: 20&lt;br /&gt;Se usa en: Mk18 ABR</Spanish>
<French>Calibre: 7,62x51mm SD&lt;br /&gt;Cartouches: 20&lt;br /&gt;Utilisé avec: EBR</French>
<Polish>Kaliber: 7,62x51mm SD&lt;br /&gt;Pociski: 20&lt;br /&gt;Używane w: Mk18 ABR</Polish>
<Czech>Ráže: 7.62x51mm SD&lt;br /&gt;Munice: 20&lt;br /&gt;Použití: Mk18 ABR</Czech>
<Czech>Ráže: 7.62x51mm SD&lt;br /&gt;Nábojů: 20&lt;br /&gt;Použití u: Mk14 Mod 1 EBR</Czech>
<Portuguese>Calibre: 7,62x51mm SD&lt;br /&gt;Projéteis: 20&lt;br /&gt;Usado em: Mk18 ABR</Portuguese>
<Italian>Calibro: 7.62x51mm Sil.&lt;br /&gt;Munizioni: 20&lt;br /&gt;In uso su: Mk18 ABR</Italian>
<Russian>Калибр: 7,62x51 мм дозвуковые&lt;br /&gt;Патронов: 20&lt;br /&gt;Используются с: Mk18 ABR</Russian>
@ -398,7 +398,7 @@
<Spanish>Calibre: .338 Norma Magnum trazadora&lt;br /&gt;Balas: 130&lt;br /&gt;Se usa en: SPMG</Spanish>
<Russian>Калибр: .338 Norma Magnum трассирующие&lt;br /&gt;Патронов: 130&lt;br /&gt;Используются в: SPMG</Russian>
<Italian>Calibro: .338 Norma Magnum Tracciante&lt;br /&gt;Munizioni: 130&lt;br /&gt;In uso su: SPMG</Italian>
<Czech>Ráže: .338 Noma Magnum Svítící&lt;br /&gt;Munice: 130&lt;br /&gt;Použití: SPMG</Czech>
<Czech>Ráže: .338 Noma Magnum Svítící&lt;br /&gt;Nábojů: 130&lt;br /&gt;Použití u: LWMMG</Czech>
<Portuguese>Calibre: .338 Norma Magnum Traçante&lt;br /&gt;Cartuchos: 130&lt;br /&gt;Usado em: SPMG</Portuguese>
<Hungarian>Kaliber: .338 Norma Magnum nyomkövető&lt;br /&gt;Lövedékek: 130&lt;br /&gt;Használható: SPMG</Hungarian>
</Key>
@ -434,7 +434,7 @@
<Spanish>Calibre: .338 Norma Magnum trazadora IR-DIM&lt;br /&gt;Balas: 130&lt;br /&gt;Se usa en: SPMG</Spanish>
<Russian>Калибр: .338 Norma Magnum ИК-трассирующие&lt;br /&gt;Патронов: 130&lt;br /&gt;Используются с: SPMG</Russian>
<Italian>Calibro: .338 Norma Magnum Tracciante IR-DIM&lt;br /&gt;Munizioni: 130&lt;br /&gt;In uso su: SPMG</Italian>
<Czech>Ráže: .338 Noma Magnum Svítící IR-DIM&lt;br /&gt;Munice: 130&lt;br /&gt;Použití: SPMG</Czech>
<Czech>Ráže: .338 Noma Magnum Svítící IR-DIM&lt;br /&gt;Nábojů: 130&lt;br /&gt;Použití u: LWMMG</Czech>
<Portuguese>Calibre: .338 Norma Magnum Traçante IR-DIM&lt;br /&gt;Cartuchos: 130&lt;br /&gt;Usado em: SPMG</Portuguese>
<Hungarian>Kaliber: .338 Norma Magnum infravörös nyomkövető&lt;br /&gt;Lövedékek: 130&lt;br /&gt;Használható: SPMG</Hungarian>
</Key>
@ -470,7 +470,7 @@
<Spanish>Calibre: .338 Norma Magnum AP&lt;br /&gt;Balas: 130&lt;br /&gt;Se usa en: SPMG</Spanish>
<Russian>Калибр: .338 Norma Magnum бронебойные&lt;br /&gt;Патронов: 130&lt;br /&gt;Используются с: SPMG</Russian>
<Italian>Calibro: .338 Norma Magnum AP&lt;br /&gt;Munizioni: 130&lt;br /&gt;In uso su: SPMG</Italian>
<Czech>Ráže: .338 Noma Magnum AP&lt;br /&gt;Munice: 130&lt;br /&gt;Použití: SPMG</Czech>
<Czech>Ráže: .338 Noma Magnum AP&lt;br /&gt;Nábojů: 130&lt;br /&gt;Použití u: LWMMG</Czech>
<Portuguese>Calibre: .338 Norma Magnum AP&lt;br /&gt;Cartuchos: 130&lt;br /&gt;Usado em: SPMG</Portuguese>
<Hungarian>Kaliber: .338 Norma Magnum páncéltörő&lt;br /&gt;Lövedékek: 130&lt;br /&gt;Használható: SPMG</Hungarian>
</Key>
@ -507,7 +507,7 @@
<Spanish>Calibre: 9.3x64mm trazadora&lt;br /&gt;Balas: 10&lt;br /&gt;Se usa en: Cyrus</Spanish>
<Russian>Калибр: 9,3x64 мм трассирующие&lt;br /&gt;Патронов: 10&lt;br /&gt;Используются с: Cyrus</Russian>
<Italian>Calibro: 9.3x64mm Tracer&lt;br /&gt;Munizioni: 10&lt;br /&gt;In uso su: Cyrus</Italian>
<Czech>Ráže: 9.3x64mm Svítící&lt;br /&gt;Munice: 10&lt;br /&gt;Použití: Cyrus</Czech>
<Czech>Ráže: 9.3x64mm Svítící&lt;br /&gt;Nábojů: 10&lt;br /&gt;Použití u: Cyrus</Czech>
<Portuguese>Calibre: 9.3x64mm Traçante&lt;br /&gt;Cartuchos: 10&lt;br /&gt;Usado em: Cyrus</Portuguese>
<Hungarian>Kaliber: 9,3x64mm nyomkövető&lt;br /&gt;Lövedékek: 10&lt;br /&gt;Használható: Cyrus</Hungarian>
</Key>
@ -543,7 +543,7 @@
<Spanish>Calibre: 9.3x64mm trazadora IR-DIM&lt;br /&gt;Balas: 10&lt;br /&gt;Se usa en: Cyrus</Spanish>
<Russian>Калибр: 9,3x64 мм ИК-трассирующие&lt;br /&gt;Патронов: 10&lt;br /&gt;Используются с: Cyrus</Russian>
<Italian>Calibro: 9.3x64mm Tracciante IR-DIM&lt;br /&gt;Munizioni: 10&lt;br /&gt;In uso su: Cyrus</Italian>
<Czech>Ráže: 9.3x64mm Svítící IR-DIM&lt;br /&gt;Munice: 10&lt;br /&gt;Použití: Cyrus</Czech>
<Czech>Ráže: 9.3x64mm Svítící IR-DIM&lt;br /&gt;Nábojů: 10&lt;br /&gt;Použití u: Cyrus</Czech>
<Portuguese>Calibre: 9.3x64mm Traçante IR-DIM&lt;br /&gt;Cartuchos: 10&lt;br /&gt;Usado em: Cyrus</Portuguese>
<Hungarian>Kaliber: 9,3x64mm infravörös nyomkövető&lt;br /&gt;Lövedékek: 10&lt;br /&gt; Használható: Cyrus</Hungarian>
</Key>
@ -580,7 +580,7 @@
<Spanish>Calibre: 9.3x64mm trazadora&lt;br /&gt;Balas: 150&lt;br /&gt;Se usa en: Navid</Spanish>
<Russian>Калибр: 9,3x64 мм трассирующие&lt;br /&gt;Патронов: 150&lt;br /&gt;Используются с: Навид</Russian>
<Italian>Calibro: 9.3x64mm Tracciante&lt;br /&gt;Munizioni: 150&lt;br /&gt;In uso su: Navid</Italian>
<Czech>Ráže: 9.3x64mm Svítící&lt;br /&gt;Munice: 150&lt;br /&gt;Použití: Navid</Czech>
<Czech>Ráže: 9.3x64mm Svítící&lt;br /&gt;Nábojů: 150&lt;br /&gt;Použití u: HK121</Czech>
<Portuguese>Calibre: 9.3x64mm Traçante&lt;br /&gt;Cartuchos: 150&lt;br /&gt;Usado em: Navid</Portuguese>
<Hungarian>Kaliber: 9,3x64mm nyomkövető&lt;br /&gt;Lövedékek: 150&lt;br /&gt;Használható: Navid</Hungarian>
</Key>
@ -616,7 +616,7 @@
<Spanish>Calibre: 9.3x64mm trazadora IR-DIM&lt;br /&gt;Balas: 150&lt;br /&gt;Se usa en: Navid</Spanish>
<Russian>Калибр: 9,3x64 мм ИК-трассирующие&lt;br /&gt;Патронов: 150&lt;br /&gt;Используются с: Навид</Russian>
<Italian>Calibro: 9.3x64mm Tracciante IR-DIM&lt;br /&gt;Munizioni: 150&lt;br /&gt;In uso su: Navid</Italian>
<Czech>Ráže: 9.3x64mm Svítící IR-DIM&lt;br /&gt;Munice: 150&lt;br /&gt;Použití: Navid</Czech>
<Czech>Ráže: 9.3x64mm Svítící IR-DIM&lt;br /&gt;Nábojů: 150&lt;br /&gt;Použití u: HK121</Czech>
<Portuguese>Calibre: 9.3x64mm Traçante IR-DIM&lt;br /&gt;Cartuchos: 150&lt;br /&gt;Usado em: Navid</Portuguese>
<Hungarian>Kaliber: 9,3x64mm infravörös nyomkövető&lt;br /&gt;Lövedékek: 150&lt;br /&gt;Használható: Navid</Hungarian>
</Key>
@ -652,7 +652,7 @@
<Spanish>Calibre: 9.3x64mm AP&lt;br /&gt;Balas: 150&lt;br /&gt;Se usa en: Navid</Spanish>
<Russian>Калибр: 9,3x64 мм бронебойные&lt;br /&gt;Патронов: 150&lt;br /&gt;Используются с: Навид</Russian>
<Italian>Calibro: 9.3x64mm AP&lt;br /&gt;Munizioni: 150&lt;br /&gt;In uso su: Navid</Italian>
<Czech>Ráže: 9.3x64mm AP&lt;br /&gt;Munice: 150&lt;br /&gt;Použití: Navid</Czech>
<Czech>Ráže: 9.3x64mm AP&lt;br /&gt;Nábojů: 150&lt;br /&gt;Použití u: HK121</Czech>
<Portuguese>Calibre: 9.3x64mm AP&lt;br /&gt;Cartuchos: 150&lt;br /&gt;Usado em: Navid</Portuguese>
<Hungarian>Kaliber: 9,3x64mm páncéltörő&lt;br /&gt;Lövedékek: 150&lt;br /&gt;Használható: Navid</Hungarian>
</Key>
@ -796,7 +796,7 @@
<Russian>Магазин из 100 6,5 мм ИК-трассирующих</Russian>
<German>6,5mm 100-Patronen-Magazin IR-DIM Leuchtspur&lt;br /&gt;Patronen: 100&lt;br /&gt;Eingesetzt von: MXLSW</German>
<Italian>6.5mm 100Rnd Tracer IR-DIM Mag&lt;br /&gt;Munizioni: 100&lt;br /&gt;In uso su: MX LSW</Italian>
<Czech>6.5mm 100náb. Svítící IR-DIM Zásobník&lt;br /&gt;Munice: 100&lt;br /&gt;Použití: MX LSW</Czech>
<Czech>6.5mm 100náb. Svítící IR-DIM Zásobník&lt;br /&gt;Nábojů: 100&lt;br /&gt;Použití u: MX LSW</Czech>
<Portuguese>Carregador 6.5mm 100 Cartuchos Traçantes IR-DIM&lt;br /&gt;Cartuchos: 100&lt;br /&gt;Usado em: MX LSW</Portuguese>
<Hungarian>6.5mm 100-lövedékes infravörös nyomkövető tár&lt;br /&gt;Lövedékek: 100&lt;br /&gt;Használható: MX LSW</Hungarian>
</Key>
@ -832,7 +832,7 @@
<Russian>Магазин из 200-т 6,5 мм ИК-трассирующих</Russian>
<German>6,5mm 200-Patronen-Gurt IR-DIM Leuchtspur&lt;br /&gt;Patronen: 200&lt;br /&gt;Eingesetzt von: Stoner 99 LMG</German>
<Italian>6.5mm 200Rnd Tracer IR-DIM Belt&lt;br /&gt;Munizioni: 200&lt;br /&gt;In uso su: Stoner 99 LMG</Italian>
<Czech>6.5mm 200náb. Svítící IR-DIM Pás&lt;br /&gt;Munice: 200&lt;br /&gt;Použití: Stoner 99 LMG</Czech>
<Czech>6.5mm 200náb. Svítící IR-DIM Pás&lt;br /&gt;Nábojů: 200&lt;br /&gt;Použití u: Stoner 99 LMG</Czech>
<Portuguese>Cinto de munição traçante 6.5mm IR-DIM com 200 cartuchos&lt;br /&gt;Cartuchos: 200&lt;br /&gt;Usado em: Stoner 99 LMG</Portuguese>
<Hungarian>6.5mm 200-lövedékes infravörös nyomkövető heveder&lt;br /&gt;Lövedékek: 200&lt;br /&gt;Használható: Stoner 99 LMG</Hungarian>
</Key>
@ -868,7 +868,7 @@
<Russian>Калибр: 5,56x45 мм NATO (Mk262)&lt;br /&gt;Патронов: 30</Russian>
<German>Kaliber: 5,56x45mm NATO (Mk262)&lt;br /&gt;Patronen: 30</German>
<Italian>Calibro: 5.56x45 mm NATO (Mk262)&lt;br /&gt;Munizioni: 30</Italian>
<Czech>Ráže: 5.56x45mm NATO (Mk262)&lt;br /&gt;Munice: 30</Czech>
<Czech>Ráže: 5.56x45mm NATO (Mk262)&lt;br /&gt;Nábojů: 30</Czech>
<Portuguese>Calibre: 5.56x45mm NATO (Mk262)&lt;br/&gt;Cartuchos: 30</Portuguese>
<Hungarian>Kaliber: 5,56x45mm NATO (Mk262)&lt;br /&gt;Lövedékek: 30</Hungarian>
</Key>
@ -904,7 +904,7 @@
<Russian>Калибр: 5,56x45 мм NATO (Mk318)&lt;br /&gt;Патронов: 30</Russian>
<German>Kaliber: 5,56x45mm NATO (Mk318)&lt;br /&gt;Patronen: 30</German>
<Italian>Calibro: 5.56x45 mm NATO (Mk318)&lt;br /&gt;Munizioni: 30</Italian>
<Czech>Ráže: 5.56x45mm NATO (Mk318)&lt;br /&gt;Munice: 30</Czech>
<Czech>Ráže: 5.56x45mm NATO (Mk318)&lt;br /&gt;Nábojů: 30</Czech>
<Portuguese>Calibre: 5.56x45mm NATO (Mk318)&lt;br/&gt;Cartuchos: 30</Portuguese>
<Hungarian>Kaliber: 5,56x45mm NATO (Mk318)&lt;br /&gt;Lövedékek: 30</Hungarian>
</Key>
@ -940,7 +940,7 @@
<Russian>Калибр: 5,56x45 мм NATO (M995 бронебойные)&lt;br /&gt;Патронов: 30</Russian>
<German>Kaliber: 5,56x45mm NATO (M995 AP)&lt;br /&gt;Patronen: 30</German>
<Italian>Calibro: 5.56x45 mm NATO (M995 AP)&lt;br /&gt;Munizioni: 30</Italian>
<Czech>Ráže: 5.56x45mm NATO (M995 AP)&lt;br /&gt;Munice: 30</Czech>
<Czech>Ráže: 5.56x45mm NATO (M995 AP)&lt;br /&gt;Nábojů: 30</Czech>
<Portuguese>Calibre: 5.56x45mm NATO (M995 AP)&lt;br/&gt;Cartuchos: 30</Portuguese>
<Hungarian>Kaliber: 5,56x45mm NATO (M995 páncéltörő)&lt;br /&gt;Lövedékek: 30</Hungarian>
</Key>
@ -976,7 +976,7 @@
<Russian>Калибр: 7,62x51 мм NATO (M118LR)&lt;br /&gt;Патронов: 10</Russian>
<German>Kaliber: 7,62x51mm NATO (M118LR)&lt;br /&gt;Patronen: 10</German>
<Italian>Calibro: 7.62x51 mm NATO (M118LR)&lt;br /&gt;Munizioni: 10</Italian>
<Czech>Ráže: 7.62x51mm NATO (M118LR)&lt;br /&gt;Munice: 10</Czech>
<Czech>Ráže: 7.62x51mm NATO (M118LR)&lt;br /&gt;Nábojů: 10</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (M118LR)&lt;br/&gt;Cartuchos: 10</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (M118LR)&lt;br /&gt;Lövedékek: 10</Hungarian>
</Key>
@ -1012,7 +1012,7 @@
<Russian>Калибр: 7,62x51 мм NATO (M118LR)&lt;br /&gt;Патронов: 20</Russian>
<German>Kaliber: 7,62x51mm NATO (M118LR)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x51 mm NATO (M118LR)&lt;br /&gt;Munizioni: 20</Italian>
<Czech>Ráže: 7.62x51mm NATO (M118LR)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x51mm NATO (M118LR)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (M118LR)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (M118LR)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1048,7 +1048,7 @@
<Russian>Калибр: 7,62x51 мм NATO (Mk316 Mod 0)&lt;br /&gt;Патронов: 10</Russian>
<German>Kaliber: 7,62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Patronen: 10</German>
<Italian>Calibro: 7.62x51 mm NATO (Mk316 Mod 0)&lt;br /&gt;Munizioni: 10</Italian>
<Czech>Ráže: 7.62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Munice: 10</Czech>
<Czech>Ráže: 7.62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Nábojů: 10</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (Mk316 Mod 0)&lt;br/&gt;Cartuchos: 10</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Lövedékek: 10</Hungarian>
</Key>
@ -1084,7 +1084,7 @@
<Russian>Калибр: 7,62x51 мм NATO (Mk316 Mod 0)&lt;br /&gt;Патронов: 20</Russian>
<German>Kaliber: 7,62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x51 mm NATO (Mk316 Mod 0)&lt;br /&gt;Munizioni: 20</Italian>
<Czech>Ráže: 7.62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (Mk316 Mod 0)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1120,7 +1120,7 @@
<Russian>Калибр: 7,62x51 мм NATO (Mk319 Mod 0)&lt;br /&gt;Патронов: 10</Russian>
<German>Kaliber: 7,62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Patronen: 10</German>
<Italian>Calibro: 7.62x51 mm NATO (Mk319 Mod 0)&lt;br /&gt;Munizioni: 10</Italian>
<Czech>Ráže: 7.62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Munice: 10</Czech>
<Czech>Ráže: 7.62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Nábojů: 10</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (Mk319 Mod 0)&lt;br/&gt;Cartuchos: 10</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Lövedékek: 10</Hungarian>
</Key>
@ -1156,7 +1156,7 @@
<Russian>Калибр: 7,62x51 мм NATO (Mk319 Mod 0)&lt;br /&gt;Патронов: 20</Russian>
<German>Kaliber: 7,62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x51 mm NATO (Mk319 Mod 0)&lt;br /&gt;Munizioni: 20</Italian>
<Czech>Ráže: 7.62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (Mk319 Mod 0)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1192,7 +1192,7 @@
<Russian>Калибр: 7,62x51 мм NATO (M993 бронебойные)&lt;br /&gt;Патронов: 10</Russian>
<German>Kaliber: 7,62x51mm NATO (M993 AP)&lt;br /&gt;Patronen: 10</German>
<Italian>Calibro: 7.62x51 mm NATO (M993 AP)&lt;br /&gt;Munizioni: 10</Italian>
<Czech>Ráže: 7.62x51mm NATO (M993 AP)&lt;br /&gt;Munice: 10</Czech>
<Czech>Ráže: 7.62x51mm NATO (M993 AP)&lt;br /&gt;Nábojů: 10</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (M993 AP)&lt;br/&gt;Cartuchos: 10</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (M993 páncéltörő)&lt;br /&gt;Lövedékek: 10</Hungarian>
</Key>
@ -1228,7 +1228,7 @@
<German>Kaliber: 7,62x51mm NATO (M993 AP)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x51 mm NATO (M993 AP)&lt;br /&gt;Munizioni: 20</Italian>
<Spanish>Calibre: 7.62x51 mm NATO (M993 AP)&lt;br /&gt;Balas: 20</Spanish>
<Czech>Ráže: 7.62x51mm NATO (M993 AP)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x51mm NATO (M993 AP)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (M993 AP)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (M993 páncéltörő)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1264,7 +1264,7 @@
<Russian>Калибр: 7,62x67 мм NATO (Mk248 Mod 0)&lt;br /&gt;Патронов: 20</Russian>
<German>Kaliber: 7,62x51mm NATO (Mk248 Mod 0)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x67 mm NATO (Mk248 Mod 0)&lt;br /&gt;Munizioni: 20</Italian>
<Czech>Ráže: 7.62x67mm NATO (Mk248 Mod 0)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x67mm NATO (Mk248 Mod 0)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x67mm NATO (Mk248 Mod 0)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (Mk248 Mod 0)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1300,7 +1300,7 @@
<Russian>Калибр: 7,62x67 мм NATO (Mk248 Mod 1)&lt;br /&gt;Патронов: 20</Russian>
<German>Kaliber: 7,62x51mm NATO (Mk248 Mod 1)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x67 mm NATO (Mk248 Mod 1)&lt;br /&gt;Munizioni: 20</Italian>
<Czech>Ráže: 7.62x67mm NATO (Mk248 Mod 1)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x67mm NATO (Mk248 Mod 1)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x67mm NATO (Mk248 Mod 1)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (Mk248 Mod 1)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1336,7 +1336,7 @@
<Russian>Калибр: 7,62x67 мм NATO (Berger Hybrid OTM)&lt;br /&gt;Патронов: 20</Russian>
<German>Kaliber: 7,62x67mm NATO (Berger Hybrid OTM)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x67 mm NATO (Berger Hybrid OTM)&lt;br /&gt;Munizioni: 20</Italian>
<Czech>Ráže: 7.62x67mm NATO (Berger Hybrid OTM)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x67mm NATO (Berger Hybrid OTM)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x67mm NATO (Berger Hybrid OTM)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x67mm NATO (Berger Hybrid OTM)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1372,7 +1372,7 @@
<Russian>Калибр: 6,5x47 мм (экспансивные Scenar)&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: MXM</Russian>
<German>Kaliber: 6,5x47mm (HPBT Scenar)&lt;br /&gt;Patronen: 30&lt;br /&gt;Eingesetzt von: MXM</German>
<Italian>Calibro: 6.5x47mm (HPBT Scenar)&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: MXM</Italian>
<Czech>Ráže: 6.5x47mm (HPBT Scenar)&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: MXM</Czech>
<Czech>Ráže: 6.5x47mm (HPBT Scenar)&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: MXM</Czech>
<Portuguese>Calibre: 6.5x47mm (HPBT Scenar)&lt;br/&gt;Cartuchos: 30&lt;br/&gt;Usado em: MXM</Portuguese>
<Hungarian>Kaliber: 6,5x47mm (HPBT Scenar)&lt;br /&gt;Lövedékek: 30&lt;br /&gt;Használható: MXM</Hungarian>
</Key>
@ -1408,7 +1408,7 @@
<Italian>Calibro: 6.5mm Creedmor&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: MXM</Italian>
<Spanish>Calibre: 6.5mm Creedmor&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: MXM</Spanish>
<Russian>Калибр: 6,5x47мм Creedmor&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются c: MXM</Russian>
<Czech>Ráže: 6.5x47mm Creedmor&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: MXM</Czech>
<Czech>Ráže: 6.5x47mm Creedmor&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: MXM</Czech>
<Portuguese>Calibre: 6.5x47mm Creedmor&lt;br/&gt;Cartuchos: 30&lt;br/&gt;Usado em: MXM</Portuguese>
<Hungarian>Kaliber: 6,5x47mm Creedmor&lt;br /&gt;Lövedékek: 30&lt;br /&gt;Használható: MXM</Hungarian>
</Key>
@ -1444,7 +1444,7 @@
<Russian>Калибр: 8,6x70mm (300 гран Sierra MatchKing экспансивные)&lt;br /&gt;Патронов: 10</Russian>
<German>Kaliber: 8,6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Patronen: 10</German>
<Italian>Calibro: 8.6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Munizioni: 10</Italian>
<Czech>Ráže: 8.6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Munice: 10</Czech>
<Czech>Ráže: 8.6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Nábojů: 10</Czech>
<Portuguese>Calibre: 8.6x70mm (300gr Sierra MatchKing HPBT)&lt;br/&gt;Cartuchos: 10</Portuguese>
<Hungarian>Kaliber: 8,6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Lövedékek: 10</Hungarian>
</Key>
@ -1480,7 +1480,7 @@
<Russian>Калибр: 8,6x70 мм (API526)&lt;br /&gt;Патронов: 10</Russian>
<German>Kaliber: 8,6x70mm (API526)&lt;br /&gt;Patronen: 10</German>
<Italian>Calibro: 8.6x70mm (API526)&lt;br /&gt;Munizioni: 10</Italian>
<Czech>Ráže: 8.6x70mm (API526)&lt;br /&gt;Munice: 10</Czech>
<Czech>Ráže: 8.6x70mm (API526)&lt;br /&gt;Nábojů: 10</Czech>
<Portuguese>Calibre: 8.6x70mm (API526)&lt;br/&gt;Cartuchos: 10</Portuguese>
<Hungarian>Kaliber: 8,6x70mm (API526)&lt;br /&gt;Lövedékek: 10</Hungarian>
</Key>
@ -1516,7 +1516,7 @@
<Russian>Калибр: 12,7x99 мм&lt;br /&gt;Патронов: 5</Russian>
<German>Kaliber: 12,7x99mm&lt;br /&gt;Patronen: 5</German>
<Italian>Calibro: 12.7x99mm&lt;br /&gt;Munizioni: 5</Italian>
<Czech>Ráže: 12.7x99mm&lt;br /&gt;Munice: 5</Czech>
<Czech>Ráže: 12.7x99mm&lt;br /&gt;Nábojů: 5</Czech>
<Portuguese>Calibre: 12.7x99mm&lt;br/&gt;Cartuchos: 5</Portuguese>
<Hungarian>Kaliber: 12,7x99mm&lt;br /&gt;Lövedékek: 5</Hungarian>
</Key>
@ -1552,7 +1552,7 @@
<Russian>Калибр: 12,7x99 мм бронебойно-зажигательные&lt;br /&gt;Патронов: 5</Russian>
<German>Kaliber:12,7x99mm API&lt;br /&gt;Patronen: 5</German>
<Italian>Calibro: 12.7x99mm API&lt;br /&gt;Munizioni: 5</Italian>
<Czech>Ráže: 12.7x99mm API&lt;br /&gt;Munice: 5</Czech>
<Czech>Ráže: 12.7x99mm API&lt;br /&gt;Nábojů: 5</Czech>
<Portuguese>Calibre: 12.7x99mm API&lt;br/&gt;Cartuchos: 5</Portuguese>
<Hungarian>Kaliber: 12,7x99mm API&lt;br /&gt;Lövedékek: 5</Hungarian>
</Key>
@ -1588,7 +1588,7 @@
<Russian>Калибр: 12,7x99 мм (A-MAX)&lt;br /&gt;Патронов: 5</Russian>
<Italian>Calibro: 12.7x99mm (AMAX)&lt;br /&gt;Munizioni: 5</Italian>
<German>Kaliber:12,7x99mm (AMAX)&lt;br /&gt;Patronen: 5</German>
<Czech>Ráže: 12.7x99mm (AMAX)&lt;br /&gt;Munice: 5</Czech>
<Czech>Ráže: 12.7x99mm (AMAX)&lt;br /&gt;Nábojů: 5</Czech>
<Portuguese>Calibre: 12.7x99mm (AMAX)&lt;br/&gt;Cartuchos: 5</Portuguese>
<Hungarian>Kaliber: 12,7x99mm (AMAX)&lt;br /&gt;Lövedékek: 5</Hungarian>
</Key>
@ -1599,7 +1599,9 @@
<German>[ACE] Munitionskiste</German>
<Czech>[ACE] Bedna s municí</Czech>
<Portuguese>[ACE] Caixa com suprimentos de munição</Portuguese>
<French>[ACE] Caisse de munitions</French>
<Hungarian>[ACE] Lőszeres láda</Hungarian>
<Russian>[ACE] Ящик с боеприпасами</Russian>
</Key>
</Package>
</Project>

View File

@ -25,14 +25,6 @@ class Extended_GetOut_EventHandlers {
};
};
};
//reset captivity and escorting status when getting killed
class Extended_Killed_EventHandlers {
class CAManBase {
class GVAR(AutoDetachCaptive) {
killed = QUOTE(_this call FUNC(handleKilled));
};
};
};
//mission start
class Extended_InitPost_EventHandlers {
class CAManBase {

View File

@ -32,7 +32,6 @@ class CfgVehicles {
showDisabled = 0;
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
priority = 2.3;
hotkey = "E";
};
class ACE_StopEscorting {
displayName = CSTRING(StopEscorting);
@ -43,7 +42,6 @@ class CfgVehicles {
showDisabled = 0;
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
priority = 2.3;
hotkey = "E";
};
class ACE_LoadCaptive {
displayName = CSTRING(LoadCaptive);
@ -54,7 +52,6 @@ class CfgVehicles {
showDisabled = 0;
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
priority = 2.2;
hotkey = "L";
};
class GVAR(UnloadCaptive) {
displayName = CSTRING(UnloadCaptive);
@ -74,7 +71,6 @@ class CfgVehicles {
exceptions[] = {"isNotEscorting"};
showDisabled = 0;
priority = 2.3;
hotkey = "C";
};
class ACE_StartSurrenderingSelf {
displayName = CSTRING(StartSurrendering);
@ -153,16 +149,32 @@ class CfgVehicles {
class GVAR(ModuleSurrender): Module_F {
author = ECSTRING(common,ACETeam);
category = "ACE";
displayName = CSTRING(ModuleSurrender_DisplayName); //Make Unit Surrender
displayName = CSTRING(ModuleSurrender_DisplayName);
function = QFUNC(moduleSurrender);
scope = 2; //show in editor
isGlobal = 1; //run global
isGlobal = 0; //run on server
isTriggerActivated = 1; //Wait for triggers
icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa));
functionPriority = 0;
class Arguments {};
class ModuleDescription: ModuleDescription {
description = CSTRING(ModuleSurrender_Description); //Sync a unit to make them surrender.<br/>Source: ace_captives
description = CSTRING(ModuleSurrender_Description);
sync[] = {"AnyAI"};
};
};
class GVAR(ModuleHandcuffed): Module_F {
author = ECSTRING(common,ACETeam);
category = "ACE";
displayName = CSTRING(ModuleHandcuffed_DisplayName);
function = QFUNC(moduleHandcuffed);
scope = 2; //show in editor
isGlobal = 0; //run on server
isTriggerActivated = 1; //Wait for triggers
icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Handcuffed_ca.paa));
functionPriority = 0;
class Arguments {};
class ModuleDescription: ModuleDescription {
description = CSTRING(ModuleHandcuffed_Description);
sync[] = {"AnyAI"};
};
};
@ -176,6 +188,7 @@ class CfgVehicles {
scope = 2;
icon = QUOTE(PATHTOF(UI\Icon_Module_settings_ca.paa));
isGlobal = 1;
isSingular = 1;
class Arguments {
class allowHandcuffOwnSide {
displayName = CSTRING(ModuleSettings_handcuffSide_name);

View File

@ -18,7 +18,6 @@ if (isServer) then {
}];
};
["playerVehicleChanged", {_this call FUNC(handleVehicleChanged)}] call EFUNC(common,addEventHandler);
["zeusDisplayChanged", {_this call FUNC(handleZeusDisplayChanged)}] call EFUNC(common,addEventHandler);
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
@ -27,7 +26,7 @@ if (isServer) then {
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
["SetSurrendered", {_this call FUNC(setSurrendered)}] call EFUNC(common,addEventHandler);
//Medical Integration Events???
//Medical Integration Events
["medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call EFUNC(common,addEventHandler);
if (!hasInterface) exitWith {};

View File

@ -19,12 +19,12 @@ PREP(doUnloadCaptive);
PREP(findEmptyNonFFVCargoSeat);
PREP(handleGetIn);
PREP(handleGetOut);
PREP(handleKilled);
PREP(handleOnUnconscious);
PREP(handlePlayerChanged);
PREP(handleRespawn);
PREP(handleUnitInitPost);
PREP(handleZeusDisplayChanged);
PREP(moduleHandcuffed);
PREP(moduleSettings);
PREP(moduleSurrender);
PREP(setHandcuffed);

View File

@ -2,7 +2,7 @@
class CfgPatches {
class ADDON {
units[] = {QGVAR(ModuleSettings), QGVAR(ModuleSurrender)};
units[] = {QGVAR(ModuleSettings), QGVAR(ModuleSurrender), QGVAR(ModuleHandcuffed)};
weapons[] = {"ACE_CableTie"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ACE_Interaction"};

View File

@ -20,7 +20,13 @@ params ["_unit", "_target"];
//Check sides, Player has cableTie, target is alive and not already handcuffed
(GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) &&
("ACE_CableTie" in (items _unit)) &&
{"ACE_CableTie" in (items _unit)} &&
{alive _target} &&
{!(_target getVariable [QGVAR(isHandcuffed), false])} &&
(GVAR(requireSurrender) == 0 || ((_target getVariable [QGVAR(isSurrendering), false]) || (currentWeapon _target == "" && GVAR(requireSurrender) == 2)))
{
(_target getVariable ["ACE_isUnconscious", false]) || //isUnconscious
{!([_target] call EFUNC(common,isPlayer))} || //is an AI (not a player)
{GVAR(requireSurrender) == 0} || //or don't require surrendering
{_target getVariable [QGVAR(isSurrendering), false]} || //or is surrendering
{(GVAR(requireSurrender) == 2) && {(currentWeapon _target) == ""}} //or "SurrenderOrNoWeapon" and no weapon
}

View File

@ -45,7 +45,7 @@ if (_state) then {
};
if (!(_unit getVariable [QGVAR(isEscorting), false])) then {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
[objNull, _target, false] call EFUNC(common,claim);
detach _target;
_unit removeAction _actionID;

View File

@ -26,7 +26,7 @@ if (local _unit) then {
};
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
[_unit, false] call FUNC(setSurrender);
[_unit, false] call FUNC(setSurrendered);
};
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {

View File

@ -1,32 +0,0 @@
/*
* Author: PabstMirror
* Handles when a unit is kill. Reset captivity and escorting status
*
* Arguments:
* 0: _oldUnit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob1] call ACE_captives_fnc_handleKilled
*
* Public: No
*/
#include "script_component.hpp"
params ["_oldUnit"];
if (!local _oldUnit) exitWith {};
if (_oldUnit getVariable [QGVAR(isHandcuffed), false]) then {
[_oldUnit, false] call FUNC(setHandcuffed);
};
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
_oldUnit setVariable [QGVAR(isEscorting), false, true];
};
if (_oldUnit getVariable [QGVAR(isSurrendering), false]) then {
[_oldUnit, false] call FUNC(setSurrendered);
};

View File

@ -21,10 +21,10 @@ params ["_newUnit","_oldUnit"];
//set showHUD based on new unit status:
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
TRACE_1("Player Change (showHUD false)",_newUnit);
showHUD false;
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
} else {
TRACE_1("Player Change (showHUD true)",_newUnit);
showHUD true;
["captive", []] call EFUNC(common,showHud); //same as showHud true;
};
//If old player was escorting, stop

View File

@ -20,20 +20,34 @@ params ["_unit","_dead"];
if (!local _unit) exitWith {};
//With respawn="group", we could be respawning into a unit that is handcuffed/captive
//If they are, reset and rerun the SET function
//if not, make sure to explicity disable the setCaptivityStatus, because captiveNum does not work correctly on respawn
// Group and side respawn can potentially respawn you as a captive unit
// Base and instant respawn cannot, so captive should be entirely reset
// So we explicity account for the respawn type
private ["_respawn"];
_respawn = [0] call BIS_fnc_missionRespawnType;
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
_unit setVariable [QGVAR(isHandcuffed), false];
[_unit, true] call FUNC(setHandcuffed);
} else {
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
};
if (_respawn > 3) then {
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
_unit setVariable [QGVAR(isHandcuffed), false];
[_unit, true] call FUNC(setHandcuffed);
};
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
_unit setVariable [QGVAR(isSurrendering), false];
[_unit, true] call FUNC(setSurrendered);
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
_unit setVariable [QGVAR(isSurrendering), false];
[_unit, true] call FUNC(setSurrendered);
};
} else {
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
[_unit, false] call FUNC(setHandcuffed);
};
[_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set);
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
[_unit, false] call FUNC(setSurrendered);
};
[_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set);
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
_oldUnit setVariable [QGVAR(isEscorting), false, true];
};
};

View File

@ -23,9 +23,9 @@ params ["_unit","_zeusIsOpen"];
if (!_zeusIsOpen) then {
if ((_unit getVariable [QGVAR(isHandcuffed), false]) || {_unit getVariable [QGVAR(isSurrendering), false]}) then {
TRACE_1("Player Change (showHUD false)",_unit);
showHUD false;
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
} else {
TRACE_1("Player Change (showHUD true)",_unit);
showHUD true;
["captive", []] call EFUNC(common,showHud); //same as showHud true;
};
};

View File

@ -0,0 +1,35 @@
/*
* Author: PabstMirror
* Module Function to make a unit handcuffed (can be called from editor)
*
* Arguments:
* 0: The Module Logic <OBJECT>
* 1: synced objects <ARRAY>
* 2: Activated <BOOL>
*
* Return Value:
* Nothing
*
* Example:
* Called from module
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic", "_units", "_activated"];
TRACE_3("params",_logic,_units,_activated);
if (!_activated) exitWith {};
if (!isServer) exitWith {};
//Modules run before postInit can instal the event handler, so we need to wait a little bit
[{
params ["_units"];
{
["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units;
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
deleteVehicle _logic;

View File

@ -1,9 +1,9 @@
/*
* Author: PabstMirror
* Module Function to make a unit surrender (can be called from editor, or placed with zeus)
* Module Function to make a unit surrender (can be called from editor)
*
* Arguments:
* 0: The Module Logic Object <OBJECT>
* 0: The Module Logic <OBJECT>
* 1: synced objects <ARRAY>
* 2: Activated <BOOL>
*
@ -17,20 +17,19 @@
*/
#include "script_component.hpp"
private ["_bisMouseOver", "_mouseOverObject"];
params ["_logic", "_units", "_activated"];
TRACE_3("params",_logic,_units,_activated);
if (!_activated) exitWith {};
if (!isServer) exitWith {};
if (local _logic) then {
//Modules run before postInit can instal the event handler, so we need to wait a little bit
[{
params ["_units"];
{
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units;
}, [_units], 0.05]call EFUNC(common,waitAndExecute);
//Modules run before postInit can instal the event handler, so we need to wait a little bit
[{
params ["_units"];
{
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units;
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
deleteVehicle _logic;
};
deleteVehicle _logic;

View File

@ -19,7 +19,7 @@
params ["_unit","_state"];
TRACE_2("params",_unit,_state);
if (!local _unit) exitwith {
if (!local _unit) exitWith {
ERROR("running setHandcuffed on remote unit");
};
if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith {
@ -28,7 +28,7 @@ if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith
if (_state) then {
_unit setVariable [QGVAR(isHandcuffed), true, true];
[_unit, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus);
[_unit, "setCaptive", QGVAR(Handcuffed), true] call EFUNC(common,statusEffect_set);
if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop
[_unit, false] call FUNC(setSurrendered);
@ -38,7 +38,7 @@ if (_state) then {
_unit setVariable [QGVAR(CargoIndex), ((vehicle _unit) getCargoIndex _unit), true];
if (_unit == ACE_player) then {
showHUD false;
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
};
// fix anim on mission start (should work on dedicated servers)
@ -56,8 +56,11 @@ if (_state) then {
//Adds an animation changed eh
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
private "_animChangedEHID";
private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
if (_animChangedEHID != -1) then {
TRACE_1("removing animChanged EH",_animChangedEHID);
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
};
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
params ["_unit", "_newAnimation"];
TRACE_2("AnimChanged",_unit,_newAnimation);
@ -67,7 +70,6 @@ if (_state) then {
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
};
} else {
_turretPath = [];
{
_x params ["_xUnit", "", "", "_xTurretPath"];
@ -87,11 +89,10 @@ if (_state) then {
}, [_unit], 0.01] call EFUNC(common,waitAndExecute);
} else {
_unit setVariable [QGVAR(isHandcuffed), false, true];
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
[_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set);
//remove AnimChanged EH
private "_animChangedEHID";
_animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
TRACE_1("removing animChanged EH",_animChangedEHID);
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
_unit setVariable [QGVAR(handcuffAnimEHID), -1];
@ -106,6 +107,9 @@ if (_state) then {
};
if (_unit == ACE_player) then {
showHUD true;
["captive", []] call EFUNC(common,showHud); //same as showHud true;
};
};
//Global Event after changes:
["CaptiveStatusChanged", [_unit, _state, "SetHandcuffed"]] call EFUNC(common,globalEvent);

View File

@ -19,7 +19,7 @@
params ["_unit","_state"];
TRACE_2("params",_unit,_state);
if (!local _unit) exitwith {
if (!local _unit) exitWith {
ERROR("running surrender on remote unit");
};
@ -33,10 +33,10 @@ if (_state) then {
_unit setVariable [QGVAR(isSurrendering), true, true];
[_unit, QGVAR(Surrendered), true] call EFUNC(common,setCaptivityStatus);
[_unit, "setCaptive", QGVAR(Surrendered), true] call EFUNC(common,statusEffect_set);
if (_unit == ACE_player) then {
showHUD false;
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
};
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
@ -48,7 +48,11 @@ if (_state) then {
if (_unit getVariable [QGVAR(isSurrendering), false] && {(vehicle _unit) == _unit}) then {
//Adds an animation changed eh
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
private "_animChangedEHID";
private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
if (_animChangedEHID != -1) then {
TRACE_1("removing animChanged EH",_animChangedEHID);
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
};
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
params ["_unit", "_newAnimation"];
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
@ -61,18 +65,17 @@ if (_state) then {
}, [_unit], 0.01] call EFUNC(common,waitAndExecute);
} else {
_unit setVariable [QGVAR(isSurrendering), false, true];
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
[_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set);
//remove AnimChanged EH
private "_animChangedEHID";
_animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
_unit setVariable [QGVAR(surrenderAnimEHID), -1];
if (_unit == ACE_player) then {
//only re-enable HUD if not handcuffed
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) then {
showHUD true;
["captive", []] call EFUNC(common,showHud); //same as showHud true;
};
};
@ -101,3 +104,6 @@ if (_state) then {
}, 0, [_unit, (ACE_time + 20)]] call CBA_fnc_addPerFrameHandler;
};
};
//Global Event after changes:
["CaptiveStatusChanged", [_unit, _state, "SetSurrendered"]] call EFUNC(common,globalEvent);

View File

@ -2,6 +2,9 @@
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_CAPTIVES
#define DEBUG_MODE_FULL

View File

@ -7,7 +7,7 @@
<Spanish>Tomar prisionero</Spanish>
<French>Capturer le prisonnier</French>
<Polish>Aresztuj</Polish>
<Czech>Zajmout Osobu</Czech>
<Czech>Zajmout osobu</Czech>
<Italian>Arresta il prigioniero</Italian>
<Portuguese>Tomar Prisioneiro</Portuguese>
<Hungarian>Foglyul ejtés</Hungarian>
@ -19,7 +19,7 @@
<Spanish>Liberar prisionero</Spanish>
<Polish>Wypuść więźnia</Polish>
<French>Libérer le prisonnier</French>
<Czech>Osvobodit Zajatce</Czech>
<Czech>Osvobodit zajatce</Czech>
<Italian>Libera il prigioniero</Italian>
<Portuguese>Libertar Prisioneiro</Portuguese>
<Hungarian>Fogoly szabadon engedése</Hungarian>
@ -31,7 +31,7 @@
<Spanish>Escoltar prisionero</Spanish>
<Polish>Eskortuj więźnia</Polish>
<French>Escorter le prisonnier</French>
<Czech>Eskortovat Zajatce</Czech>
<Czech>Eskortovat zajatce</Czech>
<Italian>Scorta il Prigioniero</Italian>
<Portuguese>Escoltar Prisioneiro</Portuguese>
<Hungarian>Fogoly kísérése</Hungarian>
@ -43,7 +43,7 @@
<Spanish>Soltar prisionero</Spanish>
<Polish>Anuluj eskortowanie</Polish>
<French>Relâcher le prisonnier</French>
<Czech>Uvolnit Zajatce</Czech>
<Czech>Uvolnit zajatce</Czech>
<Italian>Rilascia il Prigioniero</Italian>
<Portuguese>Largar Prisioneiro</Portuguese>
<Hungarian>Fogoly elengedése</Hungarian>
@ -91,7 +91,7 @@
<Polish>Opaska zaciskowa</Polish>
<Spanish>Precinto</Spanish>
<French>Serflex</French>
<Czech>Stahovací Pásek</Czech>
<Czech>Stahovací pásek</Czech>
<Portuguese>Algema Plástica</Portuguese>
<Italian>Fascietta</Italian>
<Hungarian>Gyorskötöző</Hungarian>
@ -99,7 +99,7 @@
</Key>
<Key ID="STR_ACE_Captives_CableTieDescription">
<English>Cable ties that allow you to restrain prisoners.</English>
<German>Kabelbinder ermöglichen es, Gefangene zu fesseln.</German>
<German>Mit Kabelbindern können Gefangene gefesselt werden.</German>
<Polish>Opaska zaciskowa pozwala na skrępowanie dłoni u więźnia.</Polish>
<Spanish>Los precintos permiten maniatar prisioneros</Spanish>
<French>Les Serflex permettent de menotter les prisonniers.</French>
@ -164,7 +164,9 @@
<German>Einheit kapitulieren lassen</German>
<Czech>Vzdávající se jednotka</Czech>
<Portuguese>Fazer unidade se render</Portuguese>
<French>Faire capituler l'unité</French>
<Hungarian>Egység kapitulálása</Hungarian>
<Russian>Заставить юнита сдаться</Russian>
</Key>
<Key ID="STR_ACE_Captives_ModuleSurrender_Description">
<English>Sync a unit to make them surrender.&lt;br /&gt;Source: ace_captives</English>
@ -173,7 +175,25 @@
<German>Einheit synchronisieren, um sie kapitulieren zu lassen.&lt;br /&gt;Quelle: ace_captives</German>
<Czech>Synchronizuj s jednotkou, která se má vzdát.&lt;br /&gt;Zdroj: ace_captives</Czech>
<Portuguese>Sincroniza uma unidade para fazer com que ela se renda. &lt;br/&gt;Fonte: ace_captives</Portuguese>
<French>Synchronise une unité pour la rendre captive. &lt;br/&gt;Source: ace_captives</French>
<Hungarian>Egység szinkronizálása, hogy kapituláljon.&lt;br /&gt;Forrás: ace_captives</Hungarian>
<Russian>Синхронизируйте с юнитами, чтобы заставить их сдаться в плен.&lt;br /&gt;Источник: ace_captives</Russian>
</Key>
<Key ID="STR_ACE_Captives_ModuleHandcuffed_DisplayName">
<English>Make Unit Handcuffed</English>
<German>Einheit in Handschellen legen</German>
<Polish>Skuj jednostkę</Polish>
<Portuguese>Fazer unidade algemada</Portuguese>
<Russian>Связать юнита</Russian>
<Czech>Spoutat jednotku</Czech>
</Key>
<Key ID="STR_ACE_Captives_ModuleHandcuffed_Description">
<English>Sync a unit to make them handcuffed.&lt;br /&gt;Source: ace_captives</English>
<German>Synchronisiere eine Einheit um sie in Handschellen zu legen.&lt;br /&gt;Quelle: ace_captives</German>
<Polish>Zsynchronizuj z jednostką, aby została skuta.&lt;br /&gt;Źródło: ace_captives</Polish>
<Portuguese>Sincronizar uma unidade para deixá-la algemada.&lt;br/&gt;Source: ace_captives</Portuguese>
<Russian>Синхронизируйте с юнитами, чтобы сделать их связанными.&lt;br /&gt;Источник: ace_captives</Russian>
<Czech>Synchronizovat s jednotkou, která má být v poutech.&lt;br /&gt;Zdroj: ace_captives</Czech>
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_DisplayName">
<English>Captives Settings</English>
@ -182,7 +202,9 @@
<Czech>Nastavení zajatce</Czech>
<German>Gefangenen-Einstellungen</German>
<Portuguese>Ajustes de prisioneiros</Portuguese>
<French>Options de capitulation</French>
<Hungarian>Fogoly-beállítások</Hungarian>
<Russian>Настройки пленения</Russian>
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_Description">
<English>Controls settings for surrender and cable ties</English>
@ -191,25 +213,31 @@
<Czech>Toto kontroluje nastavení kapitulace a pout</Czech>
<German>Einstellungen zur Kapitulation und Kabelbindern</German>
<Portuguese>Controla as configurações de rendição e abraçadeiras</Portuguese>
<French>Contrôle les paramètres de la rédition et des Serflex</French>
<Hungarian>Szabályozza a kapituláció és bilincselés beállításait</Hungarian>
<Russian>Управляет настройками сдачи в плен и связывания</Russian>
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_handcuffSide_name">
<English>Can handcuff own side</English>
<Polish>Skuwanie sojuszników</Polish>
<Spanish>Se puede esposar el bando propio</Spanish>
<Czech>Může spoutat spolubojovníky</Czech>
<German>Kann Teamkollegen fesseln</German>
<German>Kann Kameraden fesseln</German>
<Portuguese>Pode algemar o próprio lado</Portuguese>
<French>Peut libérer sa propre faction</French>
<Hungarian>Saját oldal megbilincselhető</Hungarian>
<Russian>Связать союзника</Russian>
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_handcuffSide_description">
<English>Can players cabletie units on their own side</English>
<Polish>Czy gracze mogą skuwać sojuszników?</Polish>
<Spanish>Pueden los jugadores esposar unidades en su propio bando</Spanish>
<Czech>Mohou hráči spoutat jednotky na své straně</Czech>
<German>Können Spieler eigene Einheiten fesseln</German>
<German>Spieler können eigene Einheiten fesseln. </German>
<Portuguese>Os jogadores podem algemar unidades do seu lado</Portuguese>
<French>Les joueurs peuvent utiliser les Serflex sur leur propre camp</French>
<Hungarian>A játékosok megkötözhetik-e a saját oldalukon lévő egységeket</Hungarian>
<Russian>Разрешить игрокам связывать юнитов своей стороны</Russian>
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_allowSurrender_name">
<English>Allow surrendering</English>
@ -218,32 +246,56 @@
<Czech>Povolit vzdávání</Czech>
<German>Kapitulation erlauben</German>
<Portuguese>Permite rendição</Portuguese>
<French>Permettre la capitulation</French>
<Hungarian>Kapituláció engedélyezése</Hungarian>
<Russian>Сдаться в плен</Russian>
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_allowSurrender_description">
<English>Players can surrender after holstering their weapon</English>
<Polish>Gracze mogą skapitulować po schowaniu swojej broni do kabury</Polish>
<Spanish>Los jugadores pueden rendirse después de enfundar su arma</Spanish>
<Czech>Hráč se může vzdát poté, co si skryje zbraň</Czech>
<German>Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben</German>
<German>Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben.</German>
<Portuguese>Jogadores podem se render depois de guardar sua arma</Portuguese>
<French>Les joueurs peuvent se rendre après avoir rangé leur arme</French>
<Hungarian>A játékosok megadhatják magukat a fegyverük elrakása után</Hungarian>
<Russian>Игроки могут сдаться в плен после того, как уберут оружие</Russian>
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrender_name">
<English>Require surrendering</English>
<German>Benötigt Kapitulation</German>
<Polish>Wymagaj kapitulacji</Polish>
<Portuguese>Requer rendição</Portuguese>
<Russian>Требовать пленения</Russian>
<Spanish>Requiere rendición</Spanish>
<Czech>Vzdávání vyžadováno</Czech>
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrender_description">
<English>Require Players to surrender before they can be arrested</English>
<German>Spieler müssen sich erst ergeben, bevor sie gefangen genommen werden können</German>
<Polish>Wymagaj od graczy kapitulacji zanim będzie można ich zaaresztować</Polish>
<Portuguese>Requer que jogadores se rendam antes de poderem ser presos</Portuguese>
<Russian>Требуется, чтобы игрок сдался в плен прежде, чем его можно будет связать</Russian>
<Spanish>Requiere que los Jugadores se rindan antes de arrestarlos</Spanish>
<Czech>Vyžaduje, aby se hráč nejdříve vzdal, poté může být spoután</Czech>
</Key>
<Key ID="STR_ACE_Captives_SurrenderOnly">
<English>Surrendering only</English>
<German>Nur Ergeben</German>
<Polish>Tylko kapitulacja</Polish>
<Portuguese>Somente rendição </Portuguese>
<Russian>Только сдавшийся в плен</Russian>
<Spanish>Solo rendición</Spanish>
<Czech>Pouze vzdávání</Czech>
</Key>
<Key ID="STR_ACE_Captives_SurrenderOrNoWeapon">
<English>Surrendering or No weapon</English>
<German>Ergeben oder keine Waffe</German>
<Polish>Kapitulacja lub brak broni</Polish>
<Portuguese>Rendição ou desarmado</Portuguese>
<Russian>Сдавшийся или безоружный</Russian>
<Spanish>Rendición o desarme</Spanish>
<Czech>Vzdávání nebo beze zbraně</Czech>
</Key>
</Package>
</Project>
</Project>

View File

@ -12,89 +12,84 @@ class Extended_PostInit_EventHandlers {
class Extended_Killed_EventHandlers {
class All {
init = QUOTE(call FUNC(handleDestroyed));
class ADDON {
serverKilled = QUOTE(call FUNC(handleDestroyed));
};
};
};
class Extended_Init_EventHandlers {
//Need initPost or we have problems with setVariable with 'ACE_Cargo'
class Extended_InitPost_EventHandlers {
class StaticWeapon {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class ReammoBox_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class Cargo_base_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class CargoNet_01_box_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class Land_CargoBox_V1_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class Land_PaperBox_closed_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class RoadCone_F {
class ADDON {
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
};
};
class Car {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Tank {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Helicopter {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Plane {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class Ship_F {
class ADDON {
init = QUOTE(_this call DFUNC(initVehicle));
};
};
class ACE_RepairItem_Base {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class ACE_bodyBagObject {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));
};
};
class ACE_ConcertinaWireCoil {
class ADDON {
init = QUOTE(_this call DFUNC(initObject));

View File

@ -1,5 +1,9 @@
class CfgVehicles {
class ACE_Module;
class Logic;
class Module_F: Logic {
class ModuleDescription;
};
class ACE_Module: Module_F {};
class ACE_moduleCargoSettings: ACE_Module {
scope = 2;
displayName = CSTRING(SettingsModule_DisplayName);
@ -8,8 +12,10 @@ class CfgVehicles {
function = QFUNC(moduleSettings);
functionPriority = 1;
isGlobal = 1;
isSingular = 1;
isTriggerActivated = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class enable {
displayName = CSTRING(ModuleSettings_enable);
@ -18,12 +24,39 @@ class CfgVehicles {
defaultValue = 1;
};
};
class ModuleDescription {
description = CSTRING(SettingsModule_Description);
sync[] = {};
};
};
class GVAR(makeLoadable): ACE_Module {
scope = 2;
displayName = CSTRING(makeLoadable_displayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_makeLoadable_ca.paa));
category = "ACE_Logistics";
function = QFUNC(moduleMakeLoadable);
isGlobal = 1;
isTriggerActivated = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class canLoad {
displayName = CSTRING(makeLoadable_displayName);
description = CSTRING(MakeLoadable_description);
typeName = "BOOL";
defaultValue = 1;
};
class setSize {
displayName = CSTRING(makeLoadable_setSize_displayName);
typeName = "NUMBER";
defaultValue = 1;
};
};
class ModuleDescription: ModuleDescription {
description = CSTRING(module_MakeLoadable_description);
sync[] = {"AnyStaticObject"};
};
};
class LandVehicle;
class Car: LandVehicle {
@ -39,6 +72,7 @@ class CfgVehicles {
};*/
};
};
class Tank: LandVehicle {
GVAR(space) = 4;
GVAR(hasCargo) = 1;
@ -50,27 +84,161 @@ class CfgVehicles {
GVAR(hasCargo) = 1;
};
// hemets
class Truck_01_base_F: Truck_F {
GVAR(space) = 8;
};
class B_Truck_01_transport_F: Truck_01_base_F {
GVAR(space) = 20;
};
class B_Truck_01_covered_F: B_Truck_01_transport_F {
GVAR(space) = 20;
};
class B_Truck_01_mover_F: B_Truck_01_transport_F {
GVAR(space) = 4;
};
class B_Truck_01_box_F: B_Truck_01_mover_F {
GVAR(space) = 40;
};
class B_Truck_01_Repair_F: B_Truck_01_mover_F {
GVAR(space) = 20;
};
class B_Truck_01_ammo_F: B_Truck_01_mover_F {
GVAR(space) = 8;
};
class B_Truck_01_fuel_F: B_Truck_01_mover_F {
GVAR(space) = 4;
};
class B_Truck_01_medical_F: B_Truck_01_transport_F {
GVAR(space) = 8;
};
// kamaz'
class Truck_02_base_F: Truck_F { //covers "covered" variants
GVAR(space) = 20;
};
class Truck_02_transport_base_F: Truck_02_base_F {
GVAR(space) = 20;
};
class Truck_02_box_base_F: Truck_02_base_F { // repair variant, not actually cargo box like hemet
GVAR(space) = 12;
};
class Truck_02_medical_base_F: Truck_02_box_base_F {
GVAR(space) = 8;
};
class Truck_02_Ammo_base_F: Truck_02_base_F {
GVAR(space) = 12;
};
class Truck_02_fuel_base_F: Truck_02_base_F {
GVAR(space) = 4;
};
// typhoon
class Truck_03_base_F: Truck_F {
GVAR(space) = 8;
};
class O_Truck_03_transport_F: Truck_03_base_F {
GVAR(space) = 20;
};
class O_Truck_03_covered_F: Truck_03_base_F {
GVAR(space) = 20;
};
class O_Truck_03_repair_F: Truck_03_base_F {
GVAR(space) = 12;
};
class O_Truck_03_ammo_F: Truck_03_base_F {
GVAR(space) = 8;
};
class O_Truck_03_fuel_F: Truck_03_base_F {
GVAR(space) = 4;
};
class O_Truck_03_medical_F: Truck_03_base_F {
GVAR(space) = 8;
};
class O_Truck_03_device_F: Truck_03_base_F {
GVAR(space) = 4;
};
// civ trucks
class Van_01_base_F: Truck_F {
GVAR(space) = 8;
};
class Van_01_transport_base_F: Van_01_base_F {
GVAR(space) = 8;
};
class Van_01_box_base_F: Van_01_base_F { // repair variant, not actually cargo box like hemet
GVAR(space) = 12;
};
class Van_01_fuel_base_F: Van_01_base_F {
GVAR(space) = 4;
};
// misc. vehicles
class Quadbike_01_base_F: Car_F {
GVAR(space) = 0;
GVAR(hasCargo) = 0;
};
class Kart_01_Base_F: Car_F {
GVAR(space) = 0;
GVAR(hasCargo) = 0;
};
// helicopters
class Air;
class Helicopter: Air {
GVAR(space) = 8;
GVAR(hasCargo) = 1;
};
class Heli_Transport_02_base_F;
class I_Heli_Transport_02_F : Heli_Transport_02_base_F {
GVAR(space) = 20;
GVAR(hasCargo) = 1;
};
// jets
class Plane: Air {
GVAR(space) = 4;
GVAR(hasCargo) = 1;
GVAR(space) = 0;
GVAR(hasCargo) = 0;
};
// autonomus
class Helicopter_Base_F;
class UAV_01_base_F: Helicopter_Base_F {
GVAR(space) = 0;
GVAR(hasCargo) = 0;
};
// boats
class Ship;
class Ship_F: Ship {
GVAR(space) = 4;
GVAR(hasCargo) = 1;
};
class Boat_Civil_01_base_F: Ship_F {
GVAR(space) = 4;
GVAR(hasCargo) = 1;
};
class Boat_F: Ship_F {};
class Rubber_duck_base_F: Boat_F {
GVAR(space) = 0;
GVAR(hasCargo) = 0;
};
class Boat_Armed_01_base_F: Boat_F {
GVAR(space) = 8;
GVAR(hasCargo) = 1;
};
// submarines
class SDV_01_base_F: Boat_F {
GVAR(space) = 0;
GVAR(hasCargo) = 0;
};
// Static weapons
class StaticWeapon: LandVehicle {
GVAR(size) = 2; // 1 = small, 2 = large
@ -89,6 +257,26 @@ class CfgVehicles {
GVAR(size) = 2; // 1 = small, 2 = large
GVAR(canLoad) = 1;
};
//"Supply Box" - Small Pallets
class B_supplyCrate_F: ReammoBox_F {
GVAR(size) = 6;
};
class IG_supplyCrate_F: ReammoBox_F {
GVAR(size) = 6;
};
class C_supplyCrate_F: ReammoBox_F {
GVAR(size) = 6;
};
// objects
class RoadCone_F: ThingX {
GVAR(size) = 1;
GVAR(canLoad) = 1;
};
class RoadBarrier_F: RoadCone_F {
GVAR(size) = 2;
};
class Scrapyard_base_F;
class Land_PaperBox_closed_F: Scrapyard_base_F {
@ -97,6 +285,7 @@ class CfgVehicles {
GVAR(size) = 11;
GVAR(canLoad) = 1;
XEH_ENABLED;
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
@ -114,6 +303,7 @@ class CfgVehicles {
GVAR(hasCargo) = 1;
GVAR(size) = 4;
GVAR(canLoad) = 1;
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
@ -165,12 +355,14 @@ class CfgVehicles {
GVAR(size) = 50;
XEH_ENABLED;
};
class Ruins_F;
class Land_Cargo20_military_ruins_F: Ruins_F {
GVAR(space) = 49;
GVAR(size) = 50;
XEH_ENABLED;
};
class Land_Cargo20_orange_F: Cargo_base_F {
GVAR(space) = 49;
GVAR(size) = 50;
@ -202,7 +394,6 @@ class CfgVehicles {
XEH_ENABLED;
};
class Land_Cargo40_blue_F: Cargo_base_F {
GVAR(space) = 99;
GVAR(size) = 100;
@ -238,11 +429,13 @@ class CfgVehicles {
GVAR(size) = 100;
XEH_ENABLED;
};
class Land_Cargo40_military_ruins_F: Ruins_F {
GVAR(space) = 99;
GVAR(size) = 100;
XEH_ENABLED;
};
class Land_Cargo40_orange_F: Cargo_base_F {
GVAR(space) = 99;
GVAR(size) = 100;
@ -273,12 +466,14 @@ class CfgVehicles {
GVAR(size) = 100;
XEH_ENABLED;
};
// small
class Land_CargoBox_V1_F: ThingX {
GVAR(space) = 7;
GVAR(hasCargo) = 1;
GVAR(size) = 7;
XEH_ENABLED;
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
@ -289,6 +484,5 @@ class CfgVehicles {
selection = "";
};
};
};
};
};

Binary file not shown.

View File

@ -1,5 +1,45 @@
#include "script_component.hpp"
["LoadCargo", {_this call FUNC(loadItem)}] call EFUNC(common,addEventHandler);
["UnloadCargo", {_this call FUNC(unloadItem)}] call EFUNC(common,addEventHandler);
["AddCargoByClass", {_this call FUNC(addCargoItem)}] call EFUNC(common,addEventHandler);
["LoadCargo", {
(_this select 0) params ["_item","_vehicle"];
TRACE_2("LoadCargo EH",_item,_vehicle);
private _loaded = [_item, _vehicle] call FUNC(loadItem);
// Show hint as feedback
private _hint = [LSTRING(LoadingFailed), LSTRING(LoadedItem)] select _loaded;
private _itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
if (_loaded) then {
// Invoke listenable event
["cargoLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
};
}] call EFUNC(common,addEventHandler);
["UnloadCargo", {
(_this select 0) params ["_item","_vehicle", ["_unloader", objNull]];
TRACE_3("UnloadCargo EH",_item,_vehicle,_unloader);
private _unloaded = [_item, _vehicle, _unloader] call FUNC(unloadItem); //returns true if sucessful
private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
// Show hint as feedback
private _hint = [LSTRING(UnloadingFailed), LSTRING(UnloadedItem)] select _unloaded;
private _itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
if (_unloaded) then {
// Invoke listenable event
["cargoUnloaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
};
// TOOO maybe drag/carry the unloaded item?
}] call EFUNC(common,addEventHandler);

View File

@ -13,6 +13,8 @@ PREP(handleDestroyed);
PREP(initObject);
PREP(initVehicle);
PREP(loadItem);
PREP(makeLoadable);
PREP(moduleMakeLoadable);
PREP(moduleSettings);
PREP(onMenuOpen);
PREP(startLoadIn);
@ -21,5 +23,6 @@ PREP(unloadItem);
PREP(validateCargoSpace);
GVAR(initializedItemClasses) = [];
GVAR(initializedVehicleClasses) = [];
ADDON = true;

View File

@ -6,6 +6,7 @@
* 0: Item Classname <STRING>
* 1: Vehicle <OBJECT>
* 2: Amount <NUMBER> (default: 1)
* 3: Show Hint <BOOL> (default: false)
*
* Return Value:
* None
@ -17,22 +18,12 @@
*/
#include "script_component.hpp"
private ["_position", "_item", "_i"];
params ["_itemClass", "_vehicle", ["_amount", 1]];
params ["_itemClass", "_vehicle", ["_amount", 1], ["_showHint", false, [false]]];
TRACE_3("params",_itemClass,_vehicle,_amount);
_position = getPos _vehicle;
_position set [1, (_position select 1) + 1];
_position set [2, (_position select 2) + 7.5];
for "_i" from 1 to _amount do {
_item = createVehicle [_itemClass, _position, [], 0, "CAN_COLLIDE"];
// Load item or delete it if no space left
if !([_item, _vehicle] call FUNC(loadItem)) exitWith {
deleteVehicle _item;
};
// Invoke listenable event
["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent);
[_itemClass, _vehicle] call FUNC(loadItem);
};
// Invoke listenable event
["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent);

View File

@ -17,11 +17,11 @@
#include "script_component.hpp"
params ["_player", "_object"];
TRACE_2("params",_player,_object);
if (!([_player, _object, []] call EFUNC(common,canInteractWith))) exitWith {false};
private ["_nearestVehicle"];
_nearestVehicle = [_player] call FUNC(findNearestVehicle);
private _nearestVehicle = [_player] call FUNC(findNearestVehicle);
if (_nearestVehicle isKindOf "Cargo_Base_F" || isNull _nearestVehicle) then {
{
@ -31,4 +31,6 @@ if (_nearestVehicle isKindOf "Cargo_Base_F" || isNull _nearestVehicle) then {
if (isNull _nearestVehicle) exitWith {false};
if ((locked _nearestVehicle) >= 2) exitWith {false};
[_object, _nearestVehicle] call FUNC(canLoadItemIn)

View File

@ -3,7 +3,7 @@
* Check if item can be loaded into other Object.
*
* Arguments:
* 0: Item Object <OBJECT>
* 0: Item <OBJECT or STRING>
* 1: Holder Object (Vehicle) <OBJECT>
*
* Return value:
@ -16,14 +16,23 @@
*/
#include "script_component.hpp"
params ["_item", "_vehicle"];
params [["_item", "", [objNull,""]], "_vehicle"];
if (speed _vehicle > 1 || (((getPos _vehicle) select 2) > 3)) exitWith {false};
if (speed _vehicle > 1 || {((getPos _vehicle) select 2) > 3}) exitWith {TRACE_1("vehicle not stable",_vehicle); false};
private "_itemSize";
_itemSize = ([_item] call FUNC(getSizeItem));
private _itemSize = [_item] call FUNC(getSizeItem);
private _validItem = false;
if (_item isEqualType "") then {
_validItem =
isClass (configFile >> "CfgVehicles" >> _item) &&
{getNumber (configFile >> "CfgVehicles" >> _item >> QGVAR(canLoad)) == 1};
} else {
_validItem =
(alive _item) &&
{(_item distance _vehicle) <= MAX_LOAD_DISTANCE};
};
(_itemSize > 0) &&
{alive _item && alive _vehicle} &&
{(_item distance _vehicle <= MAX_LOAD_DISTANCE)} &&
_validItem &&
{_itemSize > 0} &&
{alive _vehicle} &&
{_itemSize <= ([_vehicle] call FUNC(getCargoSpaceLeft))}

View File

@ -5,6 +5,7 @@
* Arguments:
* 0: loaded Object <OBJECT>
* 1: Object <OBJECT>
* 2: Unloader (player) <OPTIONAL><OBJECT>
*
* Return value:
* Can be unloaded <BOOL>
@ -16,29 +17,14 @@
*/
#include "script_component.hpp"
private ["_loaded", "_validVehiclestate", "_emptyPos"];
params ["_item", "_vehicle", ["_unloader", objNull]];
TRACE_2("params",_item,_vehicle);
params ["_item", "_vehicle"];
_loaded = _vehicle getVariable [QGVAR(loaded), []];
private _loaded = _vehicle getVariable [QGVAR(loaded), []];
if !(_item in _loaded) exitWith {false};
_validVehiclestate = true;
_emptyPos = [];
if (_vehicle isKindOf "Ship" ) then {
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); // TODO: if spot is underwater pick another spot.
} else {
if (_vehicle isKindOf "Air" ) then {
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false};
_emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition);
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
} else {
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]);
};
};
private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
if (!_validVehiclestate) exitWith {false};
private _emptyPos = [_vehicle, _itemClass, _unloader] call EFUNC(common,findUnloadPosition);
(count _emptyPos != 0)
(count _emptyPos) == 3

View File

@ -15,23 +15,21 @@
*/
#include "script_component.hpp"
private ["_loadCar", "_loadHelicopter", "_loadTank", "_loadShip", "_loadContainer"];
params ["_unit"];
_loadCar = nearestObject [_unit, "car"];
private _loadCar = nearestObject [_unit, "car"];
if (_unit distance _loadCar <= MAX_LOAD_DISTANCE) exitWith {_loadCar};
_loadHelicopter = nearestObject [_unit, "air"];
private _loadHelicopter = nearestObject [_unit, "air"];
if (_unit distance _loadHelicopter <= MAX_LOAD_DISTANCE) exitWith {_loadHelicopter};
_loadTank = nearestObject [_unit, "tank"];
private _loadTank = nearestObject [_unit, "tank"];
if (_unit distance _loadTank <= MAX_LOAD_DISTANCE) exitWith {_loadTank};
_loadShip = nearestObject [_unit, "ship"];
private _loadShip = nearestObject [_unit, "ship"];
if (_unit distance _loadShip <= MAX_LOAD_DISTANCE) exitWith {_loadShip};
_loadContainer = nearestObject [_unit,"Cargo_base_F"];
private _loadContainer = nearestObject [_unit,"Cargo_base_F"];
if (_unit distance _loadContainer <= MAX_LOAD_DISTANCE) exitWith {_loadContainer};
objNull

View File

@ -16,5 +16,6 @@
#include "script_component.hpp"
params ["_object"];
// TRACE_1("params",_object);
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _object >> QGVAR(space))]
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]

View File

@ -3,7 +3,7 @@
* Get the cargo size of an object.
*
* Arguments:
* 0: Object <OBJECT>
* 0: Item <OBJECT or STRING>
*
* Return value:
* Cargo size <NUMBER> (default: -1)
@ -15,14 +15,25 @@
*/
#include "script_component.hpp"
private "_config";
params ["_item"];
_config = (configFile >> "CfgVehicles" >> typeOf _item >> QGVAR(size));
scopeName "return";
if (isNumber (_config)) exitWith {
_item getVariable [QGVAR(size), getNumber (_config)]
private _isVirtual = (_item isEqualType "");
private _itemClass = if (_isVirtual) then {_item} else {typeOf _item};
private _config = (configFile >> "CfgVehicles" >> _itemClass >> QGVAR(size));
if (_isVirtual) then {
if (isNumber _config) then {
(getNumber _config) breakOut "return";
};
} else {
if (!isNil {_item getVariable QGVAR(size)}) then {
(_item getVariable QGVAR(size)) breakOut "return";
};
if (isNumber _config) then {
(getNumber _config) breakOut "return";
};
};
-1

View File

@ -1,6 +1,6 @@
/*
* Author: Glowbal
* Handle object being destroyed.
* Handle object being destroyed. Only runs on server.
*
* Arguments:
* 0: Object <OBJECT>
@ -16,16 +16,17 @@
#include "script_component.hpp"
params ["_vehicle"];
TRACE_1("params",_vehicle);
private["_loaded"];
_loaded = _vehicle getVariable [QGVAR(loaded), []];
if (count _loaded == 0) exitWith {};
private _loaded = _vehicle getVariable [QGVAR(loaded), []];
if (_loaded isEqualTo []) exitWith {};
{
// TODO deleteVehicle or just delete vehicle? Do we want to be able to recover destroyed equipment?
deleteVehicle _x;
//_x setDamage 1;
// TODO Do we want to be able to recover destroyed equipment?
if (_x isEqualType objNull) then {
deleteVehicle _x;
};
nil
} count _loaded;
[_vehicle] call FUNC(validateCargoSpace);

View File

@ -16,15 +16,31 @@
#include "script_component.hpp"
params ["_object"];
private _type = typeOf _object;
TRACE_2("params",_object,_type);
if (getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(canLoad)) != 1) exitWith {};
private ["_type", "_action"];
_type = typeOf _object;
if ((_object getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad))]) != 1) exitWith {};
// do nothing if the class is already initialized
if (_type in GVAR(initializedItemClasses)) exitWith {};
GVAR(initializedItemClasses) pushBack _type;
_action = [QGVAR(load), localize LSTRING(loadObject), QUOTE(PATHTOF(UI\Icon_load.paa)), {[_player, _target] call FUNC(startLoadIn)}, {GVAR(enable) && {[_player, _target] call FUNC(canLoad)}}] call EFUNC(interact_menu,createAction);
TRACE_1("Adding load cargo action to class", _type);
private _condition = {
GVAR(enable) &&
{(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad))]) == 1} &&
{locked _target < 2} &&
{alive _target} &&
{[_player, _target, []] call EFUNC(common,canInteractWith)}
};
private _statement = {
params ["_target", "_player"];
[_player, _target] call FUNC(startLoadIn);
};
private _text = localize LSTRING(loadObject);
private _icon = QUOTE(PATHTOF(UI\Icon_load.paa));
private _action = [QGVAR(load), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction);
[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass);

View File

@ -18,34 +18,39 @@
params ["_vehicle"];
TRACE_1("params", _vehicle);
private ["_type", "_initializedClasses"];
_type = typeOf _vehicle;
_initializedClasses = GETMVAR(GVAR(initializedClasses),[]);
private _type = typeOf _vehicle;
if (isServer) then {
{
if (isClass _x) then {
["AddCargoByClass", [getText (_x >> "type"), _vehicle, getNumber (_x >> "amount")]] call EFUNC(common,localEvent);
private ["_cargoClassname", "_cargoCount"];
_cargoClassname = getText (_x >> "type");
_cargoCount = getNumber (_x >> "amount");
TRACE_3("adding ACE_Cargo", (configName _x), _cargoClassname, _cargoCount);
["AddCargoByClass", [_cargoClassname, _vehicle, _cargoCount]] call EFUNC(common,localEvent);
};
} count ("true" configClasses (configFile >> "CfgVehicles" >> _type >> "ACE_Cargo" >> "Cargo"));
};
// do nothing if the class is already initialized
if (_type in _initializedClasses) exitWith {};
if (_type in GVAR(initializedVehicleClasses)) exitWith {};
// set class as initialized
_initializedClasses pushBack _type;
SETMVAR(GVAR(initializedClasses),_initializedClasses);
GVAR(initializedVehicleClasses) pushBack _type;
if (!hasInterface) exitWith {};
if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
private ["_text", "_condition", "_statement", "_icon", "_action"];
_condition = {
params ["_target", "_player"];
GVAR(enable) && {[_player, _target, []] call EFUNC(common,canInteractWith)}
};
_text = localize LSTRING(openMenu);
_statement = {GVAR(interactionVehicle) = _target; createDialog QGVAR(menu);};
_icon = "";
TRACE_1("Adding unload cargo action to class", _type);
_action = [QGVAR(openMenu), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction);
private _condition = {
GVAR(enable) && {locked _target < 2} && {alive _target} && {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)}
};
private _statement = {
GVAR(interactionVehicle) = _target;
createDialog QGVAR(menu);
};
private _text = localize LSTRING(openMenu);
private _icon = "";
private _action = [QGVAR(openMenu), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction);
[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass);

View File

@ -1,9 +1,10 @@
/*
* Author: Glowbal
* Load object into vehicle.
* Objects loaded via classname remain virtual until unloaded.
*
* Arguments:
* 0: Object <OBJECT>
* 0: Item <OBJECT or STRING>
* 1: Vehicle <OBJECT>
*
* Return value:
@ -16,25 +17,25 @@
*/
#include "script_component.hpp"
private ["_loaded", "_space", "_itemSize"];
params [["_item","",[objNull,""]], ["_vehicle",objNull,[objNull]]];
TRACE_2("params",_item,_vehicle);
params ["_item", "_vehicle"];
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {TRACE_2("cannot load",_item,_vehicle); false};
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false};
_loaded = _vehicle getVariable [QGVAR(loaded), []];
_loaded pushback _item;
private _loaded = _vehicle getVariable [QGVAR(loaded), []];
_loaded pushBack _item;
_vehicle setVariable [QGVAR(loaded), _loaded, true];
_space = [_vehicle] call FUNC(getCargoSpaceLeft);
_itemSize = [_item] call FUNC(getSizeItem);
TRACE_1("added to loaded array",_loaded);
private _space = [_vehicle] call FUNC(getCargoSpaceLeft);
private _itemSize = [_item] call FUNC(getSizeItem);
_vehicle setVariable [QGVAR(space), _space - _itemSize, true];
detach _item;
_item attachTo [_vehicle,[0,0,100]];
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
// Invoke listenable event
["cargoLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
if (_item isEqualType objNull) then {
detach _item;
_item attachTo [_vehicle,[0,0,-100]];
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
};
true

View File

@ -0,0 +1,47 @@
/*
* Author: PabstMirror
* Makes any object loadable. Needs to be called on all machines.
*
* Arguments:
* 0: Object <OBJECT>
* 1: Set as loadable (default: true) <BOOL><SCALAR>
* 2: Size. (default: 1) <NUMBER>
*
* Return value:
* None
*
* Example:
* [cursorTarget, true, 1] call ace_cargo_fnc_makeLoadable
*
* Public: Yes
*/
#include "script_component.hpp"
params [["_object", objNull, [objNull]], ["_canLoad", true, [false, 0]], ["_setSize", 1, [0]]];
TRACE_3("params",_object,_canLoad,_setSize);
if (isNull _object) exitWith {TRACE_1("null",_object);};
private _type = typeOf _object;
private _cfgCanLoad = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad));
private _curSize = [_object] call FUNC(getSizeItem);
_canLoad = [0, 1] select _canLoad; //convert true/false to scalar
if ((_canLoad == 1) && {_setSize <= 0}) exitWith {
ACE_LOGERROR("ace_cargo_fnc_makeLoadable (size <= 0) when making loadable");
};
TRACE_2("setVar if different from config",_canLoad,_cfgCanLoad);
if (_canLoad != _cfgCanLoad) then {
_object setVariable [QGVAR(canLoad), _canLoad];
};
TRACE_2("setVar if different from config",_setSize,_curSize);
if (_setSize != _curSize) then {
_object setVariable [QGVAR(size), _setSize];
};
//Add the load actions to the object class if not already added
[_object] call FUNC(initObject);
nil

View File

@ -0,0 +1,34 @@
/*
* Author: PabstMirror
* Module to make an object loadable.
*
* Arguments:
* 0: The module logic <OBJECT>
* 1: Synchronized units <ARRAY>
* 2: Activated <BOOL>
*
* Return Value:
* None
*
* Example:
* [logic, [box], true] call ace_cargo_fnc_moduleMakeLoadable
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic", "_objects", "_activated"];
TRACE_3("params",_logic,_objects,_activated);
if ((isNull _logic) || {!_activated}) exitWith {};
if (_objects isEqualTo []) exitWith {
ACE_LOGWARNING_1("ace_cargo_fnc_moduleMakeLoadable has no synced objects [%1]", _logic);
};
private _canLoad = _logic getVariable ["canLoad", true];
private _setSize = _logic getVariable ["setSize", 1];
TRACE_2("settings",_canLoad,_setSize);
{
[_x, _canLoad, _setSize] call FUNC(makeLoadable);
} forEach _objects;

View File

@ -19,10 +19,10 @@
if (!isServer) exitWith {};
params ["_logic", "_units", "_activated"];
params ["_logic", "", "_activated"];
if (!_activated) exitWith {};
[_logic, QGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule);
diag_log text "[ACE]: Cargo Module Initialized.";
ACE_LOGINFO("Cargo Module Initialized.");

View File

@ -22,25 +22,25 @@ params ["_display"];
uiNamespace setVariable [QGVAR(menuDisplay), _display];
[{
private ["_display","_loaded", "_ctrl", "_label"];
disableSerialization;
_display = uiNamespace getVariable QGVAR(menuDisplay);
private _display = uiNamespace getVariable QGVAR(menuDisplay);
if (isnil "_display") exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
if (isNull GVAR(interactionVehicle) || ACE_player distance GVAR(interactionVehicle) >= 10) exitWith {
if (isNull GVAR(interactionVehicle) || {ACE_player distance GVAR(interactionVehicle) >= 10}) exitWith {
closeDialog 0;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
_loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
_ctrl = _display displayCtrl 100;
_label = _display displayCtrl 2;
private _loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
private _ctrl = _display displayCtrl 100;
private _label = _display displayCtrl 2;
lbClear _ctrl;
{
_ctrl lbAdd (getText(configfile >> "CfgVehicles" >> typeOf _x >> "displayName"));
private _class = if (_x isEqualType "") then {_x} else {typeOf _x};
_ctrl lbAdd (getText(configfile >> "CfgVehicles" >> _class >> "displayName"));
true
} count _loaded;

View File

@ -3,29 +3,46 @@
* Start load item.
*
* Arguments:
* 0: Object <OBJECT>
* 0: Player <OBJECT>
* 1: Object <OBJECT>
*
* Return value:
* Object loaded <BOOL>
* Load ProgressBar Started <BOOL>
*
* Example:
* [object] call ace_cargo_fnc_starLoadIn
* [player, cursorTarget] call ace_cargo_fnc_startLoadIn
*
* Public: No
*/
#include "script_component.hpp"
params ["_player", "_object"];
TRACE_2("params",_player,_object);
private ["_nearestVehicle"];
_nearestVehicle = [_player] call FUNC(findNearestVehicle);
private _vehicle = [_player] call FUNC(findNearestVehicle);
if (isNull _nearestVehicle || _nearestVehicle isKindOf "Cargo_Base_F") then {
if ((isNull _vehicle) || {_vehicle isKindOf "Cargo_Base_F"}) then {
{
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_nearestVehicle = _x};
} foreach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x};
} forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
};
if (isNull _nearestVehicle) exitWith {false};
if (isNull _vehicle) exitWith {
TRACE_3("Could not find vehicle",_player,_object,_vehicle);
false
};
[_object, _nearestVehicle] call FUNC(loadItem)
private _return = false;
// Start progress bar
if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
private _size = [_object] call FUNC(getSizeItem);
[5 * _size, [_object,_vehicle], "LoadCargo", {}, localize LSTRING(LoadingItem)] call EFUNC(common,progressBar);
_return = true;
} else {
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName");
["displayTextStructured", [[LSTRING(LoadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
};
_return

View File

@ -15,21 +15,29 @@
*/
#include "script_component.hpp"
private ["_display", "_loaded", "_ctrl", "_selected", "_item"];
disableSerialization;
_display = uiNamespace getVariable QGVAR(menuDisplay);
if (isnil "_display") exitWith {};
private _display = uiNamespace getVariable QGVAR(menuDisplay);
if (isNil "_display") exitWith {};
_loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
if (count _loaded == 0) exitWith {};
private _loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
if (_loaded isEqualTo []) exitWith {};
_ctrl = _display displayCtrl 100;
private _ctrl = _display displayCtrl 100;
_selected = (lbCurSel _ctrl) max 0;
private _selected = (lbCurSel _ctrl) max 0;
if (count _loaded <= _selected) exitWith {};
_item = _loaded select _selected;
private _item = _loaded select _selected; //This can be an object or a classname string
[_item, GVAR(interactionVehicle)] call FUNC(unloadItem);
// Start progress bar
if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then {
private _size = [_item] call FUNC(getSizeItem);
[5 * _size, [_item, GVAR(interactionVehicle), ACE_player], "UnloadCargo", {}, localize LSTRING(UnloadingItem), {true}, ["isNotSwimming"]] call EFUNC(common,progressBar);
} else {
private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
private _displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
["displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
};

View File

@ -3,7 +3,7 @@
* Unload object from vehicle.
*
* Arguments:
* 0: Object <OBJECT>
* 0: Item <OBJECT or STRING>
* 1: Vehicle <OBJECT>
*
* Return value:
@ -16,53 +16,45 @@
*/
#include "script_component.hpp"
private ["_loaded", "_space", "_itemSize", "_emptyPos", "_validVehiclestate"];
params ["_item", "_vehicle", ["_unloader", objNull]];
TRACE_3("params",_item,_vehicle,_unloader);
params ["_item", "_vehicle"];
private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
if !([_item, _vehicle] call FUNC(canUnloadItem)) exitWith {
//This covers testing vehicle stability and finding a safe position
private _emptyPosAGL = [_vehicle, _itemClass, _unloader] call EFUNC(common,findUnloadPosition);
TRACE_1("findUnloadPosition",_emptyPosAGL);
if ((count _emptyPosAGL) != 3) exitWith {
TRACE_4("Could not find unload pos",_vehicle,getPosASL _vehicle,isTouchingGround _vehicle,speed _vehicle);
if ((!isNull _unloader) && {_unloader == ACE_player}) then {
//display text saying there are no safe places to exit the vehicle
["displayTextStructured", [localize ELSTRING(common,NoRoomToUnload)]] call EFUNC(common,localEvent);
};
false
};
_validVehiclestate = true;
_emptyPos = [];
if (_vehicle isKindOf "Ship" ) then {
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
TRACE_1("SHIP Ground Check", getPosATL _vehicle );
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); // TODO: if spot is underwater pick another spot.
} else {
if (_vehicle isKindOf "Air" ) then {
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false};
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
_emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition);
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
} else {
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeOf _item]);
};
private _loaded = _vehicle getVariable [QGVAR(loaded), []];
if !(_item in _loaded) exitWith {
ACE_LOGERROR_3("Tried to unload item [%1] not in vehicle[%2] cargo[%3]", _item, _vehicle, _loaded);
false
};
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
if (!_validVehiclestate) exitWith {false};
if (count _emptyPos == 0) exitWith {false}; //consider displaying text saying there are no safe places to exit the vehicle
_loaded = _vehicle getVariable [QGVAR(loaded), []];
_loaded = _loaded - [_item];
_loaded deleteAt (_loaded find _item);
_vehicle setVariable [QGVAR(loaded), _loaded, true];
_space = [_vehicle] call FUNC(getCargoSpaceLeft);
_itemSize = [_item] call FUNC(getSizeItem);
private _space = [_vehicle] call FUNC(getCargoSpaceLeft);
private _itemSize = [_item] call FUNC(getSizeItem);
_vehicle setVariable [QGVAR(space), (_space + _itemSize), true];
detach _item;
_item setPosASL (_emptyPos call EFUNC(common,PositiontoASL));
["hideObjectGlobal", [_item, false]] call EFUNC(common,serverEvent);
// TOOO maybe drag/carry the unloaded item?
// Invoke listenable event
["cargoUnloaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
if (_item isEqualType objNull) then {
detach _item;
_item setPosASL (AGLtoASL _emptyPosAGL);
["hideObjectGlobal", [_item, false]] call EFUNC(common,serverEvent);
} else {
private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, ""];
_newItem setPosASL (AGLtoASL _emptyPosAGL);
};
true

View File

@ -15,16 +15,15 @@
*/
#include "script_component.hpp"
private ["_loaded", "_newLoaded", "_totalSpaceOccupied"];
params ["_vehicle"];
TRACE_1("params",_vehicle);
_loaded = _vehicle getVariable [QGVAR(loaded), []];
private _loaded = _vehicle getVariable [QGVAR(loaded), []];
_newLoaded = [];
_totalSpaceOccupied = 0;
private _newLoaded = [];
private _totalSpaceOccupied = 0;
{
if !(isNull _x) then {
if ((_x isEqualType "") || {!isNull _x}) then {
_newLoaded pushback _x;
_totalSpaceOccupied = _totalSpaceOccupied + ([_x] call FUNC(getSizeItem));
};
@ -35,4 +34,4 @@ if (count _loaded != count _newLoaded) then {
_vehicle setVariable [QGVAR(loaded), _newLoaded, true];
};
_vehicle setVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true];
_vehicle setVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true];

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