fix shooting
This commit is contained in:
1 parent
e8fb14b809
commit
50232c0816
2 files changed
+24
-5
No files matched your search
+3
-1
@@ -120,7 +120,9 @@ class Session : public std::enable_shared_from_this<Session> {
|
||||
std::cout << "Player " << id_ << " fired " << shotCount << " shots → broadcasting\n";
|
||||
|
||||
for (auto& session : g_sessions) {
|
||||
session->send_message(broadcast);
|
||||
if (session->get_id() != id_) {
|
||||
session->send_message(broadcast);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in new issue
Block a user