Skip to content

Commit

Permalink
fixes medal saving (#5607)
Browse files Browse the repository at this point in the history
posthumous medals would never save because the ckey is nulled
immediately on mob changes. this also applies to medals given when
you're disconnected for whatever reason

:cl:
fix: medals should save more reliably
/:cl:
  • Loading branch information
harryob committed Feb 1, 2024
1 parent 71d2b9b commit 8520e54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/datums/statistics/entities/medal_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
return

var/datum/entity/statistic/medal/new_medal = DB_ENTITY(/datum/entity/statistic/medal)
var/datum/entity/player/player_entity = get_player_from_key(new_recipient.ckey)
var/datum/entity/player/player_entity = get_player_from_key(new_recipient.persistent_ckey)
if(player_entity)
new_medal.player_id = player_entity.id

Expand Down

0 comments on commit 8520e54

Please sign in to comment.