@@ -28,6 +28,8 @@ using namespace vgui;
2828IMPLEMENT_CLIENTCLASS_DT(C_ObjectTeleporter, DT_ObjectTeleporter, CObjectTeleporter)
2929 RecvPropInt( RECVINFO(m_iState) ),
3030 RecvPropTime( RECVINFO(m_flRechargeTime) ),
31+ RecvPropInt(RECVINFO(m_iTeleportCooldownUsers)),
32+ RecvPropTime(RECVINFO(m_flTeleportCooldownTime)),
3133 RecvPropTime( RECVINFO(m_flCurrentRechargeDuration) ),
3234 RecvPropInt( RECVINFO(m_iTimesUsed) ),
3335 RecvPropFloat( RECVINFO(m_flYawToExit) ),
@@ -99,7 +101,7 @@ void C_ObjectTeleporter::StartChargedEffects()
99101 char szEffect[128 ];
100102
101103 Q_snprintf ( szEffect, sizeof (szEffect), " teleporter_%s_charged_level%d" ,
102- ( GetTeamNumber () == TF_TEAM_RED ) ? " red" : " blue" , GetUpgradeLevel () );
104+ ( GetTeamNumber () == TF_TEAM_RED ) ? " red" : " blue" , MIN ( GetUpgradeLevel (), 3 ) );
103105
104106 Assert ( m_hChargedEffect.m_pObject == NULL );
105107 m_hChargedEffect = ParticleProp ()->Create ( szEffect, PATTACH_ABSORIGIN );
@@ -110,10 +112,11 @@ void C_ObjectTeleporter::StartActiveEffects()
110112 StopActiveEffects ();
111113 char szEffect[128 ];
112114
115+ int iBaseUpgradeLevel = MIN (GetUpgradeLevel (), 3 );
113116 Q_snprintf ( szEffect, sizeof (szEffect), " teleporter_%s_%s_level%d" ,
114117 ( GetTeamNumber () == TF_TEAM_RED ) ? " red" : " blue" ,
115118 GetObjectMode () == MODE_TELEPORTER_ENTRANCE ? " entrance" : " exit" ,
116- GetUpgradeLevel () );
119+ iBaseUpgradeLevel );
117120
118121 Assert ( m_hDirectionEffect.m_pObject == NULL );
119122 m_hDirectionEffect = ParticleProp ()->Create ( szEffect, PATTACH_ABSORIGIN );
@@ -136,7 +139,7 @@ void C_ObjectTeleporter::StartActiveEffects()
136139 m_pSpinSound = NULL ;
137140 }
138141 char szSound[128 ];
139- Q_snprintf ( szSound, sizeof (szSound), " Building_Teleporter.SpinLevel%d" , GetUpgradeLevel () );
142+ Q_snprintf ( szSound, sizeof (szSound), " Building_Teleporter.SpinLevel%d" , iBaseUpgradeLevel );
140143
141144 CLocalPlayerFilter filter;
142145 m_pSpinSound = controller.SoundCreate ( filter, entindex (), szSound );
0 commit comments