-
Notifications
You must be signed in to change notification settings - Fork 739
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
SPE Compat - Add interaction anims to SPE vehicles #10226
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,12 +1,57 @@ | ||
class CfgVehicles { | ||
class SPE_Halftrack_base; | ||
class SPE_US_M3_Halftrack_Fuel: SPE_Halftrack_base { | ||
EGVAR(refuel,hooks)[] = {{-0.23,-2.58,-0.59}}; | ||
EGVAR(refuel,fuelCargo) = 2000; | ||
}; | ||
class SPE_OpelBlitz_base; | ||
class SPE_OpelBlitz_Fuel: SPE_OpelBlitz_base { | ||
EGVAR(refuel,hooks)[] = {{-0.23,-2.58,-0.59}}; | ||
EGVAR(refuel,fuelCargo) = 2000; | ||
// Vehicle animation interactions | ||
class SPE_Car_base; | ||
class SPE_G503_MB_base: SPE_Car_base { | ||
class EGVAR(interaction,anims) { | ||
class hide_jerry_can_source { | ||
positions[] = {"_target selectionPosition ['hide_jerry_can', 'ViewGeometry', 'AveragePoint']"}; | ||
items[] = {"Land_CanisterFuel_F"}; | ||
name = ECSTRING(refuel,TakeFuelCanister); | ||
text = ECSTRING(refuel,TakeFuelCanisterAction); | ||
}; | ||
}; | ||
}; | ||
|
||
class SPE_Truck_base; | ||
class SPE_CCKW_353_Base: SPE_Truck_base { | ||
class EGVAR(interaction,anims) { | ||
class spare_fuel_hide_source { | ||
positions[] = {{0.8, 1.8, -1}, {-0.8, 1.8, -1}, {0.8, 3.5, -1}, {-0.8, 3.5, -1}}; | ||
items[] = {"Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F"}; | ||
name = ECSTRING(refuel,TakeFuelCanister); | ||
text = ECSTRING(refuel,TakeFuelCanisterAction); | ||
}; | ||
}; | ||
}; | ||
class SPE_CCKW_353_Ammo: SPE_CCKW_353_Base { | ||
class EGVAR(interaction,anims): EGVAR(interaction,anims) { | ||
class spare_fuel_hide_source: spare_fuel_hide_source { | ||
positions[] = {{0.8, 1.8, -0.85}, {-0.8, 1.8, -0.85}, {0.8, 3.5, -0.85}, {-0.8, 3.5, -0.85}}; | ||
}; | ||
}; | ||
}; | ||
class SPE_CCKW_353_Repair: SPE_CCKW_353_Base { | ||
class EGVAR(interaction,anims): EGVAR(interaction,anims) { | ||
class spare_fuel_hide_source: spare_fuel_hide_source { | ||
positions[] = {{0.8, 1.9, -0.85}, {-0.8, 1.9, -0.85}, {0.8, 3.6, -0.85}, {-0.8, 3.6, -0.85}}; | ||
}; | ||
}; | ||
}; | ||
class SPE_CCKW_353_Fuel: SPE_CCKW_353_Base { | ||
class EGVAR(interaction,anims): EGVAR(interaction,anims) { | ||
class spare_fuel_hide_source: spare_fuel_hide_source { | ||
positions[] = {{0.8, 1.25, -0.8}, {-0.8, 1.25, -0.8}, {0.8, 2.95, -0.8}, {-0.8, 2.95, -0.8}, {0.8, -1, -0.3}, {-0.8, -1, -0.3}}; | ||
items[] = { // 32x | ||
"Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", | ||
"Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", | ||
"Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", | ||
"Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", | ||
"Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", | ||
"Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", | ||
"Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", | ||
"Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F" | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; |
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,106 @@ | ||
class CfgVehicles { | ||
// Vehicle animation interactions | ||
class SPE_Car_base; | ||
class SPE_G503_MB_base: SPE_Car_base { | ||
class EGVAR(interaction,anims) { | ||
class hide_spare_wheel_source { | ||
positions[] = {"_target selectionPosition ['hide_spare_wheel', 'ViewGeometry', 'AveragePoint']"}; | ||
items[] = {"ACE_Wheel"}; | ||
name = ECSTRING(repair,RemoveWheel); | ||
text = ECSTRING(repair,RemovingWheel); | ||
}; | ||
}; | ||
}; | ||
|
||
class SPE_Truck_base; | ||
class SPE_CCKW_353_Base: SPE_Truck_base { | ||
class EGVAR(interaction,anims) { | ||
class spare_wheel_hide_source { | ||
positions[] = {{-0.9, 0.35, -0.95}}; | ||
items[] = {"ACE_Wheel"}; | ||
name = ECSTRING(repair,RemoveWheel); | ||
text = ECSTRING(repair,RemovingWheel); | ||
}; | ||
}; | ||
}; | ||
class SPE_CCKW_353_Ammo: SPE_CCKW_353_Base { | ||
class EGVAR(interaction,anims): EGVAR(interaction,anims) { | ||
class spare_wheel_hide_source: spare_wheel_hide_source { | ||
positions[] = {{-0.9, 0.35, -0.8}}; | ||
}; | ||
}; | ||
}; | ||
|
||
class SPE_R200_base: SPE_Car_base { | ||
class EGVAR(interaction,anims) { | ||
class hide_spare_wheel_source { | ||
positions[] = {"_target selectionPosition ['hide_sparetire', 'FireGeometry', 'AveragePoint']"}; | ||
items[] = {"ACE_Wheel"}; | ||
name = ECSTRING(repair,RemoveWheel); | ||
text = ECSTRING(repair,RemovingWheel); | ||
}; | ||
}; | ||
}; | ||
|
||
class SPE_Tank_base; | ||
class SPE_M18_Hellcat_Base: SPE_Tank_base { | ||
class EGVAR(interaction,anims) { | ||
class hull_armour_hide_source { | ||
positions[] = {"_target selectionPosition ['spare_track_hull', 'FireGeometry', 'AveragePoint']"}; | ||
items[] = {"ACE_Track", "ACE_Track", "ACE_Track"}; | ||
name = ECSTRING(repair,RemoveTrack); | ||
text = ECSTRING(repair,RemovingTrack); | ||
}; | ||
}; | ||
}; | ||
|
||
class SPE_PzKpfwV_base: SPE_Tank_base { | ||
class EGVAR(interaction,anims) { | ||
class spare_tracks_hide_source { | ||
selections[] = {"spare_tracks"}; | ||
positions[] = {"private _pos = _target selectionPosition 'spare_tracks'; _pos set [0, -(_pos select 0)]; _pos"}; // Mirror position to other side of vehicle | ||
items[] = {"ACE_Track", "ACE_Track", "ACE_Track"}; | ||
name = ECSTRING(repair,RemoveTrack); | ||
text = ECSTRING(repair,RemovingTrack); | ||
}; | ||
}; | ||
}; | ||
|
||
class SPE_PzKpfwVI_H1_base: SPE_Tank_base { | ||
class EGVAR(interaction,anims) { | ||
class hull_armour_hide_source { | ||
positions[] = {{-1.3, 1.7, -0.75}, {1.1, 1.7, -0.75}, {-0.05, 2.35, -1.5}}; | ||
items[] = {"ACE_Track", "ACE_Track", "ACE_Track", "ACE_Track", "ACE_Track"}; | ||
name = ECSTRING(repair,RemoveTrack); | ||
text = ECSTRING(repair,RemovingTrack); | ||
}; | ||
class turret_armour_hide_source { | ||
// Rotate interactions with turret rotation | ||
positions[] = { | ||
"[0, -0.6, 0] vectorAdd ([[1.2, 0, -0.2], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)", | ||
"[0, -0.6, 0] vectorAdd ([[-1.3, -0.3, -0.2], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)" | ||
}; | ||
items[] = {"ACE_Track", "ACE_Track"}; | ||
name = ECSTRING(repair,RemoveTrack); | ||
text = ECSTRING(repair,RemovingTrack); | ||
}; | ||
}; | ||
}; | ||
|
||
class SPE_Jagdpanther_G1_base: SPE_Tank_base { | ||
class EGVAR(interaction,anims) { | ||
class hide_spare_tracks_left_source { | ||
positions[] = {"private _pos = _target selectionPosition ['hide_spare_tracks_right', 'FireGeometry', 'AveragePoint']; _pos set [0, -(_pos select 0)]; _pos vectorAdd [0, 0.335, 0]"}; | ||
items[] = {"ACE_Track"}; | ||
name = ECSTRING(repair,RemoveTrack); | ||
text = ECSTRING(repair,RemovingTrack); | ||
}; | ||
class hide_spare_tracks_right_source { | ||
positions[] = {"_target selectionPosition ['hide_spare_tracks_right', 'FireGeometry', 'AveragePoint']"}; | ||
items[] = {"ACE_Track", "ACE_Track"}; | ||
name = ECSTRING(repair,RemoveTrack); | ||
text = ECSTRING(repair,RemovingTrack); | ||
}; | ||
}; | ||
}; | ||
}; |
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,27 @@ | ||
#include "script_component.hpp" | ||
|
||
class CfgPatches { | ||
class SUBADDON { | ||
name = COMPONENT_NAME; | ||
units[] = {}; | ||
weapons[] = {}; | ||
requiredVersion = REQUIRED_VERSION; | ||
requiredAddons[] = { | ||
"ww2_spe_assets_c_weapons_infantryweapons_c", | ||
"ww2_spe_assets_c_vehicles_staticweapons_c", | ||
"ww2_spe_assets_c_vehicles_weapons_c", | ||
"ww2_spe_core_f_system_staticweapons_f", | ||
"ww2_spe_core_c_core_c_eventhandlers", | ||
"ace_repair" | ||
}; | ||
skipWhenMissingDependencies = 1; | ||
author = ECSTRING(common,ACETeam); | ||
authors[] = {"johnb43"}; | ||
url = ECSTRING(main,URL); | ||
VERSION_CONFIG; | ||
|
||
addonRootClass = QUOTE(ADDON); | ||
}; | ||
}; | ||
|
||
#include "CfgVehicles.hpp" |
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,3 @@ | ||
#define SUBCOMPONENT repair | ||
#define SUBCOMPONENT_BEAUTIFIED Repair | ||
#include "..\script_component.hpp" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm worried about physx collisions,
we don't have to be exact on the number imho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EFUNC(common,findUnloadPosition)
handles finding an empty space. I'll test this more, but I don't think there's much of a reason to be worried.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ace_interaction_fnc_initAnimActions:
also code will try to spawn as many as it can but won't fail if it can't find room for all of them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I changed it to work like that, because I'm not sure what to consider a success otherwise.