Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static cell AMX_NATIVE_CALL n_CalculatePath( AMX* amx, cell* params )
- {
- if(params[1] < 0 || params[1] > (MAX_NODES-1) || params[2] < 0 || params[2] > (MAX_NODES-1))
- return 0;
- Lock q (mutex_q);
- int tries = 0;
- while (q.acquire (1) == false && ++tries < 10)
- {
- }
- if(q.locked)
- {
- QueueVector.push_back(QuedData(params[1],params[2],params[3],amx));
- q.release ();
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement