Files
radarflow2-kvm/csflow/src/traits/base_entity.rs
Janek 45bba35a71 Big update
This repository is no longer meant for just radarflow, thus it will be renamed.
I have split the SDK from radarflow, allowing for simpler use with new projects.
Other than that, radarflow is functionally the same.

- Fixed bug in radarflow where the entity loop didn't include the last entity.
2023-12-30 18:07:55 +01:00

11 lines
497 B
Rust

use memflow::types::Address;
use crate::{CheatCtx, structs::Vec3, Error};
/// A trait for basic functions from C_BaseEntity
/// CCSPlayerController inherits C_BaseEntity, which is why this trait exists.
pub trait BaseEntity {
fn from_index(ctx: &mut CheatCtx, entity_list: Address, index: i32) -> Result<Option<Self>, Error> where Self: std::marker::Sized;
fn pos(&self, ctx: &mut CheatCtx) -> Result<Vec3, Error>;
fn class_name(&self, ctx: &mut CheatCtx) -> Result<String, Error>;
}