Rewritten most of the code for multithreading; still not 100%, but getting there. If this commit proves to be too problematic, we can always undo it.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-02-13 21:47:03 +00:00
parent 0a46c065bf
commit 4f17362aeb
87 changed files with 6915 additions and 2803 deletions
+24 -5
View File
@@ -1,6 +1,18 @@
// cSimulatorManager.h
#pragma once
#include "cSimulator.h"
#include <vector>
class cSimulatorManager
@@ -12,9 +24,16 @@ public:
void Simulate( float a_Dt );
void WakeUp(int a_X, int a_Y, int a_Z);
void RegisterSimulator(cSimulator *a_Simulator, short a_Rate);
void RegisterSimulator(cSimulator * a_Simulator, short a_Rate); // Takes ownership of the simulator object!
protected:
std::vector <std::pair<cSimulator *, short> *> m_Simulators;
long long m_Ticks;
};
typedef std::vector <std::pair<cSimulator *, short> *> cSimulators;
cSimulators m_Simulators;
long long m_Ticks;
};