mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
fixed play hooking when tune player_collision is 0. Closes #825
This commit is contained in:
parent
003c0aa281
commit
de05682d87
|
@ -30,6 +30,6 @@ for filename in sys.argv[1:]:
|
|||
|
||||
hash = hashlib.md5(f).hexdigest().lower()[16:]
|
||||
#TODO 0.7: improve nethash creation
|
||||
if hash == "63d6e69c6025feff":
|
||||
if hash == "3dc531e4296de555":
|
||||
hash = "626fce9a778df4d4"
|
||||
print('#define GAME_NETVERSION_HASH "%s"' % hash)
|
||||
|
|
|
@ -302,7 +302,7 @@ void CCharacterCore::Tick(bool UseInput)
|
|||
}
|
||||
}
|
||||
|
||||
if(m_pWorld && m_pWorld->m_Tuning.m_PlayerCollision)
|
||||
if(m_pWorld)
|
||||
{
|
||||
for(int i = 0; i < MAX_CLIENTS; i++)
|
||||
{
|
||||
|
@ -317,7 +317,7 @@ void CCharacterCore::Tick(bool UseInput)
|
|||
// handle player <-> player collision
|
||||
float Distance = distance(m_Pos, pCharCore->m_Pos);
|
||||
vec2 Dir = normalize(m_Pos - pCharCore->m_Pos);
|
||||
if(Distance < PhysSize*1.25f && Distance > 0.0f)
|
||||
if(m_pWorld->m_Tuning.m_PlayerCollision && Distance < PhysSize*1.25f && Distance > 0.0f)
|
||||
{
|
||||
float a = (PhysSize*1.45f - Distance);
|
||||
float Velocity = 0.5f;
|
||||
|
@ -332,7 +332,7 @@ void CCharacterCore::Tick(bool UseInput)
|
|||
}
|
||||
|
||||
// handle hook influence
|
||||
if(m_HookedPlayer == i)
|
||||
if(m_HookedPlayer == i && m_pWorld->m_Tuning.m_PlayerHooking)
|
||||
{
|
||||
if(Distance > PhysSize*1.50f) // TODO: fix tweakable variable
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue