Skip to content

Commit 85511a6

Browse files
authoredAug 16, 2017
Cleanup various headers to reduce compilation times (#6255)
* Cleanup various headers to reduce compilation times
1 parent 816bca3 commit 85511a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+94
-84
lines changed
 

‎src/ban.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
3030
class BanManager
3131
{
3232
public:
33-
BanManager(const std::string &bannfilepath);
33+
BanManager(const std::string &banfilepath);
3434
~BanManager();
3535
void load();
3636
void save();

‎src/camera.cpp

+9-10
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,7 @@ void Camera::addArmInertia(f32 player_yaw)
283283
}
284284
}
285285

286-
void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime,
287-
f32 tool_reload_ratio, ClientEnvironment &c_env)
286+
void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, f32 tool_reload_ratio)
288287
{
289288
// Get player position
290289
// Smooth the movement when walking up stairs
@@ -408,19 +407,19 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime,
408407

409408
// Calculate new position
410409
bool abort = false;
411-
for (int i = BS; i <= BS*2.75; i++)
412-
{
413-
my_cp.X = m_camera_position.X + m_camera_direction.X*-i;
414-
my_cp.Z = m_camera_position.Z + m_camera_direction.Z*-i;
410+
for (int i = BS; i <= BS * 2.75; i++) {
411+
my_cp.X = m_camera_position.X + m_camera_direction.X * -i;
412+
my_cp.Z = m_camera_position.Z + m_camera_direction.Z * -i;
415413
if (i > 12)
416-
my_cp.Y = m_camera_position.Y + (m_camera_direction.Y*-i);
414+
my_cp.Y = m_camera_position.Y + (m_camera_direction.Y * -i);
417415

418416
// Prevent camera positioned inside nodes
419417
INodeDefManager *nodemgr = m_client->ndef();
420-
MapNode n = c_env.getClientMap().getNodeNoEx(floatToInt(my_cp, BS));
418+
MapNode n = m_client->getEnv().getClientMap()
419+
.getNodeNoEx(floatToInt(my_cp, BS));
420+
421421
const ContentFeatures& features = nodemgr->get(n);
422-
if(features.walkable)
423-
{
422+
if (features.walkable) {
424423
my_cp.X += m_camera_direction.X*-1*-BS/2;
425424
my_cp.Z += m_camera_direction.Z*-1*-BS/2;
426425
my_cp.Y += m_camera_direction.Y*-1*-BS/2;

0 commit comments

Comments
 (0)
Please sign in to comment.