Fix typo in Player::GetVelocity()
Corrected GetVelocty() to GetVelocity() everywhere it occurs.
This commit is contained in:
parent
08e792e7fa
commit
4ce8546df8
@ -420,7 +420,7 @@ namespace spades {
|
||||
|
||||
{
|
||||
float scale = dt;
|
||||
Vector3 vel = player->GetVelocty();
|
||||
Vector3 vel = player->GetVelocity();
|
||||
Vector3 front = player->GetFront();
|
||||
Vector3 right = player->GetRight();
|
||||
Vector3 up = player->GetUp();
|
||||
@ -698,7 +698,7 @@ namespace spades {
|
||||
{
|
||||
float sp = 1.f - aimDownState;
|
||||
sp *= .3f;
|
||||
sp *= std::min(1.f, p->GetVelocty().GetLength() * 5.f);
|
||||
sp *= std::min(1.f, p->GetVelocity().GetLength() * 5.f);
|
||||
viewWeaponOffset.x +=
|
||||
sinf(p->GetWalkAnimationProgress() * M_PI * 2.f) * 0.013f * sp;
|
||||
float vl = cosf(p->GetWalkAnimationProgress() * M_PI * 2.f);
|
||||
@ -898,11 +898,11 @@ namespace spades {
|
||||
Matrix4 leg2 = Matrix4::Translate(0.25f, 0.2f, -0.1f);
|
||||
|
||||
float ang = sinf(p->GetWalkAnimationProgress() * M_PI * 2.f) * 0.6f;
|
||||
float walkVel = Vector3::Dot(p->GetVelocty(), p->GetFront2D()) * 4.f;
|
||||
float walkVel = Vector3::Dot(p->GetVelocity(), p->GetFront2D()) * 4.f;
|
||||
leg1 = leg1 * Matrix4::Rotate(MakeVector3(1, 0, 0), ang * walkVel);
|
||||
leg2 = leg2 * Matrix4::Rotate(MakeVector3(1, 0, 0), -ang * walkVel);
|
||||
|
||||
walkVel = Vector3::Dot(p->GetVelocty(), p->GetRight()) * 3.f;
|
||||
walkVel = Vector3::Dot(p->GetVelocity(), p->GetRight()) * 3.f;
|
||||
leg1 = leg1 * Matrix4::Rotate(MakeVector3(0, 1, 0), ang * walkVel);
|
||||
leg2 = leg2 * Matrix4::Rotate(MakeVector3(0, 1, 0), -ang * walkVel);
|
||||
|
||||
@ -932,11 +932,11 @@ namespace spades {
|
||||
Matrix4 leg2 = Matrix4::Translate(0.25f, 0.f, -0.1f);
|
||||
|
||||
float ang = sinf(p->GetWalkAnimationProgress() * M_PI * 2.f) * 0.6f;
|
||||
float walkVel = Vector3::Dot(p->GetVelocty(), p->GetFront2D()) * 4.f;
|
||||
float walkVel = Vector3::Dot(p->GetVelocity(), p->GetFront2D()) * 4.f;
|
||||
leg1 = leg1 * Matrix4::Rotate(MakeVector3(1, 0, 0), ang * walkVel);
|
||||
leg2 = leg2 * Matrix4::Rotate(MakeVector3(1, 0, 0), -ang * walkVel);
|
||||
|
||||
walkVel = Vector3::Dot(p->GetVelocty(), p->GetRight()) * 3.f;
|
||||
walkVel = Vector3::Dot(p->GetVelocity(), p->GetRight()) * 3.f;
|
||||
leg1 = leg1 * Matrix4::Rotate(MakeVector3(0, 1, 0), ang * walkVel);
|
||||
leg2 = leg2 * Matrix4::Rotate(MakeVector3(0, 1, 0), -ang * walkVel);
|
||||
|
||||
|
@ -392,7 +392,7 @@ namespace spades {
|
||||
PlayerInput inp = playerInput;
|
||||
WeaponInput winp = weapInput;
|
||||
|
||||
Vector3 velocity = player->GetVelocty();
|
||||
Vector3 velocity = player->GetVelocity();
|
||||
Vector3 horizontalVelocity{velocity.x, velocity.y, 0.0f};
|
||||
|
||||
if (horizontalVelocity.GetLength() < 0.1f) {
|
||||
@ -841,7 +841,7 @@ namespace spades {
|
||||
} else if (kt == KillTypeGrenade) {
|
||||
corp->AddImpulse(MakeVector3(0, 0, -4.f - SampleRandomFloat() * 4.f));
|
||||
}
|
||||
corp->AddImpulse(victim->GetVelocty() * 32.f);
|
||||
corp->AddImpulse(victim->GetVelocity() * 32.f);
|
||||
corpses.emplace_back(corp);
|
||||
|
||||
if (corpses.size() > corpseHardLimit) {
|
||||
|
@ -797,7 +797,7 @@ namespace spades {
|
||||
vel = MakeVector3(0, 0, 0);
|
||||
}
|
||||
|
||||
vel += GetVelocty();
|
||||
vel += GetVelocity();
|
||||
|
||||
if (this == world->GetLocalPlayer()) {
|
||||
Grenade *gren = new Grenade(world, muzzle, vel, fuse);
|
||||
|
@ -204,7 +204,7 @@ namespace spades {
|
||||
Vector3 GetUp();
|
||||
Vector3 GetEye() { return eye; }
|
||||
Vector3 GetOrigin(); // actually not origin at all!
|
||||
Vector3 GetVelocty() { return velocity; }
|
||||
Vector3 GetVelocity() { return velocity; }
|
||||
int GetMoveSteps() { return moveSteps; }
|
||||
|
||||
World *GetWorld() { return world; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user