From a77cf8169b42a4394e62f7a381ca546b27d0f723 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Mon, 7 Nov 2022 16:09:44 +0300 Subject: starting fresh for the third time --- classes/netsvc/netsvc.go | 32 -------------- classes/netsvc/types.go | 106 ----------------------------------------------- 2 files changed, 138 deletions(-) delete mode 100644 classes/netsvc/netsvc.go delete mode 100644 classes/netsvc/types.go (limited to 'classes/netsvc') diff --git a/classes/netsvc/netsvc.go b/classes/netsvc/netsvc.go deleted file mode 100644 index a454310..0000000 --- a/classes/netsvc/netsvc.go +++ /dev/null @@ -1,32 +0,0 @@ -package netsvc - -import ( - "bytes" - "fmt" - - "github.com/pektezol/bitreader" - "github.com/pektezol/demoparser/utils" -) - -const NET_TICK_SCALEUP = 10000 - -func ParseNetSvcMessage(file []byte) { - reader := bitreader.Reader(bytes.NewReader(file), true) - bitsRead := 0 - for { - messageType, err := reader.ReadBits(6) - if err != nil { // No remaining bits left - break - } - switch messageType { - case 16: - var svcprint SvcPrint - svcprint.Message = utils.ReadStringFromSlice(file) - fmt.Println(svcprint) - bitsRead += len(svcprint.Message) * 8 - default: - //fmt.Println("default") - break - } - } -} diff --git a/classes/netsvc/types.go b/classes/netsvc/types.go deleted file mode 100644 index 2a52f96..0000000 --- a/classes/netsvc/types.go +++ /dev/null @@ -1,106 +0,0 @@ -package netsvc - -type NetDisconnect struct { - Text string -} - -type NetFile struct { - TransferId int32 - FileName string - FileRequested bool -} - -type NetSplitScreenUser struct { - Unknown bool -} - -type NetTick struct { - Tick int32 - HostFrameTime int16 - HostFrameTimeStdDeviation int16 -} - -type NetStringCmd struct { - Command string -} - -type ConVar struct { - Name string - Value string -} - -type NetSetConVar struct { - Length int8 - ConVars []ConVar -} - -type NetSignonStateOE struct { - SignonState int8 - SpawnCount int32 -} - -type NetSignonStateNE struct { - NetSignonStateOE - NumServerPlayers int32 - IdsLength int32 - PlayerNetworkIds []byte - MapNameLength int32 - MapName string -} - -type SvcServerInfo struct { - Protocol int8 - ServerCount int32 - IsHltv bool - IsDedicated bool - ClientCrc int32 - MaxClasses int16 - MapCrc int32 - PlayerSlot int8 - MaxClients int8 - Unk int32 // NE - TickInterval float32 - COs byte - GameDir string - MapName string - SkyName string - HostName string -} - -type SvcSendTable struct { - NeedsDecoder bool - Length int8 - Props int // ? -} - -type ServerClass struct { - ClassId int8 - ClassName string - DataTableName string -} - -type SvcClassInfo struct { - Length int16 - CreateOnClient bool - ServerClasses []ServerClass -} - -type SvcSetPause struct { - Paused bool -} - -type SvcCreateStringTable struct { - Name string - MaxEntries int16 - NumEntries int8 - Length int32 - UserDataFixedSize bool - UserDataSize int32 - UserDataSizeBits int8 - Flags int8 - StringData int // ? -} - -type SvcPrint struct { - Message string -} -- cgit v1.2.3