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