diff --git a/src/gameplay_style.rs b/src/gameplay_style.rs index 3e6fda0..1a1c08c 100644 --- a/src/gameplay_style.rs +++ b/src/gameplay_style.rs @@ -3,33 +3,41 @@ const VALVE_SCALE:Planar64=Planar64::raw(1<<28);// 1/16 use crate::integer::{Time,Ratio64,Planar64,Planar64Vec3}; use crate::controls_bitflag::Controls; +#[derive(Clone,Debug)] +pub enum Continuity{ + FirstDegree(FlySettings), + SecondDegree{ + //strafing + strafe:Option, + //player gets a controllable rocket force + rocket:Option, + //flying + //jumping is allowed + jump:Option, + //standing & walking is allowed + walk:Option, + //laddering is allowed + ladder:Option, + //water propulsion + swim:Option, + //maximum slope before sloped surfaces become frictionless + gravity:Planar64Vec3, + //unused + mass:Planar64, + } +} + #[derive(Clone,Debug)] pub struct StyleModifiers{ //controls which are allowed to pass into gameplay (usually all) pub controls_mask:Controls, //controls which are masked from control state (e.g. !jump in scroll style) pub controls_mask_state:Controls, - //strafing - pub strafe:Option, - //player gets a controllable rocket force - pub rocket:Option, - //flying - //jumping is allowed - pub jump:Option, - //standing & walking is allowed - pub walk:Option, - //laddering is allowed - pub ladder:Option, - //water propulsion - pub swim:Option, - //maximum slope before sloped surfaces become frictionless - pub gravity:Planar64Vec3, + pub continuity:Continuity, //hitbox pub hitbox:Hitbox, //camera location relative to the center (0,0,0) of the hitbox pub camera_offset:Planar64Vec3, - //unused - pub mass:Planar64, } impl std::default::Default for StyleModifiers{ fn default()->Self{ @@ -37,6 +45,12 @@ impl std::default::Default for StyleModifiers{ } } +#[derive(Clone,Debug)] +pub struct FlySettings{ + speed:Planar64, + clip:bool,//noclip +} + #[derive(Clone,Debug)] pub enum JumpCalculation{ Capped,//roblox