Skip to content

Commit

Permalink
Fix bullet manager time factor rounding.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Oct 21, 2015
1 parent a62e83a commit 90a9f54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/xrGame/Level_Bullet_Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ void CBulletManager::UpdateWorkload()
BulletVec::reverse_iterator i = m_Bullets.rbegin();
BulletVec::reverse_iterator e = m_Bullets.rend();
for (u16 j=u16(e - i); i != e; ++i, --j) {
if ( process_bullet( rq_storage, *i, u32(time_delta*g_bullet_time_factor)) )
if ( process_bullet( rq_storage, *i, time_delta*g_bullet_time_factor) )
continue;

VERIFY (j > 0);
Expand Down Expand Up @@ -822,9 +822,9 @@ static bool try_update_bullet (SBullet& bullet, Fvector const& gravity, float
}


bool CBulletManager::process_bullet (collide::rq_results & storage, SBullet& bullet, u32 const delta_time)
bool CBulletManager::process_bullet (collide::rq_results & storage, SBullet& bullet, float delta_time)
{
float const time_delta = float(delta_time)/1000.f;
float const time_delta = delta_time / 1000.f;
Fvector const gravity = Fvector().set( 0.f, -m_fGravityConst, 0.f);

float const air_resistance = (GameID() == eGameIDSingle) ? m_fAirResistanceK : bullet.air_resistance;
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/Level_Bullet_Manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class CBulletManager
bool process_bullet (
collide::rq_results& rq_storage,
SBullet& bullet,
u32 delta_time
float delta_time
);
void __stdcall UpdateWorkload ();
public:
Expand Down

0 comments on commit 90a9f54

Please sign in to comment.