update heading in rotation for heading or 0

This commit is contained in:
Christian J Bennett committed 2025-02-22 14:27:04 -06:00
1 parent f8d46b9f7b
commit e5301da6ab
1 file changed
+1 -1
+1 -1
View File
@@ -90,7 +90,7 @@ if not isServer then goto client end
function ReboundEntities.Create(entityData, src)
local entity = ReboundEntities.Register(entityData)
assert(entity and entity.position, "Invalid entity data")
entity.rotation = entity.rotation or vector3(0, 0, 0)
entity.rotation = entity.rotation or vector3(0, 0, entityData.heading or 0)
TriggerClientEvent(GetCurrentResourceName() .. ":client:CreateReboundEntity", src or -1, entity)
return entity
end