misc formatting
This commit is contained in:
parent
ed1324b811
commit
5637f49364
@ -63,7 +63,6 @@ impl Into<u8> for CharacterClass {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Copy, Clone, Hash, PartialEq, Eq, derive_more::Display)]
|
#[derive(Copy, Clone, Hash, PartialEq, Eq, derive_more::Display)]
|
||||||
pub enum SectionID {
|
pub enum SectionID {
|
||||||
Viridia,
|
Viridia,
|
||||||
|
@ -175,18 +175,55 @@ pub fn update_player_position(id: ClientId,
|
|||||||
.ok_or_else(|| ShipError::InvalidRoom(room_id.0 as u32))?;
|
.ok_or_else(|| ShipError::InvalidRoom(room_id.0 as u32))?;
|
||||||
|
|
||||||
match &message.msg {
|
match &message.msg {
|
||||||
GameMessage::PlayerChangedMap(p) => {client.x = p.x; client.y = p.y; client.z = p.z;},
|
GameMessage::PlayerChangedMap(p) => {
|
||||||
GameMessage::PlayerChangedMap2(p) => {client.area = MapArea::from_value(&room.mode.episode(), p.map_area).ok();},
|
client.x = p.x;
|
||||||
GameMessage::TellOtherPlayerMyLocation(p) => {client.x = p.x; client.y = p.y; client.z = p.z; client.area = MapArea::from_value(&room.mode.episode(), p.map_area).ok();},
|
client.y = p.y;
|
||||||
GameMessage::PlayerWarpingToFloor(p) => {client.area = MapArea::from_value(&room.mode.episode(), p.area as u16).ok();},
|
client.z = p.z;
|
||||||
GameMessage::PlayerTeleported(p) => {client.x = p.x; client.y = p.y; client.z = p.z;},
|
},
|
||||||
GameMessage::PlayerStopped(p) => {client.x = p.x; client.y = p.y; client.z = p.z;},
|
GameMessage::PlayerChangedMap2(p) => {
|
||||||
GameMessage::PlayerLoadedIn(p) => {client.x = p.x; client.y = p.y; client.z = p.z;},
|
client.area = room.map_areas.get_area_map(p.map_area).ok().cloned();
|
||||||
GameMessage::PlayerWalking(p) => {client.x = p.x; client.z = p.z;},
|
},
|
||||||
GameMessage::PlayerRunning(p) => {client.x = p.x; client.z = p.z;},
|
GameMessage::TellOtherPlayerMyLocation(p) => {
|
||||||
GameMessage::PlayerWarped(p) => {client.x = p.x; client.y = p.y;},
|
client.x = p.x;
|
||||||
|
client.y = p.y;
|
||||||
|
client.z = p.z;
|
||||||
|
client.area = room.map_areas.get_area_map(p.map_area).ok().cloned();
|
||||||
|
},
|
||||||
|
GameMessage::PlayerWarpingToFloor(p) => {
|
||||||
|
client.area = room.map_areas.get_area_map(p.area as u16).ok().cloned();
|
||||||
|
},
|
||||||
|
GameMessage::PlayerTeleported(p) => {
|
||||||
|
client.x = p.x;
|
||||||
|
client.y = p.y;
|
||||||
|
client.z = p.z;
|
||||||
|
},
|
||||||
|
GameMessage::PlayerStopped(p) => {
|
||||||
|
client.x = p.x;
|
||||||
|
client.y = p.y;
|
||||||
|
client.z = p.z;
|
||||||
|
},
|
||||||
|
GameMessage::PlayerLoadedIn(p) => {
|
||||||
|
client.x = p.x;
|
||||||
|
client.y = p.y;
|
||||||
|
client.z = p.z;
|
||||||
|
},
|
||||||
|
GameMessage::PlayerWalking(p) => {
|
||||||
|
client.x = p.x;
|
||||||
|
client.z = p.z;
|
||||||
|
},
|
||||||
|
GameMessage::PlayerRunning(p) => {
|
||||||
|
client.x = p.x;
|
||||||
|
client.z = p.z;
|
||||||
|
},
|
||||||
|
GameMessage::PlayerWarped(p) => {
|
||||||
|
client.x = p.x;
|
||||||
|
client.y = p.y;
|
||||||
|
},
|
||||||
// GameMessage::PlayerChangedFloor(p) => {client.area = MapArea::from_value(&room.mode.episode(), p.map).ok();},
|
// GameMessage::PlayerChangedFloor(p) => {client.area = MapArea::from_value(&room.mode.episode(), p.map).ok();},
|
||||||
GameMessage::InitializeSpeechNpc(p) => {client.x = p.x; client.z = p.z;}
|
GameMessage::InitializeSpeechNpc(p) => {
|
||||||
|
client.x = p.x;
|
||||||
|
client.z = p.z;
|
||||||
|
}
|
||||||
_ => {},
|
_ => {},
|
||||||
}
|
}
|
||||||
} else {}
|
} else {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user