Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup some configs and array spacing #5463

Merged
merged 1 commit into from
Aug 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions addons/fonts/CfgFontFamilies.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
class CfgFontFamilies
{
class PixelSplitterBold
{
class CfgFontFamilies {
class PixelSplitterBold {
fonts[] = { QPATHTOF(PixelSplitterBold\PixelSplitterBold6),
QPATHTOF(PixelSplitterBold\PixelSplitterBold7),
QPATHTOF(PixelSplitterBold\PixelSplitterBold8),
Expand Down
13 changes: 6 additions & 7 deletions addons/noidle/CfgMoves.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

class CfgMovesBasic {
class StandBase;
};
Expand All @@ -7,29 +6,29 @@ class CfgMovesMaleSdr: CfgMovesBasic {
class States {
// rifle
class AmovPercMstpSlowWrflDnon: StandBase {
variantsPlayer[] = {/*"AidlPercMstpSlowWrflDnon_G01",0.5,"AidlPercMstpSlowWrflDnon_G02",0.125,"AidlPercMstpSlowWrflDnon_G03",0.125,"AidlPercMstpSlowWrflDnon_G04",0.125,"AidlPercMstpSlowWrflDnon_G05",0.125*/};
variantsPlayer[] = {/*"AidlPercMstpSlowWrflDnon_G01", 0.5, "AidlPercMstpSlowWrflDnon_G02", 0.125, "AidlPercMstpSlowWrflDnon_G03", 0.125, "AidlPercMstpSlowWrflDnon_G04", 0.125, "AidlPercMstpSlowWrflDnon_G05", 0.125*/};
};
class AmovPknlMstpSlowWrflDnon: AmovPercMstpSlowWrflDnon {
variantsPlayer[] = {/*"AidlPknlMstpSlowWrflDnon_G01",0.25,"AidlPknlMstpSlowWrflDnon_G02",0.25,"AidlPknlMstpSlowWrflDnon_G03",0.25*/};
variantsPlayer[] = {/*"AidlPknlMstpSlowWrflDnon_G01", 0.25, "AidlPknlMstpSlowWrflDnon_G02", 0.25, "AidlPknlMstpSlowWrflDnon_G03", 0.25*/};
};

// pistol
class AmovPercMstpSrasWpstDnon;
class AmovPercMstpSlowWpstDnon: AmovPercMstpSrasWpstDnon {
variantsPlayer[] = {/*"AidlPercMstpSlowWpstDnon_G01",0.333,"AidlPercMstpSlowWpstDnon_G02",0.333,"AidlPercMstpSlowWpstDnon_G03",0.334*/};
variantsPlayer[] = {/*"AidlPercMstpSlowWpstDnon_G01", 0.333, "AidlPercMstpSlowWpstDnon_G02", 0.333, "AidlPercMstpSlowWpstDnon_G03", 0.334*/};
};

class AmovPknlMstpSrasWpstDnon;
class AmovPknlMstpSlowWpstDnon: AmovPknlMstpSrasWpstDnon {
variantsPlayer[] = {/*"AidlPknlMstpSlowWpstDnon_G03",0.333,"AidlPknlMstpSlowWpstDnon_G02",0.333,"AidlPknlMstpSlowWpstDnon_G01",0.334*/};
variantsPlayer[] = {/*"AidlPknlMstpSlowWpstDnon_G03", 0.333, "AidlPknlMstpSlowWpstDnon_G02", 0.333, "AidlPknlMstpSlowWpstDnon_G01", 0.334*/};
};

// none
class AmovPercMstpSnonWnonDnon: StandBase {
variantsPlayer[] = {/*"AidlPercMstpSnonWnonDnon_G01",0.16,"AidlPercMstpSnonWnonDnon_G02",0.16,"AidlPercMstpSnonWnonDnon_G03",0.16,"AidlPercMstpSnonWnonDnon_G04",0.16,"AidlPercMstpSnonWnonDnon_G05",0.16,"AidlPercMstpSnonWnonDnon_G06",0.16*/};
variantsPlayer[] = {/*"AidlPercMstpSnonWnonDnon_G01", 0.16, "AidlPercMstpSnonWnonDnon_G02", 0.16, "AidlPercMstpSnonWnonDnon_G03", 0.16, "AidlPercMstpSnonWnonDnon_G04", 0.16, "AidlPercMstpSnonWnonDnon_G05", 0.16, "AidlPercMstpSnonWnonDnon_G06", 0.16*/};
};
class AmovPknlMstpSnonWnonDnon: AmovPercMstpSnonWnonDnon {
variantsPlayer[] = {/*"AidlPknlMstpSnonWnonDnon_G01",0.33,"AidlPknlMstpSnonWnonDnon_G02",0.33,"AidlPknlMstpSnonWnonDnon_G03",0.33*/};
variantsPlayer[] = {/*"AidlPknlMstpSnonWnonDnon_G01", 0.33, "AidlPknlMstpSnonWnonDnon_G02", 0.33, "AidlPknlMstpSnonWnonDnon_G03", 0.33*/};
};
};
};
1 change: 0 additions & 1 deletion addons/noradio/CfgEventhandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
Expand Down
10 changes: 5 additions & 5 deletions addons/noradio/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// by commy2
// By commy2
#include "script_component.hpp"

// unmute unit if that player disconnects
// Unmute unit if that player disconnects
if (isServer) then {
addMissionEventHandler ["HandleDisconnect", {
[_this select 0, "isPlayer"] call EFUNC(common,unmuteUnit);
Expand All @@ -15,14 +15,14 @@ if (!isNull ace_player) then {
[ace_player, "isPlayer"] call EFUNC(common,muteUnit);
};

// mutes/unmutes units when the player changes
// Mutes/unmutes units when the player changes
["unit", {
params ["_newPlayer", "_oldPlayer"];

// mute the new player
// Mute the new player
[_newPlayer, "isPlayer"] call EFUNC(common,muteUnit);

// unmute the old player
// Unmute the old player
if (alive _oldPlayer) then {
[_oldPlayer, "isPlayer"] call EFUNC(common,unmuteUnit);
};
Expand Down
1 change: 0 additions & 1 deletion addons/norearm/CfgActions.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

class CfgActions {
class None;
class Rearm: None {
Expand Down
1 change: 0 additions & 1 deletion addons/optics/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
Expand Down
2 changes: 1 addition & 1 deletion addons/optics/CfgOpticsEffect.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CfgOpticsEffect {
class ACE_OpticsRadBlur1 {
type = "radialblur";
params[] = {0.015,0,0.14,0.2};
params[] = {0.015, 0, 0.14, 0.2};
priority = 950;
};
};
50 changes: 25 additions & 25 deletions addons/optics/CfgRscTitles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ class RscInGameUI {
};

class ACE_RscWeaponZeroing: RscWeaponZeroing {
controls[] = {"CA_Zeroing","CA_FOVMode","ACE_DrawReticleHelper","ACE_ScriptedReticle"};
controls[] = {"CA_Zeroing", "CA_FOVMode", "ACE_DrawReticleHelper", "ACE_ScriptedReticle"};

class CA_FOVMode: RscOpticsValue { // idea by Taosenai. Apparently this can be used via isNil check to determine wheter the scope or the kolimator is used
class CA_FOVMode: RscOpticsValue { // Idea by Taosenai. Apparently this can be used via isNil check to determine wheter the scope or the kolimator is used
idc = 154;
style = 2;
colorText[] = {0,0,0,0};
colorText[] = {0, 0, 0, 0};
x = 0;
y = 0;
w = 0;
Expand All @@ -40,12 +40,12 @@ class RscInGameUI {
};

class ACE_RscWeapon_base: RscWeaponZeroing {
controls[] = {"CA_Zeroing","CA_FOVMode","ACE_DrawReticleHelper","ReticleDay","ReticleNight","BodyNight","BodyDay", "trippleHeadLeft", "trippleHeadRight"}; // don't change this order
controls[] = {"CA_Zeroing", "CA_FOVMode", "ACE_DrawReticleHelper", "ReticleDay", "ReticleNight", "BodyNight", "BodyDay", "trippleHeadLeft", "trippleHeadRight"}; // Don't change this order

class CA_FOVMode: RscOpticsValue { // idea by Taosenai. Apparently this can be used via isNil check to determine wheter the scope or the kolimator is used
class CA_FOVMode: RscOpticsValue { // Idea by Taosenai. Apparently this can be used via isNil check to determine wheter the scope or the kolimator is used
idc = 154;
style = 2;
colorText[] = {0,0,0,0};
colorText[] = {0, 0, 0, 0};
x = 0;
y = 0;
w = 0;
Expand All @@ -66,12 +66,12 @@ class RscInGameUI {
size = 0;
sizeEx = 1;
text = "";
colorText[] = {1,1,1,0};
colorBackground[] = {0,0,0,0};
x = safezoneX+0.5*safezoneW-0.5*SIZEX;
y = safezoneY+0.5*safezoneH-0.5*SIZEX*(4/3);
colorText[] = {1, 1, 1, 0};
colorBackground[] = {0, 0, 0, 0};
x = safezoneX + 0.5 * safezoneW - 0.5 * SIZEX;
y = safezoneY + 0.5 * safezoneH - 0.5 * SIZEX * (4 / 3);
w = SIZEX;
h = SIZEX*(4/3);
h = SIZEX * (4 / 3);
};

class ReticleNight: ReticleDay {
Expand All @@ -84,32 +84,32 @@ class RscInGameUI {
class BodyDay: ReticleDay {
idc = 1713005;
text = "";
x = safezoneX+0.5*safezoneW-0.5*SIZEX;
y = safezoneY+0.5*safezoneH-0.5*SIZEX*(4/3);
x = safezoneX + 0.5 * safezoneW - 0.5 * SIZEX;
y = safezoneY + 0.5 * safezoneH - 0.5 * SIZEX * (4 / 3);
w = SIZEX;
h = SIZEX*(4/3);
h = SIZEX * (4 / 3);
};

class BodyNight: BodyDay {
idc = 1713006;
text = "";
};

//These are just black side panels to cover the areas that the optics p3d doesn't cover
//It will ONLY effect tripple head users as (safezoneX == safeZoneXAbs) for everyone else
//Reference PR #1156:
// These are just black side panels to cover the areas that the optics p3d doesn't cover
// It will ONLY effect tripple head users as (safezoneX == safeZoneXAbs) for everyone else
// Reference PR #1156:
class trippleHeadLeft: RscText {
idc = 1713010;
x = "safeZoneXAbs";
Y = "safezoneY";
W = "(safezoneX - safeZoneXAbs) * ((getResolution select 4)/(16/3))";
W = "(safezoneX - safeZoneXAbs) * ((getResolution select 4) / (16 / 3))";
H = "safeZoneH";
colorBackground[] = {0,0,0,1};
colorBackground[] = {0, 0, 0, 1};
};
class trippleHeadRight: trippleHeadLeft {
idc = 1713011;
x = "safeZoneXAbs + safeZoneWAbs - (safezoneX - safeZoneXABS) * ((getResolution select 4)/(16/3))";
colorBackground[] = {0,0,0,1};
x = "safeZoneXAbs + safeZoneWAbs - (safezoneX - safeZoneXABS) * ((getResolution select 4) / (16 / 3))";
colorBackground[] = {0, 0, 0, 1};
};
};

Expand Down Expand Up @@ -190,12 +190,12 @@ class RscInGameUI {

_ctrl = (D displayCtrl 1713006);

_sizeX = 1.54/(getResolution select 5);
_sizeY = _sizeX*safezoneW/safezoneH;
_sizeX = 1.54 / (getResolution select 5);
_sizeY = _sizeX * safezoneW / safezoneH;

_ctrl ctrlSetPosition [
safezoneX+0.5*safezoneW-0.5*_sizeX,
safezoneY+0.5*safezoneH-0.5*_sizeY,
safezoneX + 0.5 * safezoneW - 0.5 * _sizeX,
safezoneY + 0.5 * safezoneH - 0.5 * _sizeY,
_sizeX,
_sizeY
];
Expand Down
20 changes: 10 additions & 10 deletions addons/optics/CfgWeapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ class CfgWeapons {
opticsZoomInit = 0.0872664626;
opticsZoomMax = 0.0872664626;
opticsZoomMin = 0.0872664626;
opticsPPEffects[] = {"OpticsCHAbera5","OpticsBlur5","ACE_OpticsRadBlur1"};
opticsPPEffects[] = {"OpticsCHAbera5", "OpticsBlur5", "ACE_OpticsRadBlur1"};
opticsDisablePeripherialVision = 0;
visionMode[] = {"Normal","NVG"};
visionMode[] = {"Normal", "NVG"};
};
};
};
Expand Down Expand Up @@ -135,7 +135,7 @@ class CfgWeapons {
opticsZoomInit = 0.0872664626;
opticsZoomMax = 0.0872664626;
opticsZoomMin = 0.0872664626;
opticsPPEffects[] = {"OpticsCHAbera5","OpticsBlur5","ACE_OpticsRadBlur1"};
opticsPPEffects[] = {"OpticsCHAbera5", "OpticsBlur5", "ACE_OpticsRadBlur1"};
opticsDisablePeripherialVision = 0;
visionMode[] = {"Normal"};
};
Expand Down Expand Up @@ -184,7 +184,7 @@ class CfgWeapons {
opticsZoomInit = 0.0872664626;
opticsZoomMax = 0.0872664626;
opticsZoomMin = 0.0872664626;
opticsPPEffects[] = {"OpticsCHAbera5","OpticsBlur5","ACE_OpticsRadBlur1"};
opticsPPEffects[] = {"OpticsCHAbera5", "OpticsBlur5", "ACE_OpticsRadBlur1"};
opticsDisablePeripherialVision = 0;
visionMode[] = {"Normal"};
};
Expand Down Expand Up @@ -227,13 +227,13 @@ class CfgWeapons {
class ItemInfo: ItemInfo {
class OpticsModes: OpticsModes {
class Snip: Snip {
modelOptics[] = {QPATHTOF(models\ace_optics_reticle90.p3d),QPATHTOF(models\ace_optics_reticle90.p3d)};
modelOptics[] = {QPATHTOF(models\ace_optics_reticle90.p3d), QPATHTOF(models\ace_optics_reticle90.p3d)};
useModelOptics = 1;
opticsZoomInit = 0.0116;
opticsZoomMax = 0.0464;
opticsZoomMin = 0.0116;
discreteFOV[] = {0.0464, 0.0116};
opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1","ACE_OpticsRadBlur1"};
opticsPPEffects[] = {"OpticsCHAbera1", "OpticsBlur1", "ACE_OpticsRadBlur1"};
opticsDisablePeripherialVision = 0;
};
class Iron: Iron {};
Expand All @@ -250,7 +250,7 @@ class CfgWeapons {
class ItemInfo: ItemInfo {
class OpticsModes: OpticsModes {
class Snip: Snip {
modelOptics[] = {QPATHTOF(models\ace_optics_pip.p3d),QPATHTOF(models\ace_optics_pip.p3d)};
modelOptics[] = {QPATHTOF(models\ace_optics_pip.p3d), QPATHTOF(models\ace_optics_pip.p3d)};
};
class Iron: Iron {};
};
Expand Down Expand Up @@ -279,13 +279,13 @@ class CfgWeapons {
class ItemInfo: ItemInfo {
class OpticsModes: OpticsModes {
class Snip: Snip {
modelOptics[] = {QPATHTOF(models\ace_optics_reticle90.p3d),QPATHTOF(models\ace_optics_reticle90.p3d)};
modelOptics[] = {QPATHTOF(models\ace_optics_reticle90.p3d), QPATHTOF(models\ace_optics_reticle90.p3d)};
useModelOptics = 1;
opticsZoomInit = 0.0116;
opticsZoomMax = 0.0464;
opticsZoomMin = 0.0116;
discreteFOV[] = {};
opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1","ACE_OpticsRadBlur1"};
opticsPPEffects[] = {"OpticsCHAbera1", "OpticsBlur1", "ACE_OpticsRadBlur1"};
opticsDisablePeripherialVision = 0;
};
};
Expand All @@ -301,7 +301,7 @@ class CfgWeapons {
class ItemInfo: ItemInfo {
class OpticsModes: OpticsModes {
class Snip: Snip {
modelOptics[] = {QPATHTOF(models\ace_optics_pip.p3d),QPATHTOF(models\ace_optics_pip.p3d)};
modelOptics[] = {QPATHTOF(models\ace_optics_pip.p3d), QPATHTOF(models\ace_optics_pip.p3d)};
};
};
};
Expand Down
1 change: 0 additions & 1 deletion addons/optics/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

PREP(handleFired);
PREP(onDrawScope);
PREP(onDrawScope2D);
2 changes: 1 addition & 1 deletion addons/optics/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GVAR(camera) = objNull;
params ["", "_isfeatureCameraActive"];
TRACE_1("ace_activeCameraChanged",_isfeatureCameraActive);
if (!_isfeatureCameraActive) then {
//Destroy the camera, and it will be re-created in the onDrawScope2d helper
// Destroy the camera, and it will be re-created in the onDrawScope2d helper
if (!isNull GVAR(camera)) then {
GVAR(camera) cameraEffect ["TERMINATE", "BACK"];
camDestroy GVAR(camera);
Expand Down
20 changes: 10 additions & 10 deletions addons/optics/functions/fnc_handleFired.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

#include "script_component.hpp"

//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
// IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether the linter cares about spaces here or not, but have a feeling it will

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be fine

TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);

disableSerialization;

// check if compatible scope is used
// Check if compatible scope is used
private _display = uiNamespace getVariable [QGVAR(RscWeaponInfo2D), displayNull];

if (isNull _display) exitWith {};
Expand All @@ -49,12 +49,12 @@ _scopeShiftY = _recoilCoef * linearConversion [0, 1, random 1, SCOPE_SHIFT_Y_MIN
// Create and commit recoil effect
private ["_sizeX", "_sizeY"];

_sizeX = (0.75 + _recoilScope)/(getResolution select 5);
_sizeY = _sizeX*(4/3);
_sizeX = (0.75 + _recoilScope) / (getResolution select 5);
_sizeY = _sizeX * (4 / 3);

private _positionReticle = [
safezoneX + 0.5 * safezoneW - 0.5*(_sizeX + _reticleShiftX),
safezoneY + 0.5 * safezoneH - 0.5*(_sizeY + _reticleShiftY),
safezoneX + 0.5 * safezoneW - 0.5 * (_sizeX + _reticleShiftX),
safezoneY + 0.5 * safezoneH - 0.5 * (_sizeY + _reticleShiftY),
_sizeX,
_sizeY
];
Expand All @@ -63,8 +63,8 @@ private _positionReticle = [
(_display displayCtrl 1713002) ctrlSetPosition _positionReticle;

private _positionBody = [
safezoneX + 0.5 * safezoneW - 0.5*(2 * _sizeX + _scopeShiftX),
safezoneY + 0.5 * safezoneH - 0.5*(2 * _sizeY + _scopeShiftY),
safezoneX + 0.5 * safezoneW - 0.5 * (2 * _sizeX + _scopeShiftX),
safezoneY + 0.5 * safezoneH - 0.5 * (2 * _sizeY + _scopeShiftY),
2 * _sizeX,
2 * _sizeY
];
Expand All @@ -78,8 +78,8 @@ private _positionBody = [
(_display displayCtrl 1713006) ctrlCommit 0;

// Bring them all back
_sizeX = 0.75/(getResolution select 5);
_sizeY = _sizeX*(4/3);
_sizeX = 0.75 / (getResolution select 5);
_sizeY = _sizeX * (4 / 3);

_positionReticle = [
safezoneX + 0.5 * safezoneW - 0.5 * _sizeX,
Expand Down
8 changes: 4 additions & 4 deletions addons/optics/functions/fnc_onDrawScope.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ if (!ctrlShown (_display displayCtrl 154)) exitWith {
_control ctrlShow false;
};

private _sizeX = (call EFUNC(common,getZoom))/4;
private _sizeY = _sizeX*safezoneW/safezoneH;
private _sizeX = (call EFUNC(common,getZoom)) / 4;
private _sizeY = _sizeX * safezoneW / safezoneH;

_control ctrlSetPosition [
safezoneX+0.5*safezoneW-0.5*_sizeX,
safezoneY+0.5*safezoneH-0.5*_sizeY,
safezoneX + 0.5 * safezoneW - 0.5 * _sizeX,
safezoneY + 0.5 * safezoneH - 0.5 * _sizeY,
_sizeX,
_sizeY
];
Expand Down
Loading