(svn r12539) [NoAI] -Fix: when you take over an AI, the game no longer crashes when a new AI starts again noai
authortruebrain
Wed, 02 Apr 2008 11:14:29 +0000
branchnoai
changeset 9860 4f554e7b1985
parent 9859 81621c6ba0e9
child 9861 53fc03195e31
(svn r12539) [NoAI] -Fix: when you take over an AI, the game no longer crashes when a new AI starts again
src/economy.cpp
--- a/src/economy.cpp	Wed Apr 02 10:55:28 2008 +0000
+++ b/src/economy.cpp	Wed Apr 02 11:14:29 2008 +0000
@@ -1852,6 +1852,7 @@
 	_current_player = old_player;
 
 	p->is_active = false;
+	if (!IsHumanPlayer(p->index)) AI_PlayerDied(p->index);
 
 	DeletePlayerWindows(pi);
 	RebuildVehicleLists(); //Updates the open windows to add the newly acquired vehicles to the lists