Skip to content

Commit

Permalink
Add server check on corpses
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Dec 16, 2024
1 parent aa3fba9 commit 5f6e9e9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Fika.Core/Coop/Players/CoopPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,14 @@ public override void OnPhraseTold(EPhraseTrigger @event, TaggedClip clip, TagBan

public override Corpse CreateCorpse()
{
Corpse corpse = base.CreateCorpse();
CorpsePositionSyncer.Create(corpse.gameObject, corpse);
return corpse;
if (FikaBackendUtils.IsServer)
{
Corpse corpse = base.CreateCorpse();
CorpsePositionSyncer.Create(corpse.gameObject, corpse);
return corpse;
}

return CreateCorpse<ObservedCorpse>(Velocity);
}

public override void OperateStationaryWeapon(StationaryWeapon stationaryWeapon, GStruct177.EStationaryCommand command)
Expand Down

0 comments on commit 5f6e9e9

Please sign in to comment.