Skip to content

Commit

Permalink
Add Protube events to weapons
Browse files Browse the repository at this point in the history
  • Loading branch information
fholger committed Nov 17, 2023
1 parent bc91916 commit 2563158
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 1 deletion.
12 changes: 12 additions & 0 deletions FCData/scripts/Default/Entities/Weapons/AG36.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ AG36SP = {
BHapticsFireRight = "m4_fire_r",
BHapticsFireLeft = "m4_fire_l",
BHapticsIntensity = 0.1,
ProtubeKickPower = 0.7,
ProtubeRumblePower = 0,
ProtubeRumbleSeconds = 0,

ScopeTexId = GetScopeTex(),

Expand Down Expand Up @@ -196,6 +199,9 @@ AG36SP = {
BHapticsFireRight = "rl_fire_r",
BHapticsFireLeft = "rl_fire_l",
BHapticsIntensity = 0.3,
ProtubeKickPower = 1.0,
ProtubeRumblePower = 0.8,
ProtubeRumbleSeconds = 1.0,

SoundMinMaxVol = { 255, 4, 2600 },

Expand Down Expand Up @@ -287,6 +293,9 @@ AG36MP = {
BHapticsFireRight = "m4_fire_r",
BHapticsFireLeft = "m4_fire_l",
BHapticsIntensity = 0.1,
ProtubeKickPower = 0.7,
ProtubeRumblePower = 0,
ProtubeRumbleSeconds = 0,

ScopeTexId = GetScopeTex(),

Expand Down Expand Up @@ -419,6 +428,9 @@ AG36MP = {
BHapticsFireRight = "rl_fire_r",
BHapticsFireLeft = "rl_fire_l",
BHapticsIntensity = 0.3,
ProtubeKickPower = 1.0,
ProtubeRumblePower = 0.8,
ProtubeRumbleSeconds = 1.0,

SoundMinMaxVol = { 255, 4, 2600 },

Expand Down
3 changes: 3 additions & 0 deletions FCData/scripts/Default/Entities/Weapons/BasicWeapon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,9 @@ function BasicWeapon.Client:OnFire( Params )
my_player.cnt:TriggerBHapticsEffect("recoilarm_r", "recoilarm_l", 1 + CurFireParams.BHapticsIntensity);
my_player.cnt:TriggerBHapticsEffect("recoilvisor", "recoilvisor", 1 + CurFireParams.BHapticsIntensity);
end
if (CurFireParams.ProtubeKickPower ~= nil) then
my_player.cnt:TriggerProtubeEffect(CurFireParams.ProtubeKickPower, CurFireParams.ProtubeRumblePower, CurFireParams.ProtubeRumbleSeconds);
end
end

self.bFiredShot = 1;
Expand Down
5 changes: 4 additions & 1 deletion FCData/scripts/Default/Entities/Weapons/Falcon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ Falcon = {
BHapticsFireRight = "pistol_fire_r",
BHapticsFireLeft = "pistol_fire_l",
BHapticsIntensity = 0.1,

ProtubeKickPower = 0.6,
ProtubeRumblePower = 0.0,
ProtubeRumbleSeconds = 0.0,

ShellCases = {
geometry=System:LoadObject("Objects/Weapons/shells/smgshell.cgf"),
focus = 1.5,
Expand Down
3 changes: 3 additions & 0 deletions FCData/scripts/Default/Entities/Weapons/M249.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ M249 = {

DrySound = "Sounds/Weapons/DE/dryfire.wav",
HapticFireEffect = "m4_fire",
ProtubeKickPower = 0.5,
ProtubeRumblePower = 0.0,
ProtubeRumbleSeconds = 0.0,

LightFlash = {
fRadius = 3.0,
Expand Down
6 changes: 6 additions & 0 deletions FCData/scripts/Default/Entities/Weapons/M4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ M4 = {
BHapticsFireRight = "m4_fire_r",
BHapticsFireLeft = "m4_fire_l",
BHapticsIntensity = 0.07,
ProtubeKickPower = 0.5,
ProtubeRumblePower = 0.0,
ProtubeRumbleSeconds = 0.0,

LightFlash = {
fRadius = 3.0,
Expand Down Expand Up @@ -219,6 +222,9 @@ M4 = {
BHapticsFireRight = "pistol_fire_r",
BHapticsFireLeft = "pistol_fire_l",
BHapticsIntensity = 0.1,
ProtubeKickPower = 0.7,
ProtubeRumblePower = 0.0,
ProtubeRumbleSeconds = 0.0,

ShellCases = {
geometry=System:LoadObject("Objects/Weapons/shells/rifleshell.cgf"),
Expand Down
3 changes: 3 additions & 0 deletions FCData/scripts/Default/Entities/Weapons/MG.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ MG = {
BHapticsFireRight = "m4_fire_r",
BHapticsFireLeft = "m4_fire_l",
BHapticsIntensity = 0.1,
ProtubeKickPower = 0.5,
ProtubeRumblePower = 0.0,
ProtubeRumbleSeconds = 0.0,

LightFlash = {
fRadius = 5.0,
Expand Down
6 changes: 6 additions & 0 deletions FCData/scripts/Default/Entities/Weapons/MP5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ MP5 = {
BHapticsFireRight = "m4_fire_r",
BHapticsFireLeft = "m4_fire_l",
BHapticsIntensity = 0.07,
ProtubeKickPower = 0.4,
ProtubeRumblePower = 0.0,
ProtubeRumbleSeconds = 0.0,

SmokeEffect = {
size = {0.15,0.07,0.035,0.01},
Expand Down Expand Up @@ -178,6 +181,9 @@ MP5 = {
BHapticsFireRight = "m4_fire_r",
BHapticsFireLeft = "m4_fire_l",
BHapticsIntensity = 0.1,
ProtubeKickPower = 0.6,
ProtubeRumblePower = 0.0,
ProtubeRumbleSeconds = 0.0,

LightFlash = {
fRadius = 3.0,
Expand Down
3 changes: 3 additions & 0 deletions FCData/scripts/Default/Entities/Weapons/Mortar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Mortar = {
},
DrySound = "Sounds/Weapons/Mortar/DryFire.wav",
HapticFireEffect = "mortar_fire",
ProtubeKickPower = 1.0,
ProtubeRumblePower = 0.8,
ProtubeRumbleSeconds = 1.0,

LightFlash = {
fRadius = 5.0,
Expand Down
12 changes: 12 additions & 0 deletions FCData/scripts/Default/Entities/Weapons/OICW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ OICWSP = {
BHapticsFireRight = "m4_fire_r",
BHapticsFireLeft = "m4_fire_l",
BHapticsIntensity = 0.1,
ProtubeKickPower = 0.3,
ProtubeRumblePower = 0.0,
ProtubeRumbleSeconds = 0.0,

ScopeTexId = GetScopeTex(),

Expand Down Expand Up @@ -197,6 +200,9 @@ OICWSP = {
BHapticsFireRight = "rl_fire_r",
BHapticsFireLeft = "rl_fire_l",
BHapticsIntensity = 0.3,
ProtubeKickPower = 1.0,
ProtubeRumblePower = 0.8,
ProtubeRumbleSeconds = 1.0,

LightFlash = {
fRadius = 3.0,
Expand Down Expand Up @@ -286,6 +292,9 @@ OICWMP = {
BHapticsFireRight = "m4_fire_r",
BHapticsFireLeft = "m4_fire_l",
BHapticsIntensity = 0.1,
ProtubeKickPower = 0.3,
ProtubeRumblePower = 0.0,
ProtubeRumbleSeconds = 0.0,

ScopeTexId = GetScopeTex(),

Expand Down Expand Up @@ -415,6 +424,9 @@ OICWMP = {
BHapticsFireRight = "rl_fire_r",
BHapticsFireLeft = "rl_fire_l",
BHapticsIntensity = 0.3,
ProtubeKickPower = 1.0,
ProtubeRumblePower = 0.8,
ProtubeRumbleSeconds = 1.0,


LightFlash = {
Expand Down
3 changes: 3 additions & 0 deletions FCData/scripts/Default/Entities/Weapons/P90.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ P90 = {
BHapticsFireRight = "m4_fire_r",
BHapticsFireLeft = "m4_fire_l",
BHapticsIntensity = 0.07,
ProtubeKickPower = 0.6,
ProtubeRumblePower = 0.0,
ProtubeRumbleSeconds = 0.0,

LightFlash = {
fRadius = 3.0,
Expand Down
6 changes: 6 additions & 0 deletions FCData/scripts/Default/Entities/Weapons/RL.LUA
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ RLSP = {
BHapticsFireRight = "rl_fire_r",
BHapticsFireLeft = "rl_fire_l",
BHapticsIntensity = 0.4,
ProtubeKickPower = 1.0,
ProtubeRumblePower = 1.0,
ProtubeRumbleSeconds = 1.0,

-- Light from flying rocket is enough so this light is not needed
-- LightFlash = {
Expand Down Expand Up @@ -135,6 +138,9 @@ RLMP = {
BHapticsFireRight = "rl_fire_r",
BHapticsFireLeft = "rl_fire_l",
BHapticsIntensity = 0.4,
ProtubeKickPower = 1.0,
ProtubeRumblePower = 1.0,
ProtubeRumbleSeconds = 1.0,

-- Light from flying rocket is enough so this light is not needed
-- LightFlash = {
Expand Down
3 changes: 3 additions & 0 deletions FCData/scripts/Default/Entities/Weapons/Shotgun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ Shotgun = {
BHapticsFireRight = "shotgun_fire_r",
BHapticsFireLeft = "shotgun_fire_l",
BHapticsIntensity = 0.7,
ProtubeKickPower = 0.8,
ProtubeRumblePower = 0.8,
ProtubeRumbleSeconds = 0.5,

LightFlash = {
fRadius = 5.0,
Expand Down
6 changes: 6 additions & 0 deletions FCData/scripts/Default/Entities/Weapons/SniperRifle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ SniperRifle = {
BHapticsFireRight = "rl_fire_r",
BHapticsFireLeft = "rl_fire_l",
BHapticsIntensity = 0.15,
ProtubeKickPower = 1.0,
ProtubeRumblePower = 1.0,
ProtubeRumbleSeconds = 0.5,

LightFlash = {
fRadius = 3.0,
Expand Down Expand Up @@ -187,6 +190,9 @@ SniperRifle = {
},
DrySound = "Sounds/Weapons/AW50/DryFire.wav",
HapticFireEffect = "sniper_fire",
ProtubeKickPower = 1.0,
ProtubeRumblePower = 1.0,
ProtubeRumbleSeconds = 0.5,

LightFlash = {
fRadius = 3.0,
Expand Down

0 comments on commit 2563158

Please sign in to comment.