-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Missile Guidance - Add Copperhead M712 (#8210)
* Pike prototype * Magwells * move include * Update fnc_handleFired.sqf * Update configs * initial clgp * redo using ammo events * bom * Remove RVMAT for ammo model * spelling of word * Apply suggestions from code review Co-authored-by: Jouni Järvinen <[email protected]> * update clgp * reduce change to mg * More rework * more cleanup * Fly straight when no target data * use artillery drag * Update default laser code * Merge pike * Update CfgAmmo.hpp * Add framework doc * Disable alt flightmode for now * Update for mg changes * Update fnc_onFiredGetArgs.sqf * sort st * Add frag configs * refactor to missile_clgp * various suggestions * Non-mag-hardcoded interface, fix attack profile --------- Co-authored-by: Jouni Järvinen <[email protected]>
- Loading branch information
1 parent
b516b96
commit 416930e
Showing
23 changed files
with
716 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class EGVAR(missileguidance,AttackProfiles) { | ||
class copperhead { | ||
onFired = QFUNC(copperhead_onfired); | ||
functionName = QFUNC(copperhead_attackprofile); | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class CfgWeapons { | ||
class CannonCore; | ||
class mortar_155mm_AMOS: CannonCore { | ||
magazineWell[] += {"ACE_155mm_artillery"}; | ||
// reloadTime = 1; // dev | ||
// magazineReloadTime = 1; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
class RscObject; | ||
class RscButton; | ||
|
||
class GVAR(copperhead_dialButton): RscButton { | ||
style = 2; | ||
x = 0; | ||
y = 0; | ||
w = 99; | ||
h = 99; | ||
soundEnter[] = {"", 0.2, 1}; | ||
soundPush[] = {"", 0.2, 1}; | ||
soundClick[] = {"", 0.2, 1}; | ||
soundEscape[] = {"", 0.2, 1}; | ||
color[] = {0,0,0,0}; | ||
colorBackground[] = {0,0,1,0}; | ||
// colorBackground[] = {0,0,1,0.1}; | ||
colorBackgroundDisabled[] = {0,0,0,0}; | ||
colorBackgroundActive[] = {0,0,0,0}; | ||
colorFocused[] = {0,0,0,0}; | ||
text = ""; | ||
}; | ||
|
||
class GVAR(copperhead_dialog) { | ||
idd = -1; | ||
enableSimulation = 1; | ||
onLoad = QUOTE(with uiNamespace do {GVAR(copperhead_dialog) = _this select 0}); | ||
duration = 1e99; | ||
class ControlsBackground {}; | ||
class Controls {}; | ||
class Objects { | ||
class TheThing: RscObject { | ||
type = 82; | ||
idc = 100; | ||
model = QPATHTOF(data\ace_copperhead_interactive.p3d); | ||
direction[] = {0,0,1}; | ||
up[] = {0,1,0}; | ||
position[] = {0,-0.338,0.5}; | ||
positionBack[] = {0,-0.338,0.5}; | ||
enableZoom = 0; | ||
zoomDuration = 1; | ||
scale = 1; | ||
inBack = 0; | ||
class Areas { | ||
class Dial1 { | ||
selection = "dial1"; | ||
class Controls { | ||
class ButtonDial: GVAR(copperhead_dialButton) { | ||
idc = 111; | ||
tooltip = CSTRING(copperhead_dial_FlightProfile); | ||
}; | ||
}; | ||
}; | ||
class Dial2 { | ||
selection = "dial2"; | ||
class Controls { | ||
class ButtonDial: GVAR(copperhead_dialButton) { | ||
idc = 112; | ||
tooltip = CSTRING(copperhead_dial_GuidanceDelay); | ||
}; | ||
}; | ||
}; | ||
class Dial3 { | ||
selection = "dial3"; | ||
class Controls { | ||
class ButtonDial: GVAR(copperhead_dialButton) { | ||
idc = 113; | ||
tooltip = ECSTRING(laser,laserCode); | ||
}; | ||
}; | ||
}; | ||
class Dial4 { | ||
selection = "dial4"; | ||
class Controls { | ||
class ButtonDial: GVAR(copperhead_dialButton) { | ||
idc = 114; | ||
tooltip = ECSTRING(laser,laserCode); | ||
}; | ||
}; | ||
}; | ||
class Dial5 { | ||
selection = "dial5"; | ||
class Controls { | ||
class ButtonDial: GVAR(copperhead_dialButton) { | ||
idc = 115; | ||
tooltip = ECSTRING(laser,laserCode); | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
LOG("prep"); | ||
|
||
|
||
PREP(copperhead_attackprofile); | ||
PREP(copperhead_deployCondition); | ||
PREP(copperhead_onfired); | ||
PREP(copperhead_uiCanOpen); | ||
PREP(copperhead_uiCreate); | ||
|
||
PREP(submunition_ammoFired); | ||
PREP(submunition_applyDrag); | ||
PREP(submunition_submunitionCreated); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,35 @@ | ||
#include "script_component.hpp" | ||
|
||
GVAR(copperheadMagazines) = createHashMap; | ||
|
||
// Copperhead - Add shell interface action to vehicles that can fire it | ||
if (hasInterface) then { | ||
["turret", { | ||
params ["_player", "_turret"]; | ||
TRACE_3("turret",_player,_turret,typeOf vehicle _player); | ||
if (_turret isNotEqualTo [0]) exitWith {}; | ||
private _vehicle = vehicle _player; | ||
|
||
if ((!alive _player) || {!alive _vehicle} || {_vehicle getVariable [QGVAR(actionsAdded), false]}) exitWith {}; | ||
_vehicle setVariable [QGVAR(actionsAdded), true]; | ||
|
||
if (((_vehicle weaponsTurret [0]) findIf { | ||
private _compatibleMagazines = compatibleMagazines _x; | ||
(_compatibleMagazines findIf { | ||
private _magazine = _x; | ||
GVAR(copperheadMagazines) getOrDefaultCall [_magazine, { | ||
(getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(copperheadInterface))) == 1 | ||
}, true] | ||
}) != -1 | ||
}) != -1) then { | ||
TRACE_2("adding copperhead action to vehicle",_vehicle,typeOf _vehicle); | ||
private _action = [QGVAR(copperhead), LLSTRING(copperhead_action), "", LINKFUNC(copperhead_uiCreate), LINKFUNC(copperhead_uiCanOpen)] call EFUNC(interact_menu,createAction); | ||
[_vehicle, 1, ["ACE_SelfActions"], _action] call EFUNC(interact_menu,addActionToObject); | ||
}; | ||
}, true] call CBA_fnc_addPlayerEventHandler | ||
}; | ||
|
||
|
||
#ifdef ENABLE_QUICK_TESTING | ||
call compileScript [QPATHTOF(dev\quickTesting.sqf)]; | ||
#endif |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
ambient[]={1,0.98500001,0.97000003,1}; | ||
diffuse[]={1,0.98500001,0.97000003,1}; | ||
forcedDiffuse[]={0,0,0,0}; | ||
emmisive[]={0,0,0,1}; | ||
specular[]={0.0001,0.0001,0.0001,0}; | ||
specularPower=2000; | ||
PixelShaderID="Super"; | ||
VertexShaderID="Super"; | ||
class Stage1 | ||
{ | ||
texture="#(argb,8,8,3)color(0.5,0.5,1,1)"; | ||
uvSource = "tex"; | ||
class uvTransform | ||
{ | ||
aside[] = {1.0,0.0,0.0}; | ||
up[] = {0.0,1.0,0.0}; | ||
dir[] = {0.0,0.0,0.0}; | ||
pos[] = {0.0,0.0,0.0}; | ||
}; | ||
}; | ||
class Stage2 | ||
{ | ||
texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; | ||
uvSource = "tex"; | ||
class uvTransform | ||
{ | ||
aside[] = {5,-4,0}; | ||
up[] = {8,1.931601,0}; | ||
dir[] = {0.0,0.0,0.0}; | ||
pos[] = {0.0,0.0,0.0}; | ||
}; | ||
}; | ||
class Stage3 | ||
{ | ||
texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; | ||
uvSource = "tex"; | ||
class uvTransform | ||
{ | ||
aside[] = {1.0,0.0,0.0}; | ||
up[] = {0.0,1.0,0.0}; | ||
dir[] = {0.0,0.0,0.0}; | ||
pos[] = {0.0,0.0,0.0}; | ||
}; | ||
}; | ||
class Stage4 | ||
{ | ||
texture="#(argb,8,8,3)color(0,1,1,1)"; | ||
uvSource = "tex"; | ||
class uvTransform | ||
{ | ||
aside[] = {1.0,0.0,0.0}; | ||
up[] = {0.0,1.0,0.0}; | ||
dir[] = {0.0,0.0,0.0}; | ||
pos[] = {0.0,0.0,0.0}; | ||
}; | ||
}; | ||
class Stage5 | ||
{ | ||
texture="#(argb,8,8,3)color(1,1,1,1)"; | ||
uvSource = "tex"; | ||
class uvTransform | ||
{ | ||
aside[] = {1.0,0.0,0.0}; | ||
up[] = {0.0,1.0,0.0}; | ||
dir[] = {0.0,0.0,0.0}; | ||
pos[] = {0.0,0.0,0.0}; | ||
}; | ||
}; | ||
class Stage6 | ||
{ | ||
texture = "#(ai,64,128,1)fresnel(1.5,1.22)"; | ||
uvSource = "tex"; | ||
class uvTransform | ||
{ | ||
aside[] = {1.0,0.0,0.0}; | ||
up[] = {0.0,1.0,0.0}; | ||
dir[] = {0.0,0.0,0.0}; | ||
pos[] = {0.0,0.0,0.0}; | ||
}; | ||
}; | ||
class Stage7 | ||
{ | ||
texture = "a3\data_f\env_land_co.paa"; | ||
uvSource = "tex"; | ||
class uvTransform | ||
{ | ||
aside[] = {1.0,0.0,0.0}; | ||
up[] = {0.0,1.0,0.0}; | ||
dir[] = {0.0,0.0,0.0}; | ||
pos[] = {0.0,0.0,0.0}; | ||
}; | ||
}; |
Binary file not shown.
Oops, something went wrong.