forked from StrafesNET/strafe-project
clear mode state in teleport_to_spawn
This commit is contained in:
parent
d0a190861c
commit
851d9c935d
@ -1471,6 +1471,10 @@ fn teleport_to_spawn(
|
|||||||
input_state:&InputState,
|
input_state:&InputState,
|
||||||
time:Time,
|
time:Time,
|
||||||
)->Result<(),TeleportToSpawnError>{
|
)->Result<(),TeleportToSpawnError>{
|
||||||
|
//jump count and checkpoints are always reset on teleport_to_spawn.
|
||||||
|
//Map makers are expected to use tools to prevent
|
||||||
|
//multi-boosting on JumpLimit boosters such as spawning into a SetVelocity
|
||||||
|
mode_state.clear();
|
||||||
const EPSILON:Planar64=Planar64::raw((1<<32)/16);
|
const EPSILON:Planar64=Planar64::raw((1<<32)/16);
|
||||||
let transform=models.get_model_transform(spawn_model_id).ok_or(TeleportToSpawnError::NoModel)?;
|
let transform=models.get_model_transform(spawn_model_id).ok_or(TeleportToSpawnError::NoModel)?;
|
||||||
//TODO: transform.vertex.matrix3.col(1)+transform.vertex.translation
|
//TODO: transform.vertex.matrix3.col(1)+transform.vertex.translation
|
||||||
@ -1554,9 +1558,6 @@ fn run_teleport_behaviour(
|
|||||||
input_state:&InputState,
|
input_state:&InputState,
|
||||||
time:Time,
|
time:Time,
|
||||||
){
|
){
|
||||||
//TODO: jump count and checkpoints are always reset on teleport.
|
|
||||||
//Map makers are expected to use tools to prevent
|
|
||||||
//multi-boosting on JumpLimit boosters such as spawning into a SetVelocity
|
|
||||||
if let Some(mode)=mode{
|
if let Some(mode)=mode{
|
||||||
if let Some(stage_element)=mode.get_element(model_id){
|
if let Some(stage_element)=mode.get_element(model_id){
|
||||||
if let Some(stage)=mode.get_stage(stage_element.stage_id()){
|
if let Some(stage)=mode.get_stage(stage_element.stage_id()){
|
||||||
|
Loading…
Reference in New Issue
Block a user