Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit abbb7e3

Browse files
committed
Fix rare edge case crash when loading game and an actor gibs from too many wounds (thanks causeless)
1 parent 89fd2e5 commit abbb7e3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Entities/Actor.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ void Actor::GibThis(const Vector &impactImpulse, MovableObject *movableObjectToI
10871087
m_Inventory.clear();
10881088

10891089
// If this is the actual brain of any player, flash that player's screen when he's now dead
1090-
if (g_SettingsMan.FlashOnBrainDamage())
1090+
if (g_SettingsMan.FlashOnBrainDamage() && g_ActivityMan.IsInActivity())
10911091
{
10921092
int brainOfPlayer = g_ActivityMan.GetActivity()->IsBrainOfWhichPlayer(this);
10931093
// Only flash if player is human (AI players don't have screens!)
@@ -1221,7 +1221,6 @@ MOID Actor::GetAIMOWaypointID() const
12211221

12221222
bool Actor::UpdateMovePath()
12231223
{
1224-
12251224
if (g_SceneMan.GetScene() == nullptr) {
12261225
return false;
12271226
}

0 commit comments

Comments
 (0)