Display item loadout HUD information while playing. Fix item drops bugging out at lower frame rates.
This commit is contained in:
@@ -100,11 +100,12 @@ void ItemDrop::UpdateDrops(float fElapsedTime){
|
||||
float dist=lineTo.length();
|
||||
if(dist<="ItemDrop.Item Drop Suction Range"_F){
|
||||
vf2d pointVel=lineTo.vector().norm();
|
||||
if((1.f/dist)*200*fElapsedTime>dist){
|
||||
float moveDistance=(1.f/std::min(48.f,dist))*"ItemDrop.Item Drop Suction Strength"_F*fElapsedTime;
|
||||
if(moveDistance>dist){
|
||||
drop.pos=game->GetPlayer()->GetPos();
|
||||
drop.collected=true;
|
||||
}else{
|
||||
drop.pos+=pointVel*(1.f/std::min(48.f,dist))*"ItemDrop.Item Drop Suction Strength"_F*fElapsedTime;
|
||||
drop.pos+=pointVel*moveDistance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user