@@ -23,6 +23,7 @@ use shared::{
23
23
} ,
24
24
GameEffectData , NoitaOutbound , PeerId , SpawnOnce , WorldPos ,
25
25
} ;
26
+ use std:: borrow:: Cow ;
26
27
use std:: mem;
27
28
use std:: num:: NonZero ;
28
29
pub ( crate ) static DES_TAG : & str = "ew_des" ;
@@ -907,6 +908,7 @@ impl RemoteDiffModel {
907
908
EntityUpdate :: Init ( entity_entry, gid) => {
908
909
if let Some ( ent) = self . waiting_for_lid . remove ( & gid) {
909
910
self . tracked . insert ( current_lid, ent) ;
911
+ let _ = init_remote_entity ( ent, Some ( current_lid) , Some ( gid) , false ) ;
910
912
}
911
913
self . lid_to_gid . insert ( current_lid, gid) ;
912
914
self . entity_infos . insert ( current_lid, * entity_entry) ;
@@ -1510,7 +1512,7 @@ pub fn init_remote_entity(
1510
1512
}
1511
1513
1512
1514
for pb2 in entity. iter_all_components_of_type :: < PhysicsBody2Component > ( None ) ? {
1513
- pb2. set_destroy_body_if_entity_destroyed ( true ) ?; //TODO why??
1515
+ pb2. set_destroy_body_if_entity_destroyed ( true ) ?;
1514
1516
}
1515
1517
1516
1518
for expl in entity. iter_all_components_of_type :: < ExplodeOnDamageComponent > ( None ) ? {
@@ -1556,6 +1558,18 @@ pub fn init_remote_entity(
1556
1558
ghost. set_die_if_no_home ( false ) ?;
1557
1559
}
1558
1560
1561
+ if entity. has_tag ( "egg_item" ) {
1562
+ if let Some ( explosion) =
1563
+ entity. try_get_first_component_including_disabled :: < ExplodeOnDamageComponent > ( None ) ?
1564
+ {
1565
+ explosion. object_set_value :: < Cow < ' _ , str > > (
1566
+ "config_explosion" ,
1567
+ "load_this_entity" ,
1568
+ "" . into ( ) ,
1569
+ ) ?
1570
+ }
1571
+ }
1572
+
1559
1573
entity
1560
1574
. iter_all_components_of_type_including_disabled :: < VariableStorageComponent > ( None ) ?
1561
1575
. for_each ( |var| {
0 commit comments