Skip to content

Commit

Permalink
Merge pull request #52 from jonathan-robertson/fix-nre
Browse files Browse the repository at this point in the history
Fix null reference exception onEntityKill handler
  • Loading branch information
jonathan-robertson authored Sep 27, 2022
2 parents 09749ff + 78bbedd commit a529360
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Amnesia/Handlers/EntityKilled.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ internal class EntityKilled {

internal static void Handle(Entity killedEntity, Entity killerEntity) {
try {
if (killerEntity.entityType != EntityType.Player) { return; }
if (killerEntity == null || killerEntity.entityType != EntityType.Player) { return; }
switch (killedEntity.GetDebugName()) {
case "ZombieJuggernaut":
TriggerKillAnnouncementAndBonus(killerEntity.GetDebugName(), "[ff8000]Juggernaut");
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.1] - 2022-09-26

- fix null reference exception onEntityKill handler

## [0.9.0] - 2022-09-26

- add new positive outlook trigger buffs for admins
Expand Down
Binary file modified LatestReleaseBuild/Amnesia.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions ModInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Name value="Amnesia" />
<Description value="Reset player progress after a configurable number of deaths" />
<Author value="Jonathan Robertson (Kanaverum)" />
<Version value="0.9.0" />
<Version value="0.9.1" />
<Website value="https://github.com/jonathan-robertson/amnesia" />
</ModInfo>
</xml>
</xml>

0 comments on commit a529360

Please sign in to comment.