Merge pull request from striezel-stash/fix-typos

This commit is contained in:
Janek 2023-12-31 23:49:51 +01:00 committed by GitHub
commit dc7ff86c38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions
csflow/src
radarflow/src/dma

@ -81,20 +81,20 @@ impl CheatCtx {
Ok(GameRules::new(ptr))
}
// todo: seperate into own class
// todo: separate into own class
pub fn get_entity_list(&mut self) -> Result<Address, Error> {
let ptr = self.process.read_addr64(self.client_module.base + cs2dumper::offsets::client_dll::dwEntityList)?;
Ok(ptr)
}
// todo: seperate into own class
// todo: separate into own class
pub fn highest_entity_index(&mut self) -> Result<i32, Error> {
let game_entity_system = self.process.read_addr64(self.client_module.base + cs2dumper::offsets::client_dll::dwGameEntitySystem)?;
let highest_index = self.process.read(game_entity_system + cs2dumper::offsets::client_dll::dwGameEntitySystem_getHighestEntityIndex)?;
Ok(highest_index)
}
// todo: seperate into own class
// todo: separate into own class
pub fn network_is_ingame(&mut self) -> Result<bool, Error> {
let ptr = self.process.read_addr64(self.engine_module.base + cs2dumper::offsets::engine2_dll::dwNetworkGameClient)?;
let signonstate: i32 = self.process.read(ptr + cs2dumper::offsets::engine2_dll::dwNetworkGameClient_signOnState)?;
@ -118,4 +118,4 @@ impl ToString for Connector {
Connector::Pcileech => String::from("pcileech"),
}
}
}
}

@ -20,7 +20,7 @@ pub async fn run(connector: Connector, pcileech_device: String, data_lock: Arc<R
let mut last_round = -1;
let mut last_gamephase = -1;
// Duration for a single tick on 128 ticks. Im assuming 128 ticks because I dont fucking know how to read the current tickrate off cs2 memory lol
// Duration for a single tick on 128 ticks. I'm assuming 128 ticks because I don't fucking know how to read the current tickrate off cs2 memory lol
let target_interval = Duration::from_nanos(SECOND_AS_NANO / 128);
loop {
@ -132,7 +132,7 @@ pub async fn run(connector: Connector, pcileech_device: String, data_lock: Arc<R
// New tick, now we want to fetch our data
if cur_tickcount != last_tickcount {
// We dont expect more than 16 entries in our radar data
// We don't expect more than 16 entries in our radar data.
let mut radar_data = Vec::with_capacity(16);
if cache.gamerules().bomb_planted(&mut ctx)? {
@ -222,4 +222,4 @@ pub async fn run(connector: Connector, pcileech_device: String, data_lock: Arc<R
}
Ok(())
}
}