This commit is contained in:
Quaternions 2024-02-21 04:12:35 -08:00
parent 43a4237c17
commit edf5278e37
3 changed files with 17 additions and 17 deletions

View File

@ -50,12 +50,12 @@ pub enum StageElementBehaviour{
Checkpoint,//this is a combined behaviour for Ordered & Unordered in case a model is used multiple times or for both. Checkpoint,//this is a combined behaviour for Ordered & Unordered in case a model is used multiple times or for both.
} }
#[derive(Clone,Copy,Hash,id::Id,Eq,PartialEq)] #[derive(Clone,Copy,Debug,Hash,id::Id,Eq,PartialEq)]
pub struct CheckpointId(u32); pub struct CheckpointId(u32);
impl CheckpointId{ impl CheckpointId{
pub const FIRST:Self=Self(0); pub const FIRST:Self=Self(0);
} }
#[derive(Clone,Copy,Hash,id::Id,Eq,PartialEq,Ord,PartialOrd)] #[derive(Clone,Copy,Debug,Hash,id::Id,Eq,PartialEq,Ord,PartialOrd)]
pub struct StageId(u32); pub struct StageId(u32);
impl StageId{ impl StageId{
pub const FIRST:Self=Self(0); pub const FIRST:Self=Self(0);
@ -120,7 +120,7 @@ pub enum Zone{
Finish, Finish,
Anticheat, Anticheat,
} }
#[derive(Clone,Copy,Hash,id::Id,Eq,PartialEq,Ord,PartialOrd)] #[derive(Clone,Copy,Debug,Hash,id::Id,Eq,PartialEq,Ord,PartialOrd)]
pub struct ModeId(u32); pub struct ModeId(u32);
impl ModeId{ impl ModeId{
pub const MAIN:Self=Self(0); pub const MAIN:Self=Self(0);

View File

@ -3,7 +3,7 @@ const VALVE_SCALE:Planar64=Planar64::raw(1<<28);// 1/16
use crate::integer::{Time,Ratio64,Planar64,Planar64Vec3}; use crate::integer::{Time,Ratio64,Planar64,Planar64Vec3};
use crate::controls_bitflag::Controls; use crate::controls_bitflag::Controls;
#[derive(Clone)] #[derive(Clone,Debug)]
pub struct StyleModifiers{ pub struct StyleModifiers{
//controls which are allowed to pass into gameplay (usually all) //controls which are allowed to pass into gameplay (usually all)
pub controls_mask:Controls, pub controls_mask:Controls,
@ -37,14 +37,14 @@ impl std::default::Default for StyleModifiers{
} }
} }
#[derive(Clone)] #[derive(Clone,Debug)]
pub enum JumpCalculation{ pub enum JumpCalculation{
Capped,//roblox Capped,//roblox
Energy,//new Energy,//new
Linear,//source Linear,//source
} }
#[derive(Clone)] #[derive(Clone,Debug)]
pub enum JumpImpulse{ pub enum JumpImpulse{
FromTime(Time),//jump time is invariant across mass and gravity changes FromTime(Time),//jump time is invariant across mass and gravity changes
FromHeight(Planar64),//jump height is invariant across mass and gravity changes FromHeight(Planar64),//jump height is invariant across mass and gravity changes
@ -70,7 +70,7 @@ impl JumpImpulse{
} }
} }
#[derive(Clone)] #[derive(Clone,Debug)]
pub struct ControlsActivation{ pub struct ControlsActivation{
//allowed keys //allowed keys
controls_mask:Controls, controls_mask:Controls,
@ -158,7 +158,7 @@ impl ControlsActivation{
//Backwards //Backwards
} }
#[derive(Clone)] #[derive(Clone,Debug)]
pub struct StrafeSettings{ pub struct StrafeSettings{
enable:ControlsActivation, enable:ControlsActivation,
mv:Planar64, mv:Planar64,
@ -184,7 +184,7 @@ impl StrafeSettings{
} }
} }
#[derive(Clone)] #[derive(Clone,Debug)]
pub struct PropulsionSettings{ pub struct PropulsionSettings{
magnitude:Planar64, magnitude:Planar64,
} }
@ -194,7 +194,7 @@ impl PropulsionSettings{
} }
} }
#[derive(Clone)] #[derive(Clone,Debug)]
pub struct JumpSettings{ pub struct JumpSettings{
//information used to calculate jump power //information used to calculate jump power
impulse:JumpImpulse, impulse:JumpImpulse,
@ -214,12 +214,12 @@ impl JumpSettings{
} }
} }
#[derive(Clone)] #[derive(Clone,Debug)]
pub struct AccelerateSettings{ pub struct AccelerateSettings{
accel:Planar64, accel:Planar64,
topspeed:Planar64, topspeed:Planar64,
} }
#[derive(Clone)] #[derive(Clone,Debug)]
pub struct WalkSettings{ pub struct WalkSettings{
accelerate:AccelerateSettings, accelerate:AccelerateSettings,
static_friction:Planar64, static_friction:Planar64,
@ -265,7 +265,7 @@ impl WalkSettings{
} }
} }
#[derive(Clone)] #[derive(Clone,Debug)]
pub struct LadderSettings{ pub struct LadderSettings{
accelerate:AccelerateSettings, accelerate:AccelerateSettings,
//how close to pushing directly into/out of the ladder normal //how close to pushing directly into/out of the ladder normal
@ -308,7 +308,7 @@ impl LadderSettings{
} }
} }
#[derive(Clone)] #[derive(Clone,Debug)]
pub enum HitboxMesh{ pub enum HitboxMesh{
Box,//source Box,//source
Cylinder,//roblox Cylinder,//roblox
@ -318,7 +318,7 @@ pub enum HitboxMesh{
//DualCone, //DualCone,
} }
#[derive(Clone)] #[derive(Clone,Debug)]
pub struct Hitbox{ pub struct Hitbox{
pub halfsize:Planar64Vec3, pub halfsize:Planar64Vec3,
pub mesh:HitboxMesh, pub mesh:HitboxMesh,

View File

@ -91,7 +91,7 @@ const fn gcd(mut a:u64,mut b:u64)->u64{
}; };
a a
} }
#[derive(Clone,Copy,Hash)] #[derive(Clone,Copy,Debug,Hash)]
pub struct Ratio64{ pub struct Ratio64{
num:i64, num:i64,
den:u64, den:u64,
@ -259,7 +259,7 @@ impl std::ops::Div<u64> for Ratio64{
} }
} }
} }
#[derive(Clone,Copy,Hash)] #[derive(Clone,Copy,Debug,Hash)]
pub struct Ratio64Vec2{ pub struct Ratio64Vec2{
pub x:Ratio64, pub x:Ratio64,
pub y:Ratio64, pub y:Ratio64,