-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create the ion cannon * Stop viewmodel shake upon firing * Disable vm shake correctly * Reduce charge recoil * Increase explosion radius * Reduce damage falloff * Improve killicon brightness * Holy hell just disable the vm shake already * Fix charge gun prediction * Use bullet callback for the explosion * Tweak explosion visuals * Further reduce explosion visual to better match main area of damage * Increase explosion radius * Fix nil error * Prevent collisions with owner * Manually compensate lag * Optimize * Properly deny holster while releasing * Add one-time hints for the ion cannon, bonk shotgun, and shaped charge * Auto-create convars to persist hint seen status across sessions * Add first-time hint for the trash blaster * Default functions * Fix owner charge step sound * Create charge sprite * Fix sound and step callback not running for final charge * Fix sprite sometimes appearing full size for one tick * Tweak ion cannon charge sprite * Fix nil error when sprite update is late * Force overcharge on ion cannon if fired beyond limits * Remove dead comments * Remove unnecessary IsValid() checks * :Remove() already delays by a tick * Replace anim timer with think function * AddPAS() instead
- Loading branch information
1 parent
b99528c
commit 2fba8c2
Showing
70 changed files
with
1,184 additions
and
109 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
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 +1,54 @@ | ||
local hintConvars = {} | ||
|
||
|
||
list.Set( "ContentCategoryIcons", "CFC", "icon16/star.png" ) | ||
|
||
|
||
-- Most reliable way on client to listen when a weapon is equipped without using net messages. | ||
-- Only misses if the weapon is given via initial loadout on spawn, which is fine in this case. | ||
hook.Add( "HUDWeaponPickedUp", "CFC_PvPWeapons_FirstTimeHints", function( wep ) | ||
if not IsValid( wep ) then return end | ||
|
||
local hints = wep.CFC_FirstTimeHints | ||
if not hints then return end | ||
|
||
local class = wep:GetClass() | ||
local convar = hintConvars[class] | ||
|
||
if not convar then | ||
convar = CreateClientConVar( "cfc_pvp_weapons_hint_seen_" .. class, "0", true, false ) | ||
hintConvars[class] = convar | ||
end | ||
|
||
if convar:GetInt() == 1 then return end | ||
|
||
convar:SetInt( 1 ) | ||
|
||
local hintInd = 1 | ||
|
||
local function showHint() | ||
local hint = hints[hintInd] | ||
if not hint then return end | ||
|
||
local message = hint.Message | ||
local soundPath = hint.Sound | ||
local duration = hint.Duration or 8 | ||
local delayNext = hint.DelayNext or 0 | ||
|
||
if soundPath == nil then | ||
soundPath = "ambient/water/drip1.wav" | ||
end | ||
|
||
notification.AddLegacy( message, NOTIFY_HINT, duration ) | ||
|
||
if soundPath then | ||
surface.PlaySound( soundPath ) | ||
end | ||
|
||
hintInd = hintInd + 1 | ||
|
||
timer.Simple( delayNext, showHint ) | ||
end | ||
|
||
showHint() | ||
end ) |
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
Oops, something went wrong.