File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -119,12 +119,7 @@ func (p *parser) bindBomb() {
119119func (p * parser ) bindTeamStates () {
120120 p .stParser .ServerClasses ().FindByName ("CCSTeam" ).OnEntityCreated (func (entity st.Entity ) {
121121 teamVal := entity .PropertyValueMust ("m_szTeamname" )
122- team := teamVal .StringVal
123-
124- // FIXME: S2 fix
125- if team == "" {
126- team = teamVal .Any .(string )
127- }
122+ team := teamVal .String ()
128123
129124 var s * common.TeamState
130125
@@ -146,22 +141,24 @@ func (p *parser) bindTeamStates() {
146141 s .Entity = entity
147142
148143 // Register updates
149- var score int
150-
151- scoreProp := entity .Property ("m_scoreTotal" )
144+ var (
145+ scoreProp st.Property
146+ score int
147+ )
152148
153- // FIXME: S2 fix
154- if scoreProp == nil {
149+ if p .isSource2 () {
155150 scoreProp = entity .Property ("m_iScore" )
151+ } else {
152+ scoreProp = entity .Property ("m_scoreTotal" )
156153 }
157154
158155 scoreProp .OnUpdate (func (val st.PropertyValue ) {
159156 oldScore := score
160- score = val .IntVal // FIXME: fix for S2
157+ score = val .Int ()
161158
162159 p .eventDispatcher .Dispatch (events.ScoreUpdated {
163160 OldScore : oldScore ,
164- NewScore : val .IntVal , // FIXME: fix for S2
161+ NewScore : val .Int (),
165162 TeamState : s ,
166163 })
167164 })
You can’t perform that action at this time.
0 commit comments