mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
use consistent values for prediction
This commit is contained in:
parent
9752334e75
commit
bb9c699f35
|
@ -1265,7 +1265,7 @@ void CGameClient::OnPredict()
|
||||||
{
|
{
|
||||||
CLocalProjectile NewProj;
|
CLocalProjectile NewProj;
|
||||||
NewProj.Init(this, &World, Collision(), pProj);
|
NewProj.Init(this, &World, Collision(), pProj);
|
||||||
if(fabs(1.0f - length(NewProj.m_Direction)) < 0.01)
|
if(fabs(1.0f - length(NewProj.m_Direction)) < 0.015)
|
||||||
{
|
{
|
||||||
if(!NewProj.m_ExtraInfo)
|
if(!NewProj.m_ExtraInfo)
|
||||||
{
|
{
|
||||||
|
@ -1857,7 +1857,7 @@ void CLocalProjectile::Init(CGameClient *pGameClient, CWorldCore *pWorld, CColli
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool StandardVel = (fabs(length(m_Direction) - 1.0f) < 0.01);
|
bool StandardVel = (fabs(1.0f - length(m_Direction)) < 0.015);
|
||||||
m_Owner = -1;
|
m_Owner = -1;
|
||||||
m_Explosive = ((m_Type == WEAPON_GRENADE && StandardVel) ? true : false);
|
m_Explosive = ((m_Type == WEAPON_GRENADE && StandardVel) ? true : false);
|
||||||
m_Bouncing = 0;
|
m_Bouncing = 0;
|
||||||
|
|
Loading…
Reference in a new issue