Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. class NPC
  2. {
  3. private:
  4. float A, B, C:
  5. mutable std::mutex m;
  6.  
  7. void CopyFrom(const NPC& npc) {
  8. std::guard<std::mutex>(m);
  9. std::guard<std::mutex>(npc.m);
  10. A = npc.A;
  11. B = npc.B;
  12. C = npc.c;
  13. }
  14.  
  15. bool Collide(const NPC& npc) const {
  16. std::guard<std::mutex>(npc.m);
  17. std::guard<std::mutex>(m);
  18. return A == npc.A && B == npc.B && C == npc.c;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement