Skip to content

Commit

Permalink
fix: fix lua error on round end
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinFunk committed Feb 11, 2018
1 parent 5a3d72d commit 9533132
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
13 changes: 6 additions & 7 deletions lua/ps2/client/cl_0_pointshop2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,16 @@ function Pointshop2.HidePacOnSpectate( )
if LocalPlayer( ):GetObserverMode() == OBS_MODE_IN_EYE then
local ply = LocalPlayer( ):GetObserverTarget( )
LocalPlayer( ).lastSpecTarget = ply
if IsValid( ply ) then
pac.ToggleIgnoreEntity( ply, true, "ps2_spectate_firstperson" )
end
else
local ply = LocalPlayer( ).lastSpecTarget
if IsValid( ply ) then
pac.ToggleIgnoreEntity( ply, false, "ps2_spectate_firstperson" )
LocalPlayer( ).lastSpecTarget = nil
end
end

if IsValid( LocalPlayer( ).lastSpecTarget )
and LocalPlayer( ):GetObserverMode() != OBS_MODE_IN_EYE
then
pac.ToggleIgnoreEntity( ply, true, "ps2_spectate_firstperson" )
LocalPlayer( ).lastSpecTarget = nil
end
end
hook.Add( "Think", "PS2_HidePacOnSpectate", Pointshop2.HidePacOnSpectate )

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Pointshop2",
"version": "0.0.0-development",
"version": "2.22.0",
"main": "index.js",
"repository": "[email protected]:Kamshak/Pointshop2.git",
"author": "Valentin Funk <[email protected]>",
Expand All @@ -23,7 +23,7 @@
"upload": "scriptfodder-publish --version-from-package --relative-to=dist",
"sf-release": "semantic-sf-release pre && semantic-sf-release genlog && npm run build && npm run upload && semantic-sf-release post",
"local-pkg": "npm run build && yarn scriptfodder-publish -- --version-from-package --relative-to=dist --zip-only && shx rm -rf dist",
"local-release": "semantic-sf-release pre --debug=false && semantic-sf-release genlog --debug=false && npm run build && npm run upload && semantic-sf-release post --debug=false"
"local-release": "semantic-sf-release pre --debug=false && semantic-sf-release genlog --debug=false && npm run build && npm run upload && semantic-sf-release post --debug=false"
},
"publishConfig": {
"access": "restricted"
Expand All @@ -36,4 +36,4 @@
"generateNotes": {
"footerPartial": "changelog_footer_template.hbs"
}
}
}

0 comments on commit 9533132

Please sign in to comment.