mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
e71b40ccc5
* spells learning * no tooltips for objects under FoW * working resource silo * new system for simple unit abilities/states * neutral monster army disappears when defeated * synchronization between client and server processes * fixed battle ending
23 lines
425 B
C
23 lines
425 B
C
#include <boost/interprocess/sync/interprocess_mutex.hpp>
|
|
#include <boost/interprocess/sync/interprocess_condition.hpp>
|
|
|
|
struct ServerReady
|
|
{
|
|
bool ready;
|
|
boost::interprocess::interprocess_mutex mutex;
|
|
boost::interprocess::interprocess_condition cond;
|
|
|
|
ServerReady()
|
|
{
|
|
ready = false;
|
|
}
|
|
|
|
void setToTrueAndNotify()
|
|
{
|
|
mutex.lock();
|
|
ready = true;
|
|
mutex.unlock();
|
|
cond.notify_all();
|
|
}
|
|
};
|