Skip to content

Commit

Permalink
refactor: play anim functions to use new lib function. Bumped require…
Browse files Browse the repository at this point in the history
…d ox_lib version to v3.20.0 (#454)
  • Loading branch information
Manason committed Apr 20, 2024
1 parent 061a351 commit d413713
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions bridge/qb/client/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ functions.RequestAnimDict = lib.requestAnimDict
functions.PlayAnim = function(animDict, animName, upperbodyOnly, duration)
local flags = upperbodyOnly and 16 or 0
local runTime = duration or -1
lib.requestAnimDict(animDict)
TaskPlayAnim(cache.ped, animDict, animName, 8.0, 3.0, runTime, flags, 0.0, false, false, true)
RemoveAnimDict(animDict)
lib.playAnim(cache.ped, animDict, animName, 8.0, 3.0, runTime, flags, 0.0, false, false, true)
end

---@deprecated use lib.requestModel from ox_lib
Expand Down
4 changes: 1 addition & 3 deletions modules/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,7 @@ else
function PlayAnim(animDict, animName, upperbodyOnly, duration) -- luacheck: ignore
local flags = upperbodyOnly and 16 or 0
local runTime = duration or -1
lib.requestAnimDict(animDict)
TaskPlayAnim(cache.ped, animDict, animName, 8.0, 3.0, runTime, flags, 0.0, false, false, true)
RemoveAnimDict(animDict)
lib.playAnim(cache.ped, animDict, animName, 8.0, 3.0, runTime, flags, 0.0, false, false, true)
end

---@deprecated use the GetGamePool native directly
Expand Down
2 changes: 1 addition & 1 deletion server/main.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lib.versionCheck('Qbox-project/qbx_core')
assert(lib.checkDependency('ox_lib', '3.16.3', true))
assert(lib.checkDependency('ox_lib', '3.20.0', true))

---@type 'strict'|'relaxed'|'inactive'
local bucketLockDownMode = GetConvar('qbx:bucketlockdownmode', 'inactive')
Expand Down

0 comments on commit d413713

Please sign in to comment.