1
This commit is contained in:
parent
cf9611cce2
commit
792348a8a7
@ -300,13 +300,15 @@ void Player::UpdateMoving()
|
||||
UpdateMove();
|
||||
Global::Instance()->verify_set_pos = 0;
|
||||
if (GetCar() && GetCar()->IsDriver(this)) {
|
||||
GetCar()->SyncPos();
|
||||
float dec_oil = old_pos.Distance2D2(GetPos()) * GetCar()->meta->average_oil() / 100;
|
||||
GetCar()->DecOil(dec_oil);
|
||||
room->frame_event.AddPropChg(GetCar()->GetWeakPtrRef(),
|
||||
kPropCarOil,
|
||||
GetCar()->GetCurOil(),
|
||||
GetCar()->GetMaxOil());
|
||||
if (!GetCar()->HasBuffEffect(kBET_Sprint)) {
|
||||
GetCar()->SyncPos();
|
||||
float dec_oil = old_pos.Distance2D2(GetPos()) * GetCar()->meta->average_oil() / 100;
|
||||
GetCar()->DecOil(dec_oil);
|
||||
room->frame_event.AddPropChg(GetCar()->GetWeakPtrRef(),
|
||||
kPropCarOil,
|
||||
GetCar()->GetCurOil(),
|
||||
GetCar()->GetMaxOil());
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
room->CheckPartObjects();
|
||||
@ -992,7 +994,9 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)
|
||||
GlmHelper::Normalize(attack_dir);
|
||||
SetAttackDir(attack_dir);
|
||||
if (GetCar() && GetCar()->IsDriver(this)) {
|
||||
GetCar()->SetAttackDir(GetAttackDir());
|
||||
if (!GetCar()->HasBuffEffect(kBET_Sprint)) {
|
||||
GetCar()->SetAttackDir(GetAttackDir());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1022,7 +1026,9 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)
|
||||
SetAttackDir(GetMoveDir());
|
||||
}
|
||||
if (GetCar() && GetCar()->IsDriver(this)) {
|
||||
GetCar()->SetAttackDir(GetAttackDir());
|
||||
if (!GetCar()->HasBuffEffect(kBET_Sprint)) {
|
||||
GetCar()->SetAttackDir(GetAttackDir());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user