misc.c
changeset 842 efc3546bc313
parent 826 fff56bbc3606
child 856 918759cedca8
--- a/misc.c	Sun Jan 02 12:03:43 2005 +0000
+++ b/misc.c	Sun Jan 02 17:23:04 2005 +0000
@@ -9,6 +9,7 @@
 #include "network.h"
 #include "network_data.h"
 #include "network_server.h"
+#include "engine.h"
 
 extern void StartupEconomy();
 extern void InitNewsItemStructs();
@@ -182,6 +183,13 @@
 
 void InitializeGame()
 {
+	// Initialize the autoreplace array. Needs to be cleared between each game
+	int i;
+	for (i = 0; i < 256; i++) {
+		_autoreplace_array[i] = i;
+	}
+	AddTypeToEngines(); // make sure all engines have a type
+	
 	SetObjectToPlace(1, 0, 0, 0);
 
 	_pause = 0;