Finalized port of basic ballistics

This commit is contained in:
Thomas Kooi 2015-01-28 17:36:47 +01:00
parent 5a775176ef
commit 2def603a58
11 changed files with 10 additions and 8 deletions

View File

@ -11,7 +11,7 @@ class Extended_PostInit_EventHandlers {
};
class Extended_Fired_Eventhandlers {
class ADDON {
class CaManBase {
fired = QUOTE( call FUNC(handleFired) );
};
};

View File

@ -7,8 +7,8 @@ class CfgVehicles {
class GVAR(Module): Module_F {
scope = 2;
displayName = "Basic Ballistics [ACE]";
icon = "\cse\cse_main\data\cse_rifle_module.paa"; // TODO find a new module icon
category = "cseModules"; // TODO find a new module category
icon = QUOTE(PATHTOF(data\module_icon.paa));
category = "ACE";
function = FUNC(enableModule);
functionPriority = 1;
isGlobal = 1;

View File

@ -5,10 +5,10 @@ class CfgPatches {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ACE_main"};
requiredAddons[] = {"ACE_common"};
versionDesc = "ACE Wind Deflection";
version = VERSION;
author[] = {$STR_ACE_Core_ACETeam};
author[] = {$STR_ACE_Core_ACETeam, "Glowbal", "Ruthberg"};
authorUrl = "http://csemod.com";
};
};

Binary file not shown.

View File

@ -18,7 +18,7 @@
#include "script_component.hpp"
if (isNil QGVAR(EnableForAI)) exitWith {false}; // means that the module has not yet initalized
if (isNil QGVAR(EnableForAI)) exitWith {false}; // means that the module has not yet initialized
private ["_unit", "_weapon", "_ammo", "_bullet", "_airFriction", "_index"];
_unit = _this select 0;
@ -90,9 +90,11 @@ if (_bullet isKindOf "BulletBase") then {
_bulletVelocity = _bulletVelocity vectorAdd _accel;
};
// TODO expand with advanced ballistics functionality.
_bullet setVelocity _bulletVelocity;
}forEach GVAR(bulletDatabaseLastFrameOccupiedIndices);
}, 0, []] call cba_fnc_addPerFrameHandler;
}, 0, []] call CBA_fnc_addPerFrameHandler;
};
};
true;

View File

@ -1,4 +1,4 @@
#define COMPONENT windDeflection
#define COMPONENT winddeflection
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_WINDDEFLECTION