Adjust entity movement threshold and follow behavior

Increased the movement threshold for entity updates from 0.05 to 1.0 to reduce unnecessary position updates. Modified follow behavior to offset the entity's coordinates by -1 on the Z axis when updating, possibly to account for ground level or animation adjustments.
This commit is contained in:
Mr.Crowley committed 2025-09-03 01:23:01 -05:00
1 parent dd08f058c3
commit cb9dbdf610
2 files changed
+2 -5

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ function Follow.PedWalkToPos(entityData)
TaskGoStraightToCoord(entity, targetCoords.x, targetCoords.y, targetCoords.z, speed, -1, heading, 0.0)
entityData.coords = GetEntityCoords(entity)
entityData.follow.walking = true
Bridge.ClientEntity.Set(entityData.id, "coords", entityData.coords)
Bridge.ClientEntity.Set(entityData.id, "coords", entityData.coords - vector3(0,0,1))
Bridge.ClientEntity.Set(entityData.id, "follow", entityData.follow)
if entityData.follow.OnExit then entityData.follow.OnExit(entityData) end
return false