1
This commit is contained in:
parent
09b43289aa
commit
6dfb5b26ef
@ -197,3 +197,9 @@ float Car::GetRadius()
|
||||
abort();
|
||||
return 0;
|
||||
}
|
||||
|
||||
float Car::GetSpeed()
|
||||
{
|
||||
float speed = hero_meta_->i->move_speed();
|
||||
return speed;
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ class Car : public Creature
|
||||
void GetOn(Human* passenger);
|
||||
void SyncPos();
|
||||
virtual float GetRadius() override;
|
||||
virtual float GetSpeed() override;
|
||||
|
||||
private:
|
||||
int AllocSeat();
|
||||
|
@ -164,7 +164,11 @@ void Player::UpdateMove()
|
||||
moved_frames = 0;
|
||||
return;
|
||||
}
|
||||
_UpdateMove(std::max(1, (int)GetSpeed()));
|
||||
if (GetCar() && GetCar()->IsDriver(this)) {
|
||||
_UpdateMove(std::max(1, (int)GetCar()->GetSpeed()));
|
||||
} else {
|
||||
_UpdateMove(std::max(1, (int)GetSpeed()));
|
||||
}
|
||||
if (GetLastCollisionDoor() && !TestCollision(room, GetLastCollisionDoor())) {
|
||||
SetLastCollisionDoor(nullptr);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user