// Copy parent position if local player is attached
if (getParent()) {
setPosition(m_cao->getPosition());
- added_velocity = v3f(0.0f); // ignored
+ m_added_velocity = v3f(0.0f); // ignored
return;
}
setPosition(position);
touching_ground = false;
- added_velocity = v3f(0.0f); // ignored
+ m_added_velocity = v3f(0.0f); // ignored
return;
}
- m_speed += added_velocity;
- added_velocity = v3f(0.0f);
+ m_speed += m_added_velocity;
+ m_added_velocity = v3f(0.0f);
/*
Collision detection
if (getParent()) {
setPosition(m_cao->getPosition());
m_sneak_node_exists = false;
- added_velocity = v3f(0.0f);
+ m_added_velocity = v3f(0.0f);
return;
}
touching_ground = false;
m_sneak_node_exists = false;
- added_velocity = v3f(0.0f);
+ m_added_velocity = v3f(0.0f);
return;
}
- m_speed += added_velocity;
- added_velocity = v3f(0.0f);
+ m_speed += m_added_velocity;
+ m_added_velocity = v3f(0.0f);
/*
Collision detection
inline void addVelocity(const v3f &vel)
{
- added_velocity += vel;
+ m_added_velocity += vel;
}
inline Lighting& getLighting() { return m_lighting; }
bool m_autojump = false;
float m_autojump_time = 0.0f;
- v3f added_velocity = v3f(0.0f); // cleared on each move()
- // TODO: Rename to adhere to convention: added_velocity --> m_added_velocity
+ v3f m_added_velocity = v3f(0.0f); // in BS-space; cleared on each move()
GenericCAO *m_cao = nullptr;
Client *m_client;