1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-03 10:14:06 +02:00
Commit graph

392 commits

Author SHA1 Message Date
glyphpoch
660b9dc1d7 Fix SendPropValue::Vector encoding when the float definition is NormalFloatVar
This is a follow up to PR #4. Handling for the Vector prop needs to be
fixed on the write/encoding side as well. When the float definition is
NormalFloatVar we need to skip writing the last component (z) to the
stream, since it's calculated from the first two components (x, y), and
just write out its sign.
2026-04-06 18:20:25 +01:00
Peter
a1b1db6f84 Fix parsing of SayText2 messages starting with color codes other than \x01
SayText2 messages can use a simplified format where the body is just
client, raw, and a single null-terminated colored text string, without
the usual kind/from/text fields. The parser detected this by peeking
the first byte after client and raw and checking if it was \x01 (color
code for default color), but the text can also start with other color
codes such as \x07 (6-char hex color). When this happened, the parser
would consume the entire message text as the kind string (falling back
to ChatAll), leaving the text and from fields empty.
2026-04-05 10:48:27 +01:00
b500fe772a update schemars to 1.0 2025-09-17 00:14:27 +02:00
Robin Appelman
6143e0289b Merge pull request 'Avoid sign-extending unsigned VarInts' (#5) from nocrex/parser:unsigned-varint-fix into master
Reviewed-on: https://codeberg.org/demostf/parser/pulls/5
2025-09-16 22:59:08 +02:00
3dcbf2a4cf fix sendprop roundtrip test 2025-09-16 22:58:29 +02:00
Nocrex
363821a545 Avoid sign-extending unsigned VarInts 2025-09-15 21:05:32 +02:00
glyphpoch
a8f379965c Fix SendPropValue::Vector parsing when the float definition is NormalFloatVar
When the float definition is NormalFloatVar, the last component (z)
should be skipped and calculated from the first two components (x and
y), otherwise we can read too many bits, causing decoding failures:
* 744d6eb003/src/engine/dt_encode.cpp (L119-L143)

This is what was causing the issue with demos recorded on the
jump_classics_a3 map:
* https://codeberg.org/demostf/parser/issues/2
2025-08-28 21:03:30 +01:00
f104bad12f clippy fixes 2025-08-08 13:08:48 +02:00
2c113f9a18 fix outer map not using baselines 2025-08-08 00:06:46 +02:00
e303969606 store last medic target 2025-08-07 23:22:35 +02:00
42b63cc7eb fix player handles 2025-08-07 22:57:48 +02:00
fbaca025b6 feature gate write support, use hash to compare game event definitions 2025-07-15 16:06:23 +02:00
6ef2b1cea8 remove some bounds checks 2025-07-14 14:56:14 +02:00
f7190dca0f clippy fixes 2025-07-13 23:40:28 +02:00
b9d311f16f no need to allocate for 4 byte magic 2025-07-13 23:40:28 +02:00
2ab3e91774 formatting 2025-07-12 22:53:27 +02:00
Seercat3160
2e7d3eb96f
Move the padding in RawPlayerInfo to make the custom_file field have correct alignment 2025-07-12 21:01:51 +10:00
33e40ca99b live sentry rotation 2025-07-05 15:49:42 +02:00
e3810b0b03 sentry shield 2025-07-03 00:15:57 +02:00
b93390d1e4 split up gamestateanalyser 2025-07-02 21:54:35 +02:00
a229ed5f11 disguise fixes 2025-06-29 14:38:15 +02:00
5a7d4e12aa heal target 2025-06-28 23:03:05 +02:00
e40be5529e fix default spy cloak 2025-06-28 20:11:20 +02:00
4b88c33bf2 building construction progress 2025-06-28 20:09:45 +02:00
15046e8744 medigun type, spy class data 2025-06-28 19:15:16 +02:00
b6b55db0f9 better SendPropIdentifier des 2025-06-28 00:04:59 +02:00
149c4e2339 todos 2025-06-28 00:04:59 +02:00
1348384ca3 track cart 2025-06-26 20:22:13 +02:00
331a9fe593 project critical 2025-06-26 16:56:52 +02:00
306362d36e handle _condition_bits 2025-06-26 01:36:23 +02:00
809d2504f5 player condition handling 2025-06-26 00:32:52 +02:00
glyphpoch
624efb6427 Fix saturating overflow in ExtraData parsing
- Fix overflow in ExtraData by casting byte_len to usize before
multiplication. This was previously multiplying a u16 with
saturating_mul and would overflow when the extra data in string
tables reaches a certain size.
- Add test case for parsing large string table to verify correct
stream position after read.
2025-06-02 21:35:42 +01:00
d9b711add6 workflow updates 2025-05-25 22:37:37 +02:00
08a6c0c33d formatting 2025-05-25 18:12:17 +02:00
57096ab170 prepare for 0.6 2025-05-05 19:23:56 +02:00
1fed4d8826 wip 2025-05-03 20:31:19 +02:00
4bd97e4afc handle older serverinfo messages 2025-04-29 21:41:54 +02:00
442c4963f6 handle older prefetch messages 2025-04-29 21:14:55 +02:00
gcommer
32d7360433 Add SendPropIdentifier::from_const 2025-02-19 22:26:18 +01:00
2bad24dedd fmt+clippy 2025-02-19 20:42:56 +01:00
43c9021ba2 update tests 2025-02-19 20:42:56 +01:00
0cd87a8a40 switch from err_derive to thiserror 2024-12-05 19:43:13 +01:00
e0ee7c87d2 more projectile tracking work 2024-12-05 19:36:07 +01:00
a9c031345f move gamestate structs 2024-12-04 14:55:20 +01:00
fb471a5a44 non_exhaustive errors 2024-12-04 14:55:13 +01:00
cd20b5bbd7 implement projectile collision tracking
todo:

- track projectile ownership
- handle bounding boxes for non-rockets
2024-12-04 00:37:20 +01:00
490ebae2c6 clippy fixes 2024-05-06 16:00:59 +02:00
dd3cd6364e fix schema for serde_repr usage 2024-05-06 15:47:02 +02:00
b35daf5c12 store classlist as u16s 2024-05-04 16:44:13 +02:00
ab87b34de8 make gameevent parsing more backwards compatible 2024-04-16 22:51:38 +02:00