Merge pull request #43 from rshoe-git/vmanipremovalfix

undo vmanip hooks removal + add vmlegs check
This commit is contained in:
Jonny_Bro (Nikita) 2023-08-03 07:08:01 +05:00 committed by GitHub
commit 7f16185de1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 3 deletions

View file

@ -8,7 +8,6 @@ You can use *Beatrun Animations Installer* if you want to change your animations
Installer source can be found [here](/BeatrunAnimInstaller/)
# Installation
> Beatrun shouldn't conflict with Workshop VManip, but if it does, delete or disable it.<br>
1. **Delete `beatrun` folder in *addons* if you have one!**
2. Extract `beatrun` folder to *your_game_folder/garrysmod/addons*.
3. Extract `lua` folder to *your_game_folder/garrysmod*.

View file

@ -202,6 +202,9 @@ local function RabbitCalcView(ply, origin, ang)
neweye = true
ply:CLViewPunch(Angle(12, 0, 0))
if VManip then
VManip:PlayAnim("vault")
end
end
origin:Set(LerpVector(endlerp, lastpos, origin))

View file

@ -355,6 +355,20 @@ hook.Add("PreDrawTranslucentRenderables", "ae", function()
end
end)
hook.Add("VManipVMEntity", "ae", function()
local ply = LocalPlayer()
local activewep = ply:GetActiveWeapon()
if activewep.CLVM then return activewep.CLVM end
end)
hook.Add("VManipLegsVMEntity", "ae", function()
local ply = LocalPlayer()
local activewep = ply:GetActiveWeapon()
if activewep.CLVM then return activewep.CLVM end
end)
function SWEP:PrimaryAttack()
if self:Clip1() < 1 then
self:DryFire()

View file

@ -10,6 +10,10 @@ if CLIENT then
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = false
hook.Add("VManipPrePlayAnim", "LOCNoVManip", function()
if LocalPlayer():GetActiveWeapon():GetClass() == "runnerhands" or blinded then return false end
end)
end
SWEP.Author = ""

View file

@ -5,7 +5,9 @@ end
function DoJumpTurn(lookbehind)
if not LocalPlayer():Alive() then return end
VMLegs:Remove()
if VMLegs and VMLegs:IsActive() then
VMLegs:Remove()
end
BodyAnim:SetSequence("jumpturnfly")
BodyAnimCycle = 0
@ -30,7 +32,9 @@ end
function DoJumpTurnStand()
if not LocalPlayer():Alive() then return end
VMLegs:Remove()
if VMLegs and VMLegs:IsActive() then
VMLegs:Remove()
end
local activewep = LocalPlayer():GetActiveWeapon()

View file

@ -88,6 +88,10 @@ local function SlidingAnimStart()
BodyLimitY = 80
BodyLimitX = 40
if VMLegs and VMLegs:IsActive() then
VMLegs:Remove()
end
if game.SinglePlayer() and not net.ReadBool() or not game.SinglePlayer() and not ply.DiveSliding then
CamIgnoreAng = false
camjoint = ply:GetSlidingSlippery() and "eyes" or "CameraJoint"