Skip to content

Commit

Permalink
fix: allow damaging disconnected teammates
Browse files Browse the repository at this point in the history
  • Loading branch information
leia-uwu committed Sep 27, 2024
1 parent b2b771e commit 2f6af74
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/src/game/objects/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1715,7 +1715,10 @@ export class Player extends BaseGameObject {

// teammates can't deal damage to each other
if (sourceIsPlayer && params.source !== this) {
if ((params.source as Player).groupId === this.groupId) {
if (
(params.source as Player).groupId === this.groupId &&
!this.disconnected
) {
return;
}
if (
Expand Down

0 comments on commit 2f6af74

Please sign in to comment.