mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 18:24:05 +02:00
smaller baselines
This commit is contained in:
parent
528e4f2230
commit
64b66a770c
3 changed files with 76 additions and 15 deletions
|
|
@ -44,6 +44,18 @@ impl From<EntityId> for u32 {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<usize> for EntityId {
|
||||
fn from(num: usize) -> Self {
|
||||
EntityId(num as u32)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<EntityId> for usize {
|
||||
fn from(id: EntityId) -> Self {
|
||||
id.0 as usize
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq<u32> for EntityId {
|
||||
fn eq(&self, other: &u32) -> bool {
|
||||
self.0 == *other
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ impl Parse<'_> for TempEntitiesMessage {
|
|||
.ok_or(ParseError::UnknownServerClass(class_id))?;
|
||||
|
||||
let mut props = Vec::new();
|
||||
PacketEntitiesMessage::read_update(stream, send_table, &mut props, 0.into())?;
|
||||
PacketEntitiesMessage::read_update(stream, send_table, &mut props, 0u32.into())?;
|
||||
|
||||
events.push(EventInfo {
|
||||
class_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue