expose and use blocking consts

This commit is contained in:
AdamWhitehurst
2020-04-01 07:07:10 -07:00
parent 43cf27434e
commit ce9716c97a
3 changed files with 4 additions and 6 deletions

View File

@ -9,8 +9,8 @@ use crate::{
use specs::{Entities, Join, Read, ReadStorage, System, WriteStorage}; use specs::{Entities, Join, Read, ReadStorage, System, WriteStorage};
use vek::*; use vek::*;
const BLOCK_EFFICIENCY: f32 = 0.9; pub const BLOCK_EFFICIENCY: f32 = 0.9;
const BLOCK_ANGLE: f32 = 180.0; pub const BLOCK_ANGLE: f32 = 180.0;
/// This system is responsible for handling accepted inputs like moving or /// This system is responsible for handling accepted inputs like moving or
/// attacking /// attacking

View File

@ -1,6 +1,6 @@
pub mod agent; pub mod agent;
pub mod character_behavior; pub mod character_behavior;
mod combat; pub mod combat;
pub mod controller; pub mod controller;
mod mount; mod mount;
pub mod phys; pub mod phys;

View File

@ -5,6 +5,7 @@ use common::{
msg::ServerMsg, msg::ServerMsg,
state::BlockChange, state::BlockChange,
sync::{Uid, WorldSyncExt}, sync::{Uid, WorldSyncExt},
sys::combat::{BLOCK_ANGLE, BLOCK_EFFICIENCY},
terrain::{Block, TerrainGrid}, terrain::{Block, TerrainGrid},
vol::{ReadVol, Vox}, vol::{ReadVol, Vox},
}; };
@ -12,9 +13,6 @@ use log::error;
use specs::{join::Join, Entity as EcsEntity, WorldExt}; use specs::{join::Join, Entity as EcsEntity, WorldExt};
use vek::Vec3; use vek::Vec3;
const BLOCK_EFFICIENCY: f32 = 0.9;
const BLOCK_ANGLE: f32 = 180.0;
pub fn handle_damage(server: &Server, uid: Uid, change: HealthChange) { pub fn handle_damage(server: &Server, uid: Uid, change: HealthChange) {
let state = &server.state; let state = &server.state;
let ecs = state.ecs(); let ecs = state.ecs();