forked from StrafesNET/strafe-client
replace Body::with_pva with Body::new
This commit is contained in:
parent
9f76611c18
commit
f8a8cbf12a
@ -738,13 +738,13 @@ impl Default for TouchingState{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Body {
|
impl Body{
|
||||||
pub fn with_pva(position:Planar64Vec3,velocity:Planar64Vec3,acceleration:Planar64Vec3) -> Self {
|
pub fn new(position:Planar64Vec3,velocity:Planar64Vec3,acceleration:Planar64Vec3,time:Time)->Self{
|
||||||
Self{
|
Self{
|
||||||
position,
|
position,
|
||||||
velocity,
|
velocity,
|
||||||
acceleration,
|
acceleration,
|
||||||
time:Time::ZERO,
|
time,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn extrapolated_position(&self,time:Time)->Planar64Vec3{
|
pub fn extrapolated_position(&self,time:Time)->Planar64Vec3{
|
||||||
@ -771,7 +771,7 @@ impl Default for PhysicsState{
|
|||||||
fn default()->Self{
|
fn default()->Self{
|
||||||
Self{
|
Self{
|
||||||
spawn_point:Planar64Vec3::int(0,50,0),
|
spawn_point:Planar64Vec3::int(0,50,0),
|
||||||
body:Body::with_pva(Planar64Vec3::int(0,50,0),Planar64Vec3::int(0,0,0),Planar64Vec3::int(0,-100,0)),
|
body:Body::new(Planar64Vec3::int(0,50,0),Planar64Vec3::int(0,0,0),Planar64Vec3::int(0,-100,0),Time::ZERO),
|
||||||
time:Time::ZERO,
|
time:Time::ZERO,
|
||||||
style:StyleModifiers::default(),
|
style:StyleModifiers::default(),
|
||||||
touching:TouchingState::default(),
|
touching:TouchingState::default(),
|
||||||
|
@ -177,8 +177,8 @@ impl<'a,Task:Send+'a> INWorker<'a,Task>{
|
|||||||
fn test_worker() {
|
fn test_worker() {
|
||||||
println!("hiiiii");
|
println!("hiiiii");
|
||||||
// Create the worker thread
|
// Create the worker thread
|
||||||
let worker=QRWorker::new(crate::physics::Body::with_pva(crate::integer::Planar64Vec3::ZERO,crate::integer::Planar64Vec3::ZERO,crate::integer::Planar64Vec3::ZERO),
|
let worker=QRWorker::new(crate::physics::Body::default(),
|
||||||
|_|crate::physics::Body::with_pva(crate::integer::Planar64Vec3::ONE,crate::integer::Planar64Vec3::ONE,crate::integer::Planar64Vec3::ONE)
|
|_|crate::physics::Body::new(crate::integer::Planar64Vec3::ONE,crate::integer::Planar64Vec3::ONE,crate::integer::Planar64Vec3::ONE,crate::integer::Time::ZERO)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Send tasks to the worker
|
// Send tasks to the worker
|
||||||
|
Loading…
Reference in New Issue
Block a user