expose Point

This commit is contained in:
Robin Appelman 2026-11-13 15:09:19 +01:00
commit 972488c1d5
Signed by: robin
SSH key fingerprint: SHA256:kifqgrqnut7q1YUIrI0AdMNC23qiKAS/T9uGFmIYvbE
2 changed files with 15 additions and 14 deletions

View file

@ -1,3 +1,17 @@
mod weapons;
use serde::Serialize;
pub use weapons::Weapon;
#[derive(Serialize, PartialEq)]
pub struct Position {
pub x: i32,
pub y: i32,
pub z: i32,
}
impl From<(i32, i32, i32)> for Position {
fn from((x, y, z): (i32, i32, i32)) -> Self {
Position { x, y, z }
}
}

View file

@ -1,5 +1,5 @@
use crate::common::{Class, SubjectId};
use crate::data::Weapon;
use crate::data::{Position, Weapon};
use crate::event::{GameEvent, KillAssistEvent, KillEvent, MedicDeathExEvent};
use crate::module::GlobalData;
use crate::raw_event::RawEventType;
@ -15,19 +15,6 @@ pub struct Participant {
pub class: Class,
}
#[derive(Serialize, PartialEq)]
pub struct Position {
pub x: i32,
pub y: i32,
pub z: i32,
}
impl From<(i32, i32, i32)> for Position {
fn from((x, y, z): (i32, i32, i32)) -> Self {
Position { x, y, z }
}
}
#[derive(Serialize, PartialEq)]
#[serde(rename_all = "kebab-case")]
pub enum KillKind {