Files
community_bridge/lib/utility/shared/rebound_entitiy_actions.lua
T
gononono64 8fd5de2d4e lib structure overhaul
restructured lib portion to match modules
also edited community bridges onplayerunload fire to accept the passed src as it was otherwise nil
2025-03-30 21:06:58 -05:00

36 lines
1.2 KiB
Lua

-- local ReboundEntities = ReboundEntities or Require("shared/rebound_entities.lua")
-- local Actions = Actions or Require("shared/actions.lua")
-- local LA = LA or Require("shared/la.lua")
-- REA = {}
-- if not IsDuplicityVersion() then goto client end
-- if IsDuplicityVersion() then return end
-- ::client::
-- local ActionsInProgress = {}
-- Action.Create("LerpToPosition", function(reboundId, start, position, duration, shouldRepeat, overrideStartTime)
-- local re = ReboundEntities.Get(reboundId)
-- assert(re, "Rebound entity not found")
-- local entity = re and re.entity
-- if not entity then return end
-- local startTime = GetGameTimer()
-- local endTime = overrideStartTime or startTime + duration
-- ActionsInProgress[reboundId] = {reboundId, start, position, duration, shouldRepeat, startTime}
-- local t = 0
-- CreateThread(function()
-- while shouldRepeat or t < 1 do
-- t = (GetGameTimer() - startTime) / duration
-- local lerpPosition = LA.LerpVector(start, position, t)
-- SetEntityCoords(entity, lerpPosition)
-- Wait(0)
-- end
-- end)
-- end)