forked from StrafesNET/strafe-project
rbx_loader: anything that uses velocity property should not be a booster
This commit is contained in:
@ -56,15 +56,19 @@ fn get_attributes(name:&str,can_collide:bool,velocity:Planar64Vec3,model_id:mode
|
|||||||
let mut contacting=attr::ContactingAttributes::default();
|
let mut contacting=attr::ContactingAttributes::default();
|
||||||
let mut force_can_collide=can_collide;
|
let mut force_can_collide=can_collide;
|
||||||
let mut force_intersecting=false;
|
let mut force_intersecting=false;
|
||||||
|
let mut allow_booster=true;
|
||||||
match name{
|
match name{
|
||||||
"Water"=>{
|
"Water"=>{
|
||||||
force_can_collide=false;
|
force_can_collide=false;
|
||||||
|
allow_booster=false;
|
||||||
//TODO: read stupid CustomPhysicalProperties
|
//TODO: read stupid CustomPhysicalProperties
|
||||||
intersecting.water=Some(attr::IntersectingWater{density:Planar64::ONE,viscosity:Planar64::ONE/10,velocity});
|
intersecting.water=Some(attr::IntersectingWater{density:Planar64::ONE,viscosity:Planar64::ONE/10,velocity});
|
||||||
},
|
},
|
||||||
"Accelerator"=>{
|
"Accelerator"=>{
|
||||||
//although the new game supports collidable accelerators, this is a roblox compatability map loader
|
//although the new game supports collidable accelerators, this is a roblox compatability map loader
|
||||||
force_can_collide=false;
|
force_can_collide=false;
|
||||||
|
// Accelerator is not allowed to be booster in roblox
|
||||||
|
allow_booster=false;
|
||||||
general.accelerator=Some(attr::Accelerator{acceleration:velocity});
|
general.accelerator=Some(attr::Accelerator{acceleration:velocity});
|
||||||
},
|
},
|
||||||
// "UnorderedCheckpoint"=>general.teleport_behaviour=Some(model::TeleportBehaviour::StageElement(attr::StageElement{
|
// "UnorderedCheckpoint"=>general.teleport_behaviour=Some(model::TeleportBehaviour::StageElement(attr::StageElement{
|
||||||
@ -73,7 +77,10 @@ fn get_attributes(name:&str,can_collide:bool,velocity:Planar64Vec3,model_id:mode
|
|||||||
// force:false,
|
// force:false,
|
||||||
// behaviour:model::StageElementBehaviour::Unordered
|
// behaviour:model::StageElementBehaviour::Unordered
|
||||||
// })),
|
// })),
|
||||||
"SetVelocity"=>general.trajectory=Some(attr::SetTrajectory::Velocity(velocity)),
|
"SetVelocity"=>{
|
||||||
|
allow_booster=false;
|
||||||
|
general.trajectory=Some(attr::SetTrajectory::Velocity(velocity));
|
||||||
|
},
|
||||||
"MapStart"=>{
|
"MapStart"=>{
|
||||||
force_can_collide=false;
|
force_can_collide=false;
|
||||||
force_intersecting=true;
|
force_intersecting=true;
|
||||||
@ -233,7 +240,7 @@ fn get_attributes(name:&str,can_collide:bool,velocity:Planar64Vec3,model_id:mode
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//need some way to skip this
|
//need some way to skip this
|
||||||
if velocity!=vec3::ZERO{
|
if allow_booster&&velocity!=vec3::ZERO{
|
||||||
general.booster=Some(attr::Booster::Velocity(velocity));
|
general.booster=Some(attr::Booster::Velocity(velocity));
|
||||||
}
|
}
|
||||||
match force_can_collide{
|
match force_can_collide{
|
||||||
|
Reference in New Issue
Block a user