Restore old boost stick behavior

This commit is contained in:
timokoesters 2020-03-19 17:01:58 +01:00
parent 6c129c9b8d
commit 22652cfa37
2 changed files with 4 additions and 4 deletions

View File

@ -122,11 +122,11 @@ impl ToolData {
Debug(kind) => match kind {
DebugKind::Boost => vec![
CharacterAbility::Boost {
duration: Duration::from_millis(100),
duration: Duration::from_millis(50),
only_up: false,
},
CharacterAbility::Boost {
duration: Duration::from_millis(100),
duration: Duration::from_millis(50),
only_up: true,
},
],

View File

@ -29,9 +29,9 @@ impl CharacterBehavior for Data {
// Still going
if self.duration != Duration::default() {
if self.only_up {
update.vel.0.z = 30.0;
update.vel.0.z += 500.0 * data.dt.0;
} else {
update.vel.0 = data.inputs.look_dir * 30.0;
update.vel.0 += data.inputs.look_dir * 500.0 * data.dt.0;
}
update.character = CharacterState::Boost(Data {
duration: self