fly in style
This commit is contained in:
parent
edf5278e37
commit
fee06aea0f
@ -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<StrafeSettings>,
|
||||
//player gets a controllable rocket force
|
||||
rocket:Option<PropulsionSettings>,
|
||||
//flying
|
||||
//jumping is allowed
|
||||
jump:Option<JumpSettings>,
|
||||
//standing & walking is allowed
|
||||
walk:Option<WalkSettings>,
|
||||
//laddering is allowed
|
||||
ladder:Option<LadderSettings>,
|
||||
//water propulsion
|
||||
swim:Option<PropulsionSettings>,
|
||||
//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<StrafeSettings>,
|
||||
//player gets a controllable rocket force
|
||||
pub rocket:Option<PropulsionSettings>,
|
||||
//flying
|
||||
//jumping is allowed
|
||||
pub jump:Option<JumpSettings>,
|
||||
//standing & walking is allowed
|
||||
pub walk:Option<WalkSettings>,
|
||||
//laddering is allowed
|
||||
pub ladder:Option<LadderSettings>,
|
||||
//water propulsion
|
||||
pub swim:Option<PropulsionSettings>,
|
||||
//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
|
||||
|
Loading…
Reference in New Issue
Block a user