Merge pull request #5 from striezel-stash/fix-typos
This commit is contained in:
commit
dc7ff86c38
@ -81,20 +81,20 @@ impl CheatCtx {
|
|||||||
Ok(GameRules::new(ptr))
|
Ok(GameRules::new(ptr))
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: seperate into own class
|
// todo: separate into own class
|
||||||
pub fn get_entity_list(&mut self) -> Result<Address, Error> {
|
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)?;
|
let ptr = self.process.read_addr64(self.client_module.base + cs2dumper::offsets::client_dll::dwEntityList)?;
|
||||||
Ok(ptr)
|
Ok(ptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: seperate into own class
|
// todo: separate into own class
|
||||||
pub fn highest_entity_index(&mut self) -> Result<i32, Error> {
|
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 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)?;
|
let highest_index = self.process.read(game_entity_system + cs2dumper::offsets::client_dll::dwGameEntitySystem_getHighestEntityIndex)?;
|
||||||
Ok(highest_index)
|
Ok(highest_index)
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: seperate into own class
|
// todo: separate into own class
|
||||||
pub fn network_is_ingame(&mut self) -> Result<bool, Error> {
|
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 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)?;
|
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"),
|
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_round = -1;
|
||||||
let mut last_gamephase = -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);
|
let target_interval = Duration::from_nanos(SECOND_AS_NANO / 128);
|
||||||
|
|
||||||
loop {
|
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
|
// New tick, now we want to fetch our data
|
||||||
if cur_tickcount != last_tickcount {
|
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);
|
let mut radar_data = Vec::with_capacity(16);
|
||||||
|
|
||||||
if cache.gamerules().bomb_planted(&mut ctx)? {
|
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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user