More Privates

This commit is contained in:
PabstMirror 2015-04-17 22:40:37 -05:00
parent ed2e847247
commit caef5c105f
24 changed files with 35 additions and 26 deletions

View File

@ -56,6 +56,7 @@ FUNC(CheckGlasses) = {
};
player addEventHandler ["Explosion", {
private "_effects";
if (alive ace_player) then {
call FUNC(ApplyDirtEffect);
if (GETBROKEN) exitWith {};

View File

@ -16,7 +16,7 @@
#include "script_component.hpp"
if (cameraOn != ace_player || {call FUNC(externalCamera)}) exitWith{false};
private "_dirtImage";
private ["_dirtImage", "_applied", "_effects"];
_effects = GETGLASSES(ace_player);
_effects set [DIRT, true];
SETGLASSES(ace_player,_effects);

View File

@ -16,7 +16,8 @@
*/
#include "script_component.hpp"
private "_broken";
private ["_broken", "_effects"];
_broken = GETBROKEN;
_effects = GLASSESDEFAULT;
_effects set [BROKEN, _broken];

View File

@ -9,7 +9,7 @@
* The rating [0-3] <NUMBER>
*
* Example:
* _rating = 0.05 call ace_goggles_fnc_getExplosionIndex;
* 0.05 call ace_goggles_fnc_getExplosionIndex;
*
* Public: No
*/

View File

@ -14,8 +14,10 @@
* Public: Yes
*/
#include "script_component.hpp"
private ["_currentGlasses", "_result", "_unit"];
_unit = _this select 0;
PARAMS_1(_unit);
private ["_currentGlasses", "_result", "_position", "_visible"];
_currentGlasses = goggles _unit;
_result = false;

View File

@ -21,7 +21,7 @@
*/
#include "script_component.hpp"
private ["_unit", "_firer", "_distance", "_weapon", "_muzzle", "_mode", "_ammo", "_silencer", "_audibleFireCoef", "_loudness", "_strength"];
private ["_unit", "_firer", "_distance", "_weapon", "_muzzle", "_mode", "_ammo", "_silencer", "_audibleFireCoef", "_loudness", "_strength", "_audibleFire", "_audibleFireTime", "_audibleFireTimeCoef"];
_unit = _this select 0;
_firer = _this select 1;

View File

@ -10,8 +10,7 @@
*/
#include "script_component.hpp"
_logic = _this select 0;
_activated = _this select 2;
PARAMS_3(_logic,_units,_activated);
if !(_activated) exitWith {};

View File

@ -18,6 +18,8 @@
#define STRENGHTODEAFNESS 3
#define MAXDEAFNESS 1.1
private ["_recoverRate", "_volume"];
// Exit if combat deafness is disabled
if !(GVAR(enableCombatDeafness)) exitWith {};

View File

@ -18,6 +18,8 @@
PARAMS_2(_caller,_target);
private ["_onFinish", "_onFailure"];
if (!(_this call FUNC(canRefuelUAV))) exitWith {};
_onFinish = {

View File

@ -17,7 +17,7 @@
#include "script_component.hpp"
#define SOUND_CLIP_TIME_SPACEING 1.5
private ["_timeToCut"];
private ["_timeToCut", "_progressCheck"];
PARAMS_2(_unit,_fenceObject);
if (_unit != ACE_player) exitWith {};

View File

@ -25,7 +25,7 @@ if (_interactionType != 0) exitWith {};
if (!("ACE_wirecutter" in (items ace_player))) exitWith {};
[{
private ["_fncStatement", "_attachedFence", "_fncCondition", "_helper"];
private ["_fncStatement", "_attachedFence", "_fncCondition", "_helper", "_action"];
PARAMS_2(_args,_pfID);
EXPLODE_3_PVT(_args,_setPosition,_addedHelpers,_fencesHelped);

View File

@ -28,7 +28,7 @@ _unitMagCounts = [];
_xFullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _xClassname >> "count");
//for every partial magazine, that is either in inventory or can be moved there
if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _magazineClassname}}) then {
if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _xClassname}}) then {
_index = _unitMagazines find _xClassname;
if (_index == -1) then {
_unitMagazines pushBack _xClassname;

View File

@ -19,7 +19,7 @@
*/
#include "script_component.hpp"
private ["_newMagFnc", "_time", "_events", "_swapAmmoFnc", "_ammoSwaped", "_lowIndex", "_highIndex", "_ammoToTransfer", "_ammoAvailable", "_ammoNeeded"];
private ["_newMagFnc", "_time", "_events", "_swapAmmoFnc", "_ammoSwaped", "_lowIndex", "_highIndex", "_ammoToTransfer", "_ammoAvailable", "_ammoNeeded", "_swapProgress"];
PARAMS_3(_fullMagazineCount,_arrayOfAmmoCounts,_isBelt);

View File

@ -14,9 +14,7 @@
if !(hasInterface) exitWith {};
_logic = _this select 0;
_units = _this select 1;
_activated = _this select 2;
PARAMS_3(_logic,_units,_activated);
if !(_activated) exitWith {};

View File

@ -1,5 +1,7 @@
#include "script_component.hpp"
private ["_groupsToDrawMarkers", "_playerSide", "_anyPlayers", "_markerType", "_colour", "_marker"];
// Delete last set of markers (always)
{
deleteMarkerLocal _x;

View File

@ -15,7 +15,7 @@
EXPLODE_1_PVT(_this,_unit);
private ["_isEnclosed","_nearObjects","_light","_ll","_flashlight"];
private ["_isEnclosed","_nearObjects","_light","_ll","_flashlight", "_flareTint", "_lightTint", "_l"];
// Blend two colors
_fnc_blendColor = {

View File

@ -12,7 +12,7 @@
*/
#include "script_component.hpp"
private ["_grids", "_fourSize", "_sixSize", "_continue", "_size"];
private ["_grids", "_fourSize", "_sixSize", "_continue", "_size", "_i"];
_grids = configFile >> "CfgWorlds" >> worldName >> "Grid";
_fourSize = -1;
_sixSize = -1;

View File

@ -10,8 +10,7 @@
*/
#include "script_component.hpp"
_logic = _this select 0;
_activated = _this select 2;
PARAMS_3(_logic,_units,_activated);
if !(_activated) exitWith {};

View File

@ -18,6 +18,8 @@
EXPLODE_2_PVT(_this,_player,_weapon);
private ["_action"];
// Play animation and report temperature
_action = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_checkTemperatureAction");

View File

@ -16,7 +16,7 @@
EXPLODE_2_PVT(_this,_player,_weapon);
// Calculate cool down of weapon since last shot
private ["_string", "_overheat", "_temperature", "_time", "_barrelMass"];
private ["_string", "_overheat", "_temperature", "_time", "_barrelMass", "_a"];
_string = format [QGVAR(%1), _weapon];
_overheat = _player getVariable [_string, [0, 0]];
_temperature = _overheat select 0;

View File

@ -17,7 +17,8 @@
*/
#include "\z\ace\addons\overheating\script_component.hpp"
private ["_unit", "_weapon", "_ammo", "_projectile"];
private ["_unit", "_weapon", "_ammo", "_projectile", "_velocity", "_variableName", "_overheat", "_temperature", "_time", "_bulletMass", "_energyIncrement", "_barrelMass", "_scaledTemperature", "_intensity", "_position", "_direction", "_dispersion", "_count", "_slowdownFactor", "_jamChance", "_surface"];
_unit = _this select 0;
_weapon = _this select 1;
_ammo = _this select 4;
@ -25,8 +26,6 @@ _projectile = _this select 6;
_velocity = velocity _projectile;
private ["_variableName", "_overheat", "_temperature", "_time", "_energyIncrement", "_barrelMass", "_scaledTemperature"];
// each weapon has it's own variable. Can't store the temperature in the weapon since they are not objects unfortunately.
_variableName = format [QGVAR(%1), _weapon];

View File

@ -13,6 +13,8 @@
EXPLODE_2_PVT(_this,_player,_target);
private ["_magazineType", "_magazineCfg"];
// Return true for static weapons if they have been fired once, @todo 1.40 this work-around doesn't work anymore
if (_target isKindOf "StaticWeapon") exitWith {
if (currentMagazine _target != "") exitWith {true};

View File

@ -14,7 +14,7 @@
EXPLODE_1_PVT(_this,_target);
private ["_weapon","_muzzle","_magazine","_showNumber","_ammo","_maxRounds","_count","_text","_color","_picture"];
private ["_weapon","_muzzle","_magazine","_showNumber","_ammo","_maxRounds","_count","_text","_color","_picture", "_a", "_string"];
_weapon = currentWeapon _target;
_muzzle = currentMuzzle _target;

View File

@ -15,7 +15,7 @@ EXPLODE_2_PVT(_this,_player,_target);
if (vehicle _target != _target) exitWith {false};
private ["_magazineCfg","_magazineType"];
private ["_magazineCfg","_magazineType", "_condition", "_onFailure", "_onFinish"];
_magazineType = currentMagazine _target;
_magazineCfg = configFile >> "CfgMagazines" >> _magazineType;
if (getNumber (_magazineCfg >> "ACE_isBelt") == 0) exitWith {false};
@ -54,7 +54,7 @@ _onFinish = {
_onFailure = {
EXPLODE_3_PVT((_this select 0),_player,_target,_magazine);
[_caller, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
[_player, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
// Add back the magazine with the former ammo count
_player addMagazine _magazine;