Skip to content

Commit 6d55c8e

Browse files
committed
The entity index should be modified too, not just the user id
1 parent e435743 commit 6d55c8e

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "coldmaps"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
authors = ["Tails8521 <tails8521@gmail.com>"]
55
edition = "2018"
66

src/heatmap_analyser.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,11 @@ impl Death {
239239
round,
240240
killer,
241241
killer_steamid: users.get(&killer).expect("Can't get killer").steam_id.clone(),
242-
killer_entity: event.inflictor_ent_index,
242+
killer_entity: if event.attacker == 0 {
243+
event.victim_ent_index // if world killed the player, count it as a suicide
244+
} else {
245+
event.inflictor_ent_index
246+
},
243247
killer_entity_state: None,
244248
weapon: event.weapon.clone(),
245249
victim,

0 commit comments

Comments
 (0)