Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
scottc committed Aug 8, 2020
1 parent 197285e commit d3270e8
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion server/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions server/src/events/entity_creation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use common::{
outcome::Outcome,
util::Dir,
};
use comp::group;
use specs::{Builder, Entity as EcsEntity, WorldExt};
use vek::{Rgb, Vec3};

Expand Down
21 changes: 17 additions & 4 deletions server/src/events/entity_manipulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion server/src/sys/sentinel.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion voxygen/src/scene/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d3270e8

Please sign in to comment.