undo vmanip hooks removal + add vmlegs check

This commit is contained in:
YuRaNnNzZZ 2023-08-02 22:51:36 +03:00
parent 33eb4692f6
commit cb24ecbbd6
No known key found for this signature in database
GPG key ID: 5F71738C85A6006D
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/) Installer source can be found [here](/BeatrunAnimInstaller/)
# Installation # 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!** 1. **Delete `beatrun` folder in *addons* if you have one!**
2. Extract `beatrun` folder to *your_game_folder/garrysmod/addons*. 2. Extract `beatrun` folder to *your_game_folder/garrysmod/addons*.
3. Extract `lua` folder to *your_game_folder/garrysmod*. 3. Extract `lua` folder to *your_game_folder/garrysmod*.

View file

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

View file

@ -355,6 +355,20 @@ hook.Add("PreDrawTranslucentRenderables", "ae", function()
end end
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() function SWEP:PrimaryAttack()
if self:Clip1() < 1 then if self:Clip1() < 1 then
self:DryFire() self:DryFire()

View file

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

View file

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

View file

@ -88,6 +88,10 @@ local function SlidingAnimStart()
BodyLimitY = 80 BodyLimitY = 80
BodyLimitX = 40 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 if game.SinglePlayer() and not net.ReadBool() or not game.SinglePlayer() and not ply.DiveSliding then
CamIgnoreAng = false CamIgnoreAng = false
camjoint = ply:GetSlidingSlippery() and "eyes" or "CameraJoint" camjoint = ply:GetSlidingSlippery() and "eyes" or "CameraJoint"