mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 10:14:06 +02:00
clippy fixes
This commit is contained in:
parent
2c113f9a18
commit
f104bad12f
4 changed files with 411 additions and 407 deletions
|
|
@ -297,7 +297,7 @@ pub fn generate_game_events(demo: Demo) -> TokenStream {
|
|||
#[allow(unused_variables)]
|
||||
fn write(&self, stream: &mut BitWriteStream<LittleEndian>, definition: &GameEventDefinition) -> Result<()> {
|
||||
for entry in &definition.entries {
|
||||
let value = self.get_field(&entry).unwrap_or_else(|_| entry.kind.default_value());
|
||||
let value = self.get_field(entry).unwrap_or_else(|_| entry.kind.default_value());
|
||||
stream.write(&value)?;
|
||||
}
|
||||
Ok(())
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -14,8 +14,7 @@ pub fn handle_player_entity(
|
|||
let player = state.get_or_create_player(entity.entity_index);
|
||||
|
||||
const OUTER: SendPropIdentifier = SendPropIdentifier::new("DT_AttributeContainer", "m_hOuter");
|
||||
const OUTER2: SendPropIdentifier =
|
||||
SendPropIdentifier::new("DT_AttributeManager", "m_hOuter");
|
||||
const OUTER2: SendPropIdentifier = SendPropIdentifier::new("DT_AttributeManager", "m_hOuter");
|
||||
|
||||
const HEALTH_PROP: SendPropIdentifier = SendPropIdentifier::new("DT_BasePlayer", "m_iHealth");
|
||||
const MAX_HEALTH_PROP: SendPropIdentifier =
|
||||
|
|
|
|||
|
|
@ -44,7 +44,12 @@ pub fn handle_medigun_entity(
|
|||
.and_then(|self_handle| state.get_player_by_weapon_handle(self_handle));
|
||||
|
||||
if let Some(medic) = medic {
|
||||
if let PlayerClassData::Medic { target, last_target, .. } = &mut medic.class_data {
|
||||
if let PlayerClassData::Medic {
|
||||
target,
|
||||
last_target,
|
||||
..
|
||||
} = &mut medic.class_data
|
||||
{
|
||||
*target = target_id;
|
||||
if target_id.is_some() {
|
||||
*last_target = target_id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue