diff options
author | EladNLG <44613424+EladNLG@users.noreply.github.com> | 2022-01-12 20:09:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 15:09:08 -0300 |
commit | 7051354fd59254b51ae6abb3e829d03723845c18 (patch) | |
tree | b8dcde62a56a80909c18fb2d67f2a6661435ecfb /Northstar.Custom/mod | |
parent | 398b9439edc2fa51c284f09fa9ea30cfb0403043 (diff) | |
download | NorthstarMods-7051354fd59254b51ae6abb3e829d03723845c18.tar.gz NorthstarMods-7051354fd59254b51ae6abb3e829d03723845c18.zip |
Peacekraber Bug fixing + balance update. (#103)
* peacekraber fix i have no idea why this works but it does and therefore I do not intend to take into calculation anyone else's opinion on the matter.
* Balance update for peacekraber
Now requires to hit weak spots to damage a titan.
Increased fire rate (1.33 -> 4.0) and rechamber time (0.756 -> 0.924) to make it look more fluid.
Increased damage (11 -> 15) to decrease the distance between it and the mastiff (as it is pretty much overall a slower mastiff that reaches further)
Increased titan damage (20-15 -> 40-30).
* Fix error when respawning after killreplay (PK)
* Add OnWeaponOwnerChanged callback
* Fixed crosshair persisting after picking up another weapon instead of the peacekraber
Diffstat (limited to 'Northstar.Custom/mod')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/weapons/mp_weapon_peacekraber.nut | 23 | ||||
-rw-r--r-- | Northstar.Custom/mod/scripts/weapons/mp_weapon_peacekraber.txt | 28 |
2 files changed, 36 insertions, 15 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/weapons/mp_weapon_peacekraber.nut b/Northstar.Custom/mod/scripts/vscripts/weapons/mp_weapon_peacekraber.nut index a9da541f..b910cff3 100644 --- a/Northstar.Custom/mod/scripts/vscripts/weapons/mp_weapon_peacekraber.nut +++ b/Northstar.Custom/mod/scripts/vscripts/weapons/mp_weapon_peacekraber.nut @@ -5,6 +5,7 @@ untyped global function OnWeaponPrimaryAttack_peacekraber; global function OnWeaponDeactivate_peacekraber global function OnWeaponActivate_peacekraber +global function OnWeaponOwnerChanged_weapon_peacekraber #if SERVER global function OnWeaponNpcPrimaryAttack_peacekraber @@ -47,8 +48,19 @@ void function OnWeaponActivate_peacekraber (entity weapon) { void function OnWeaponDeactivate_peacekraber (entity weapon) { #if CLIENT + if (!IsValid( weapon.GetWeaponOwner() )) return if (!weapon.GetWeaponOwner().IsPlayer() || weapon.GetWeaponOwner() != GetLocalViewPlayer()) return; - isWeaponActive = false; + isWeaponActive = false + #endif +} + +void function OnWeaponOwnerChanged_weapon_peacekraber (entity weapon, WeaponOwnerChangedParams changeParams) +{ + #if CLIENT + if (changeParams.oldOwner == GetLocalViewPlayer()) + { + isWeaponActive = false + } #endif } #if CLIENT @@ -60,7 +72,11 @@ void function CrosshairCycle() { int chargeLevel; float chargeFrac; while (isWeaponActive) { - WaitFrame() + if (!IsValid( clientWeapon )) + { + isWeaponActive = false + continue + } chargeLevel = clientWeapon.GetWeaponChargeLevel(); chargeFrac = clientWeapon.GetWeaponChargeFraction(); RuiSetFloat3(rui, "teamColor", colors[chargeLevel]); @@ -89,6 +105,7 @@ void function CrosshairCycle() { default: break; } + WaitFrame() } RuiDestroy(rui); @@ -159,4 +176,4 @@ function FireWeaponPlayerAndNPC( WeaponPrimaryAttackParams attackParams, bool pl } return 1 -}
\ No newline at end of file +} diff --git a/Northstar.Custom/mod/scripts/weapons/mp_weapon_peacekraber.txt b/Northstar.Custom/mod/scripts/weapons/mp_weapon_peacekraber.txt index 59219cab..464a9429 100644 --- a/Northstar.Custom/mod/scripts/weapons/mp_weapon_peacekraber.txt +++ b/Northstar.Custom/mod/scripts/weapons/mp_weapon_peacekraber.txt @@ -21,6 +21,7 @@ WeaponData "OnWeaponActivate" "OnWeaponActivate_peacekraber" "OnWeaponDeactivate" "OnWeaponDeactivate_peacekraber" "OnWeaponPrimaryAttack" "OnWeaponPrimaryAttack_peacekraber" + "OnWeaponOwnerChanged" "OnWeaponOwnerChanged_weapon_peacekraber" "OnWeaponChargeLevelIncreased" "OnWeaponChargeLevelIncreased_titanweapon_sniper" "OnWeaponNpcPrimaryAttack" "OnWeaponNpcPrimaryAttack_peacekraber" @@ -59,7 +60,8 @@ WeaponData "charge_drain_sound_1p" "Weapon_Titan_Sniper_WindDown" "charge_drain_sound_stop_when_empty" "1" "charge_drain_sound_seek_to_charge_fraction" "1" - // Spread + "charge_remain_full_when_fired" "0" + // Spread "spread_stand_hip" "0" "spread_stand_hip_run" "0" "spread_stand_hip_sprint" "0" @@ -73,27 +75,28 @@ WeaponData "damage_type" "bullet" "damage_near_distance" "500" "damage_far_distance" "1000" - "damage_near_value" "11" - "damage_far_value" "11" - "damage_near_value_titanarmor" "20" - "damage_far_value_titanarmor" "15" + "damage_near_value" "15" + "damage_far_value" "15" + "damage_near_value_titanarmor" "40" + "damage_far_value_titanarmor" "30" // Ammo "ammo_stockpile_max" "20" + "ammo_no_remove_from_stockpile" "1" "ammo_default_total" "25" "ammo_clip_size" "5" "ammo_size_segmented_reload" "5" "ammo_display_as_clips" "0" "reload_is_segmented" "0" - "reload_time" "2.45" - "reload_time_late1" "2.175" + "reload_time" "2.5" + "reload_time_late1" "2.2" "reload_time_late2" "0" - "reloadempty_time" "3.35" + "reloadempty_time" "3.5" "reloadempty_time_late1" "2.5" "reloadempty_time_late2" "1.7" "reloadempty_time_late2" "1.1" - "rechamber_time" "0.756" + "rechamber_time" "0.924" "viewmodel_offset_ads" "0 0 0" @@ -129,12 +132,13 @@ WeaponData "bolt_hitsize_growfinal_lerptime" "0.18" "bolt_hitsize_growfinal_size" "6.0" "bolt_bounce_frac" "1.0" - + "titanarmor_critical_hit_required" "1" + "critical_hit" "1" "bolt_gravity_enabled" "1" // Behavior - "fire_rate" "1.33" + "fire_rate" "4.0" "zoom_time_in" "0.2" "zoom_time_out" "0.2" "zoom_fov" "50" @@ -340,4 +344,4 @@ WeaponData "ui" "ui/crosshair_lstar" "base_spread" "4" } -}
\ No newline at end of file +} |