Skip to content

Commit 6a44530

Browse files
Fix JSON marshalling
1 parent e2337d9 commit 6a44530

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

pkg/demoinfocs/common/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ type TeamState struct {
131131
Entity st.Entity
132132

133133
// Terrorist TeamState for CTs, CT TeamState for Terrorists
134-
Opponent *TeamState
134+
Opponent *TeamState `json:"-"`
135135
}
136136

137137
// Team returns the team for which the TeamState contains data.

pkg/demoinfocs/common/equipment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ const (
312312
// This also includes the skin and some additional data.
313313
type Equipment struct {
314314
Type EquipmentType // The type of weapon which the equipment instantiates.
315-
Entity st.Entity // The game entity instance
316-
Owner *Player // The player carrying the equipment, not necessarily the buyer.
315+
Entity st.Entity `json:"-"` // The game entity instance
316+
Owner *Player `json:"-"` // The player carrying the equipment, not necessarily the buyer.
317317
// E.g. 'models/weapons/w_rif_m4a1_s.mdl'.
318318
// Used internally to differentiate alternative weapons (M4A4 / M4A1-S etc.) for Source 1 demos.
319319
// It's always an empty string with Source 2 demos, you should use Type to know which weapon it is.

pkg/demoinfocs/sendtables2/entity.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ type Entity struct {
2828
propCache map[string]st.Property
2929
}
3030

31+
// func (*Entity) GobDecode([]byte) error { return nil }
32+
// func (Entity) GobEncode() ([]byte, error) { return nil, nil }
33+
3134
func (e *Entity) ServerClass() st.ServerClass {
3235
return e.class
3336
}

0 commit comments

Comments
 (0)