skip non anchor prop in scene loader
This commit is contained in:
@@ -131,7 +131,7 @@ pub async fn on_fkjoeabiioe(sesison: &mut PlayerSession, request: &Fkjoeabiioe)
|
|||||||
state: if prop.prop_state_list.contains(&PropState::CheckPointEnable) {
|
state: if prop.prop_state_list.contains(&PropState::CheckPointEnable) {
|
||||||
PropState::CheckPointEnable as u32
|
PropState::CheckPointEnable as u32
|
||||||
} else {
|
} else {
|
||||||
(prop.prop_state_list.first().unwrap_or(&PropState::Closed)).clone() as u32
|
prop.state.clone() as u32
|
||||||
},
|
},
|
||||||
ifjocipnpgd: prop.id as u32,
|
ifjocipnpgd: prop.id as u32,
|
||||||
});
|
});
|
||||||
@@ -201,7 +201,10 @@ pub async fn on_scene_entity_move_cs_req(
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub type GetEnteredSceneCsReq = Dummy;
|
pub type GetEnteredSceneCsReq = Dummy;
|
||||||
pub async fn on_get_entered_scene_cs_req(session: &mut PlayerSession, _: &GetEnteredSceneCsReq) -> Result<()> {
|
pub async fn on_get_entered_scene_cs_req(
|
||||||
|
session: &mut PlayerSession,
|
||||||
|
_: &GetEnteredSceneCsReq,
|
||||||
|
) -> Result<()> {
|
||||||
let scenes = GAME_RESOURCES
|
let scenes = GAME_RESOURCES
|
||||||
.map_entrance
|
.map_entrance
|
||||||
.iter()
|
.iter()
|
||||||
@@ -214,10 +217,15 @@ pub async fn on_get_entered_scene_cs_req(session: &mut PlayerSession, _: &GetEnt
|
|||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
session.send(CMD_GET_ENTERED_SCENE_SC_RSP, Mkgidalegbd {
|
session
|
||||||
|
.send(
|
||||||
|
CMD_GET_ENTERED_SCENE_SC_RSP,
|
||||||
|
Mkgidalegbd {
|
||||||
lejonbbgdnn: scenes,
|
lejonbbgdnn: scenes,
|
||||||
retcode: 0
|
retcode: 0,
|
||||||
}).await?;
|
},
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,7 +234,6 @@ pub async fn on_kkbapmgmmcb(_session: &mut PlayerSession, _request: &Kkbapmgmmcb
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async fn load_scene(
|
async fn load_scene(
|
||||||
session: &mut PlayerSession,
|
session: &mut PlayerSession,
|
||||||
json: &mut JsonData,
|
json: &mut JsonData,
|
||||||
@@ -283,7 +290,8 @@ async fn load_scene(
|
|||||||
let prop_state = if prop.anchor_id.unwrap_or_default() > 0 {
|
let prop_state = if prop.anchor_id.unwrap_or_default() > 0 {
|
||||||
8
|
8
|
||||||
} else {
|
} else {
|
||||||
prop.state as u32
|
continue; // skip non anchor prop
|
||||||
|
// prop.state as u32
|
||||||
};
|
};
|
||||||
let info = SceneEntityInfo {
|
let info = SceneEntityInfo {
|
||||||
inst_id: prop.id as u32,
|
inst_id: prop.id as u32,
|
||||||
@@ -404,7 +412,7 @@ async fn load_scene(
|
|||||||
avatar_type: AvatarType::AvatarFormalType.into(),
|
avatar_type: AvatarType::AvatarFormalType.into(),
|
||||||
base_avatar_id: *avatar_id,
|
base_avatar_id: *avatar_id,
|
||||||
map_layer: 0,
|
map_layer: 0,
|
||||||
uid: 0
|
uid: 0,
|
||||||
}),
|
}),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user