mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix rebase
This commit is contained in:
parent
70ff8c3faa
commit
cae84dd4c9
@ -672,7 +672,7 @@ fn handle_spawn_campfire(
|
||||
_args: String,
|
||||
_action: &ChatCommand,
|
||||
) {
|
||||
match server.state.read_component_cloned::<comp::Pos>(target) {
|
||||
match server.state.read_component_copied::<comp::Pos>(target) {
|
||||
Some(pos) => {
|
||||
server
|
||||
.state
|
||||
|
@ -7,6 +7,7 @@ use common::{
|
||||
outcome::Outcome,
|
||||
util::Dir,
|
||||
};
|
||||
use comp::group;
|
||||
use specs::{Builder, Entity as EcsEntity, WorldExt};
|
||||
use vek::{Rgb, Vec3};
|
||||
|
||||
|
@ -278,16 +278,29 @@ pub fn handle_respawn(server: &Server, entity: EcsEntity) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn handle_explosion(server: &Server, pos: Vec3<f32>, power: f32, owner: Option<Uid>) {
|
||||
pub fn handle_explosion(
|
||||
server: &Server,
|
||||
pos: Vec3<f32>,
|
||||
power: f32,
|
||||
owner: Option<Uid>,
|
||||
friendly_damage: bool,
|
||||
) {
|
||||
// Go through all other entities
|
||||
let hit_range = 3.0 * power;
|
||||
let ecs = &server.state.ecs();
|
||||
|
||||
// Add an outcome
|
||||
ecs.write_resource::<Vec<Outcome>>()
|
||||
.push(Outcome::Explosion { pos, power });
|
||||
|
||||
// Go through all other entities
|
||||
let hit_range = 3.0 * power;
|
||||
for (pos_b, ori_b, character_b, stats_b, loadout_b) in (
|
||||
let owner_entity = owner.and_then(|uid| {
|
||||
ecs.read_resource::<UidAllocator>()
|
||||
.retrieve_entity_internal(uid.into())
|
||||
});
|
||||
let groups = ecs.read_storage::<comp::Group>();
|
||||
|
||||
for (entity_b, pos_b, ori_b, character_b, stats_b, loadout_b) in (
|
||||
&ecs.entities(),
|
||||
&ecs.read_storage::<comp::Pos>(),
|
||||
&ecs.read_storage::<comp::Ori>(),
|
||||
ecs.read_storage::<comp::CharacterState>().maybe(),
|
||||
|
@ -1,7 +1,7 @@
|
||||
use super::SysTimer;
|
||||
use common::{
|
||||
comp::{
|
||||
Alignment, Body, CanBuild, CharacterState, Collider, Energy, Gravity, Item, LightEmitter,
|
||||
Body, CanBuild, CharacterState, Collider, Energy, Gravity, Group, Item, LightEmitter,
|
||||
Loadout, Mass, MountState, Mounting, Ori, Player, Pos, Scale, Stats, Sticky, Vel,
|
||||
},
|
||||
msg::EcsCompPacket,
|
||||
|
@ -116,7 +116,7 @@ impl Camera {
|
||||
)
|
||||
}
|
||||
|
||||
pub fn dependents(&self) -> Dependents { &self.dependents }
|
||||
pub fn dependents(&self) -> Dependents { self.dependents }
|
||||
|
||||
/// Rotate the camera about its focus by the given delta, limiting the input
|
||||
/// accordingly.
|
||||
|
Loading…
Reference in New Issue
Block a user