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.
This commit is contained in:
11
csflow/src/traits/base_entity.rs
Normal file
11
csflow/src/traits/base_entity.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
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>;
|
||||
}
|
||||
7
csflow/src/traits/memory_class.rs
Normal file
7
csflow/src/traits/memory_class.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
use memflow::types::Address;
|
||||
|
||||
/// A trait that implements basic functions for a class represented by a single pointer
|
||||
pub trait MemoryClass {
|
||||
fn ptr(&self) -> Address;
|
||||
fn new(ptr: Address) -> Self;
|
||||
}
|
||||
5
csflow/src/traits/mod.rs
Normal file
5
csflow/src/traits/mod.rs
Normal file
@@ -0,0 +1,5 @@
|
||||
mod base_entity;
|
||||
mod memory_class;
|
||||
|
||||
pub use base_entity::BaseEntity;
|
||||
pub use memory_class::MemoryClass;
|
||||
Reference in New Issue
Block a user