ECS fixes

-fixed bug with addEntityCopy (on create was called for bad entity, and incorrect block was added to update)
-added function to retrieve Component pointer from Entity (not  template function)
-fixed thread_pool bug
This commit is contained in:
Mergul 2020-08-22 11:37:23 +02:00
parent 64dc099e0a
commit 8960423935
3 changed files with 31 additions and 9 deletions

View file

@ -396,8 +396,8 @@ version (MM_USE_POSIX_THREADS)
void start(DG dg)
{
threadStart = dg;
int ok = pthread_create(&handle, null, &threadRunFunc, cast(void*)&this);
if(!ok)handle = pthread_t();
int err = pthread_create(&handle, null, &threadRunFunc, cast(void*)&this);
if(err)handle = pthread_t();
//assert(ok == 0);
}