Skip to content

Commit

Permalink
Fix typos and issues in dem (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlugg committed Mar 26, 2023
1 parent 72d8032 commit c57f037
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/dem/src/classes/netsvc/svccreatestringtable.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Part of [NET/SVC](../netsvc.md) message.
| NumEntries | int | (log2(MaxEntries)+1)/8 | log2(MaxEntries)+1 | - |
| Length | int | 2.5 | 20 | - |
| UserDataFixedSize | bool | 0.125 | 1 | - |
| UserDataSize¹ | int | 4 | 1.5 | - |
| UserDataSize¹ | int | 1.5 | 12 | - |
| UserDataSizeBits¹ | int | 0.5 | 4 | - |
| Flags | int | 0.25<sup title="New Engine">NE</sup><br>0.125<sup title="Old Engine">OE</sup> | 2<sup title="New Engine">NE</sup><br>1<sup title="Old Engine">OE</sup> | - |
| StringData | int | Length / 8 | Length | - |
Expand Down
2 changes: 1 addition & 1 deletion docs/dem/src/classes/netsvc/svcpacketentities.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Part of [NET/SVC](../netsvc.md) message.
| IsDelta | bool | 0.125 | 1 | - |
| DeltaFrom¹ | int | 4 | 32 | - |
| BaseLine | boolean | 0.125 | 1 | - |
| UpdatedEntries | 1.375 | 11 | - | - |
| UpdatedEntries | int | 1.375 | 11 | - | - |
| Length | int | 2.5 | 20 | - |
| UpdateBaseline | bool | 0.125 | 1 | - |
| Data | byte[] | Length / 8 | Length | - |
Expand Down
2 changes: 1 addition & 1 deletion docs/dem/src/classes/netsvc/svcsendtable.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Part of [NET/SVC](../netsvc.md) message.

| Name | Type | Size in bytes | Size in bits | Value |
| --- | --- | --- | --- | --- |
| NeedsDecoder | boolean | 0.125 | 8 | - |
| NeedsDecoder | boolean | 0.125 | 1 | - |
| Length | int | 1 | 8 | - |
| Props | int | Length / 8 | Length | - |
8 changes: 4 additions & 4 deletions docs/dem/src/classes/netsvc/svcsounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Part of [NET/SVC](../netsvc.md) message.
| Name | Type | Size in bytes | Size in bits | Value |
| --- | --- | --- | --- | --- |
| ReliableSound | bool | 0.125 | 1 | - |
| Size¹ | int | 1 | 8 | 1 if ReliableSound bit is set. |
| Length | bool | 1 if ReliableSound bit is set, otherwhise 2. | 8 if ReliableSound bit is set, otherwhise 16. | - |
| Data | byte[] | 0.125 | Length | SoundInfo[] |
| NumSounds¹ | int | 1 | 8 | 1 if ReliableSound bit is set. |
| Length | int | 1 if ReliableSound bit is set, otherwise 2. | 8 if ReliableSound bit is set, otherwise 16. | - |
| Data | byte[] | Length / 8 | Length | SoundInfo[] |

¹ Optional: Only set if the `ReliableSound` bit is zero.

Expand All @@ -16,7 +16,7 @@ Part of [NET/SVC](../netsvc.md) message.
```rust,noplaypen,ignore
let reliable_sound = read_one_bit();
let size = if reliable_sound {
let num_sounds = if reliable_sound {
1
} else {
read_bits(8)
Expand Down
2 changes: 1 addition & 1 deletion docs/dem/src/classes/netsvc/svcsplitscreen.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Part of [NET/SVC](../netsvc.md) message.

| Name | Type | Size in bytes | Size in bits | Value |
| --- | --- | --- | --- | --- |
| Unk | int | 0.125 | 1 | - |
| Type | int | 0.125 | 1 | 0 to add a player, 1 to remove. |
| Length | int | 1.375 | 11 | - |
| Data | byte[] | Length / 8 | Length | - |
1 change: 1 addition & 0 deletions docs/dem/src/classes/netsvc/svcvoicedata.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ Part of [NET/SVC](../netsvc.md) message.
| Client | int | 1 | 8 | - |
| Proximity | int | 1 | 8 | - |
| Length | int | 2 | 16 | - |
| Audible | bool[] | MAX_SPLITSCREEN_CLIENTS / 8 | MAX_SPLITSCREEN_CLIENTS | - |
| Data | byte[] | Length / 8 | Length | - |
2 changes: 1 addition & 1 deletion docs/dem/src/classes/stringtable.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SingTable
# StringTable

Part of [StringTables](../messages/stringtables.md) message.

Expand Down

0 comments on commit c57f037

Please sign in to comment.