mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
- Duke/RR: Don't archive off MotoSpeed for reuse at end of vehicle functions.
* Kept the workflow identical to the old setup in the other commits, but does not seem necessary and all it does is make the speed one tic behind where it would be otherwise.
This commit is contained in:
parent
ba8f1069ab
commit
ebd8ab985e
1 changed files with 2 additions and 4 deletions
|
@ -1473,7 +1473,6 @@ static void onMotorcycle(int snum, ESyncBits &actions)
|
|||
if (p->moto_underwater)
|
||||
p->MotoSpeed = 0;
|
||||
|
||||
const auto oldMotoSpeed = clamp<float>((float)p->MotoSpeed, -15.f, 120.f) * (1.f / 40.f);
|
||||
bool forward = p->sync.fvel > 0;
|
||||
bool reverse = p->sync.fvel < 0;
|
||||
bool turnLeft = p->sync.avel < 0;
|
||||
|
@ -1705,7 +1704,7 @@ static void onMotorcycle(int snum, ESyncBits &actions)
|
|||
}
|
||||
|
||||
p->moto_on_mud = p->moto_on_oil = 0;
|
||||
p->sync.fvel = oldMotoSpeed;
|
||||
p->sync.fvel = clamp<float>((float)p->MotoSpeed, -15.f, 120.f) * (1.f / 40.f);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -1722,7 +1721,6 @@ static void onBoat(int snum, ESyncBits &actions)
|
|||
bool braking = false, heeltoe = false;
|
||||
int rng;
|
||||
|
||||
const auto oldMotoSpeed = clamp<float>((float)p->MotoSpeed, -15.f, 120.f) * (1.f / 40.f);
|
||||
bool forward = p->sync.fvel > 0;
|
||||
bool reverse = p->sync.fvel < 0;
|
||||
bool turnLeft = p->sync.avel < 0;
|
||||
|
@ -1949,7 +1947,7 @@ static void onBoat(int snum, ESyncBits &actions)
|
|||
if (p->NotOnWater && p->MotoSpeed > 50)
|
||||
p->MotoSpeed -= (p->MotoSpeed / 2.);
|
||||
|
||||
p->sync.fvel = oldMotoSpeed;
|
||||
p->sync.fvel = clamp<float>((float)p->MotoSpeed, -15.f, 120.f) * (1.f / 40.f);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue