Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class NPC
- {
- private:
- float A, B, C:
- mutable std::mutex m;
- void CopyFrom(const NPC& npc) {
- std::guard<std::mutex>(m);
- std::guard<std::mutex>(npc.m);
- A = npc.A;
- B = npc.B;
- C = npc.c;
- }
- bool Collide(const NPC& npc) const {
- std::guard<std::mutex>(npc.m);
- std::guard<std::mutex>(m);
- return A == npc.A && B == npc.B && C == npc.c;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement