mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Code cleanup
This commit is contained in:
parent
24bd515814
commit
7545a6c3d8
@ -1,13 +1,10 @@
|
||||
class CfgSounds
|
||||
{
|
||||
class GVAR(soundMagazineFinished)
|
||||
{
|
||||
class CfgSounds {
|
||||
class GVAR(soundMagazineFinished) {
|
||||
name = QGVAR(soundMagazineFinished);
|
||||
sound[]={QUOTE(PATHTOF(sounds\magrepack_finished.wav)),1,1};
|
||||
titles[]={};
|
||||
};
|
||||
class GVAR(soundRoundFinished)
|
||||
{
|
||||
class GVAR(soundRoundFinished) {
|
||||
name = QGVAR(soundRoundFinished);
|
||||
sound[] = {QUOTE(PATHTOF(sounds\magrepack_single.wav)),1,1};
|
||||
titles[] = {};
|
||||
|
@ -16,7 +16,13 @@ class CfgPatches {
|
||||
#include "CfgSounds.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
class ACE_Parameters_Numeric {
|
||||
GVAR(TimePerAmmo) = 1.5;
|
||||
GVAR(TimePerMagazine) = 2.0;
|
||||
class ACE_Settings {
|
||||
class GVAR(TimePerAmmo) {
|
||||
value = 1.5;
|
||||
typeName = "SCALAR";
|
||||
};
|
||||
class GVAR(TimePerMagazine) {
|
||||
value = 2.0;
|
||||
typeName = "SCALAR";
|
||||
};
|
||||
};
|
||||
|
@ -63,13 +63,13 @@ _updateMagazinesOnPlayerFnc = {
|
||||
};
|
||||
|
||||
if (_nextEventIsBullet) then {
|
||||
playSound QGVAR(soundMagazineFinished);
|
||||
playSound QGVAR(soundRoundFinished);
|
||||
if ((((count _simEvents) % 3) == 0) || {(count _simEvents) == 1}) then {
|
||||
//For performance - only update mags every 3 bullets (or if it's the last event)
|
||||
call _updateMagazinesOnPlayerFnc;
|
||||
};
|
||||
} else {
|
||||
playSound QGVAR(soundRoundFinished);
|
||||
playSound QGVAR(soundMagazineFinished);
|
||||
call _updateMagazinesOnPlayerFnc;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user