Improve entity spawning and target behaviors
Refactored client entity spawning to handle missing models and improved coordinate update sensitivity. Removed model assertion from server entity creation. Enhanced resource start event handling for both server and client. Updated stash and target behaviors to support additional properties and better zone handling for entities without spawned objects.
This commit is contained in:
1 parent
dff4622a94
commit
7443695254
5 files changed
+59
-36
No files matched your search
@@ -104,8 +104,18 @@ AddEventHandler("onResourceStop", function(resourceName)
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler("onResourceStart", function(resourceName)
|
||||
Behaviors.Init()
|
||||
end)
|
||||
if IsDuplicityVersion() then
|
||||
RegisterNetEvent("onResourceStart", function(resourceName)
|
||||
if resourceName ~= GetCurrentResourceName() then return end
|
||||
Wait(500)
|
||||
Behaviors.Init()
|
||||
end)
|
||||
else
|
||||
RegisterNetEvent("onClientResourceStart", function(resource)
|
||||
if resource ~= GetCurrentResourceName() then return end
|
||||
Wait(500)
|
||||
Behaviors.Init()
|
||||
end)
|
||||
end
|
||||
|
||||
return Behaviors
|
||||
Reference in new issue
Block a user