Skip to content

Commit c16d7ec

Browse files
committed
Use server-side animations
1 parent c4047d6 commit c16d7ec

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

scripts/vscripts/tfco_donations.nut

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ getroottable()[EventsID] <-
1111
if (!Convars.GetBool("sm_tfco_donation_enabled"))
1212
return
1313

14-
// Resupply Locker
14+
// Resupply locker (static text)
1515
local regenerate
1616
while (regenerate = Entities.FindByClassname(regenerate, "func_regenerate"))
1717
{
@@ -31,7 +31,7 @@ getroottable()[EventsID] <-
3131
AddThinkToEnt(worldtext, "ResupplyTextThink")
3232
}
3333

34-
// Control Point
34+
// Control point (rotating text)
3535
local point
3636
while (point = Entities.FindByClassname(point, "team_control_point"))
3737
{
@@ -46,6 +46,10 @@ getroottable()[EventsID] <-
4646
origin = point.GetBoneOrigin(bone)
4747
})
4848

49+
// For smoother bone updates
50+
NetProps.SetPropBool(point, "m_bUseClientSideAnimation", false)
51+
AddThinkToEnt(point, "ControlPointThink")
52+
4953
EntFireByHandle(worldtext, "SetParent", "!activator", -1, point, null)
5054
AddThinkToEnt(worldtext, "ControlPointTextThink")
5155
}
@@ -70,6 +74,12 @@ __CollectGameEventCallbacks(EventsTable)
7074
return -1
7175
}
7276

77+
::ControlPointThink <- function()
78+
{
79+
self.StudioFrameAdvance()
80+
return -1
81+
}
82+
7383
::ControlPointTextThink <- function()
7484
{
7585
local parent = NetProps.GetPropEntity(self, "m_hMoveParent")

0 commit comments

Comments
 (0)