fix cash in multiplayer (#97)

* replicate it
* use collision observer to simplify
* pass entity of player that receives cash for a duplicate head
This commit is contained in:
extrawurst
2025-12-22 03:44:43 +01:00
committed by GitHub
parent 375b8a5b46
commit da5c0f8fb7
6 changed files with 69 additions and 74 deletions

View File

@@ -6,7 +6,7 @@ use crate::{
animation::AnimationFlags,
backpack::{Backpack, BackpackSwapEvent},
camera::{CameraArmRotation, CameraTarget},
cash::CashInventory,
cash::{Cash, CashInventory},
character::{AnimatedCharacter, HedzCharacter},
control::{
CashHealPressed, ClientInputs, ControllerSettings, Inputs, SelectLeftPressed,
@@ -106,6 +106,7 @@ pub fn plugin(app: &mut App) {
.replicate::<SquishAnimation>()
.replicate_once::<Transform>()
.replicate_once::<SpawnTrail>()
.replicate_once::<Cash>()
.replicate_as::<Visibility, SerVisibility>();
app.replicate_once::<ThrownProjectile>()