mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-28 12:53:02 +05:00
Merge pull request #43 from rshoe-git/vmanipremovalfix
undo vmanip hooks removal + add vmlegs check
This commit is contained in:
commit
7f16185de1
6 changed files with 31 additions and 3 deletions
|
@ -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*.
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 = ""
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue