mirror of
https://github.com/glest/glest-source.git
synced 2025-10-02 18:36:48 +02:00
- attempt to improve ai decision performance by having each ai player updates done in a thread
This commit is contained in:
@@ -226,14 +226,16 @@ GameNetworkInterface::GameNetworkInterface(){
|
||||
|
||||
void GameNetworkInterface::requestCommand(const NetworkCommand *networkCommand, bool insertAtStart) {
|
||||
assert(networkCommand != NULL);
|
||||
//Mutex *mutex = getServerSynchAccessor();
|
||||
Mutex *mutex = getServerSynchAccessor();
|
||||
|
||||
if(insertAtStart == false) {
|
||||
MutexSafeWrapper safeMutex(mutex,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
//if(mutex != NULL) mutex->p();
|
||||
requestedCommands.push_back(*networkCommand);
|
||||
//if(mutex != NULL) mutex->v();
|
||||
}
|
||||
else {
|
||||
MutexSafeWrapper safeMutex(mutex,string(__FILE__) + "_" + intToStr(__LINE__));
|
||||
//if(mutex != NULL) mutex->p();
|
||||
requestedCommands.insert(requestedCommands.begin(),*networkCommand);
|
||||
//if(mutex != NULL) mutex->v();
|
||||
|
Reference in New Issue
Block a user