Tweak damage values. Fix formatting. Add lazy evaluation where applicable

This commit is contained in:
Brandon-PC\Brandon 2019-01-14 02:19:52 -07:00
parent 433aaf609a
commit 1910741481
11 changed files with 80 additions and 99 deletions

View File

@ -66,17 +66,18 @@ class CfgAmmo {
};
class GVAR(super) : GVAR(dragonBase) {
EGVAR(frag,skip) = 1;
scope = 1;
aiAmmoUsageFlags = "128+512";
hit = 460;
hit = 100;
indirectHit = 9;
indirectHitRange = 1;
explosive = 0.02;
cost = 4000;
explosive = 0.8;
cost = 500;
submunitionAmmo = QGVAR(penetrator_super);
submunitionDirectionType = "SubmunitionModelDirection";
submunitionInitSpeed = 200;
submunitionInitSpeed = 1000;
submunitionParentSpeedCoef = 0;
submunitionInitialOffset[] = { 0, 0, -0.2 };
@ -111,7 +112,7 @@ class CfgAmmo {
};
class ShellBase;
class ace_m47_dragon_serviceCharge : ShellBase {
class GVAR(serviceCharge) : ShellBase {
hit = 1;
indirectHit = 2;
indirectHitRange = 1;

View File

@ -136,8 +136,8 @@ class CfgVehicles {
class ACE_CSW {
disassembleTo = QGVAR(super);
};
class ACE_Actions {
class ACE_Actions {
class ACE_MainActions {
displayName = CSTRING(dragonName);
selection = "";

View File

@ -1,6 +1,5 @@
class StageTI
{
texture="z\ace\addons\dragon\data\M47_TI_CA.tga";
class StageTI {
texture="z\ace\addons\dragon\data\M47_TI_CA.tga";
};
ambient[]={0.958,0.98400003,1,1};
diffuse[]={0.958,0.98400003,1,1};
@ -10,87 +9,73 @@ specular[]={0.153,0.169,0.111,1};
specularPower=90;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
texture="z\ace\addons\dragon\data\M47_nohq.tga";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
class Stage1 {
texture="z\ace\addons\dragon\data\M47_nohq.tga";
uvSource="tex";
class uvTransform {
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
};
class Stage2
{
texture="a3\weapons_f\data\detailmaps\Metal_rough_DT.tga";
uvSource="tex";
class uvTransform
{
aside[]={4,0,0};
up[]={0,4,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
class Stage2 {
texture="a3\weapons_f\data\detailmaps\Metal_rough_DT.tga";
uvSource="tex";
class uvTransform {
aside[]={4,0,0};
up[]={0,4,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
};
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,1};
pos[]={0,0,0};
};
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,1};
pos[]={0,0,0};
};
};
class Stage4
{
texture="z\ace\addons\dragon\data\m47_as.tga";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
class Stage4 {
texture="z\ace\addons\dragon\data\m47_as.tga";
uvSource="tex";
class uvTransform {
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
};
class Stage5
{
texture="z\ace\addons\dragon\data\M47_smdi.tga";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
class Stage5 {
texture="z\ace\addons\dragon\data\M47_smdi.tga";
uvSource="tex";
class uvTransform {
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
};
class Stage6
{
texture="#(ai,32,128,1)fresnel(4.01,2.86)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
class Stage6 {
texture="#(ai,32,128,1)fresnel(4.01,2.86)";
uvSource="tex";
class uvTransform {
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
};
class Stage7
{
texture="a3\data_f\env_land_co.tga";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
class Stage7 {
texture="a3\data_f\env_land_co.tga";
uvSource="tex";
class uvTransform {
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
};

View File

@ -12,15 +12,14 @@
* Missile Aim PosASL <ARRAY> - Unused
*
* Example:
* [[1,2,3], [], []] call ace_hot_fnc_attackProfile_WIRE;
* [[1,2,3], [], []] call ace_dragon_fnc_attackProfile_DRAGON;
*
* Public: No
*
*/
params ["_seekerTargetPos", "_args", "_attackProfileStateParams"];
_args params ["_firedEH", "", "", "", "_stateParams"];
_firedEH params ["_shooter","_weapon","","","","","_projectile"];
_attackProfileStateParams params["_maxCorrectableDistance", "_wireCut", "_seekerMaxRangeSqr", "_seekerMinRangeSqr", "_wireCutSource", "_lastTime", "_serviceInterval", "_serviceChargeCount", "_serviceChargeAcceleration", "_dragonSpeed"];
_attackProfileStateParams params ["_maxCorrectableDistance", "_wireCut", "_seekerMaxRangeSqr", "_seekerMinRangeSqr", "_wireCutSource", "_lastTime", "_serviceInterval", "_serviceChargeCount", "_serviceChargeAcceleration", "_dragonSpeed"];
private _projectilePos = getPosASL _projectile;
private _distanceToProjectile = (getPosASL _shooter) vectorDistanceSqr _projectilePos;
@ -35,7 +34,7 @@ if ((_distanceToProjectile > _seekerMaxRangeSqr) || { _wireCut }) exitWith {
if (_serviceChargeCount > 0) then {
_projectile setVelocityModelSpace ((velocityModelSpace _projectile) vectorAdd ([(random 2) - 1, (random 2) - 1, random 1] vectorMultiply _serviceChargeAcceleration));
private _charge = createVehicle ["ace_m47_dragon_serviceCharge", [0, 0, 0], [], 0, "NONE"];
private _charge = createVehicle [QGVAR(serviceCharge), [0, 0, 0], [], 0, "NONE"];
_charge setPosASL (_projectilePos vectorAdd ((_vectorToCrosshair vectorMultiply -1) vectorMultiply 0.025));
_attackProfileStateParams set [7, _serviceChargeCount - 1];
};
@ -58,7 +57,7 @@ if (((_lastTime - CBA_missionTime) <= 0) || {(_lastTime - CBA_missionTime) < (_s
_projectile setVelocityModelSpace ((velocityModelSpace _projectile) vectorAdd (_vectorToPos vectorMultiply _serviceChargeAcceleration));
private _charge = createVehicle ["ace_m47_dragon_serviceCharge", [0, 0, 0], [], 0, "NONE"];
private _charge = createVehicle [QGVAR(serviceCharge), [0, 0, 0], [], 0, "NONE"];
_charge setPosASL (_projectilePos vectorAdd ((_vectorToCrosshair vectorMultiply -1) vectorMultiply 0.025));
_attackProfileStateParams set [7, _serviceChargeCount - 1];

View File

@ -14,7 +14,6 @@
* [vehicle player, player] call ace_dragon_fnc_canPickupTripod;
*
* Public: No
*
*/
params ["_target", "_unit"];
!(_target getVariable [QGVAR(fired), false]) && { [_target, _unit, [], binocular _unit] call EFUNC(csw,assemble_canDeployWeapon) };

View File

@ -14,7 +14,6 @@
* [vehicle player, player] call ace_dragon_fnc_canPickupTripod;
*
* Public: No
*
*/
params ["_target", "_unit"];
!(_target getVariable [QGVAR(fired), false]) && { [_target, _unit] call EFUNC(csw,assemble_canPickupTripod) };

View File

@ -14,7 +14,6 @@
* [vehicle player, player] call ace_dragon_fnc_onDisassemble;
*
* Public: No
*
*/
params ["_newTripod", "_oldWeapon"];

View File

@ -14,7 +14,6 @@
* [any, vehicle player] call ace_dragon_fnc_onFired;
*
* Public: No
*
*/
params ["_firedEH", "", "", "_seekerParams", "_stateParams"];
_firedEH params ["_shooter","_weapon","","","","","_projectile"];

View File

@ -3,7 +3,7 @@
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
#define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_DRAGON

View File

@ -25,7 +25,7 @@ _seekerStateParams params ["_memoryPointGunnerOptics", "_animationSourceBody", "
private _shooterPos = AGLToASL (_shooter modelToWorld(_shooter selectionPosition _memoryPointGunnerOptics));
private _projPos = getPosASL _projectile;
private _lookDirection = if !(_shooter isKindOf "CAManBase" || _shooter isKindOf "StaticWeapon") then {
private _lookDirection = if !(_shooter isKindOf "CAManBase" || {_shooter isKindOf "StaticWeapon"}) then {
private _gBody = -deg(_shooter animationPhase _animationSourceBody);
private _gGun = deg(_shooter animationPhase _animationSourceGun);

View File

@ -56,7 +56,7 @@ private _profileAdjustedTargetPos = [_seekerTargetPos, _args, _attackProfileStat
// If we have no seeker target, then do not change anything
// If there is no deflection on the missile, this cannot change and therefore is redundant. Avoid calculations for missiles without any deflection
if ((_minDeflection != 0 || _maxDeflection != 0) && { !(_profileAdjustedTargetPos isEqualTo [0,0,0]) }) then {
if ((_minDeflection != 0 || {_maxDeflection != 0}) && {!(_profileAdjustedTargetPos isEqualTo [0,0,0])}) then {
private _targetVector = _projectilePos vectorFromTo _profileAdjustedTargetPos;
private _adjustVector = _targetVector vectorDiff (vectorDir _projectile);