Clang formatting
parent
ae1e52d1ab
commit
3c097a555b
|
@ -118,14 +118,14 @@ Body *Body::FromJson(const Json &jsonObj, Space *space)
|
|||
Ship *s = new Ship(jsonObj, space);
|
||||
// Here because of comments in Ship.cpp on following function
|
||||
s->UpdateLuaStats();
|
||||
return static_cast<Body*>(s);
|
||||
}
|
||||
return static_cast<Body *>(s);
|
||||
}
|
||||
case Object::PLAYER: {
|
||||
Player *p = new Player(jsonObj, space);
|
||||
// Read comments in Ship.cpp on following function
|
||||
p->UpdateLuaStats();
|
||||
return static_cast<Body*>(p);
|
||||
}
|
||||
return static_cast<Body *>(p);
|
||||
}
|
||||
case Object::MISSILE:
|
||||
return new Missile(jsonObj, space);
|
||||
case Object::PROJECTILE:
|
||||
|
|
|
@ -25,7 +25,8 @@ public:
|
|||
virtual bool OnCollision(Object *o, Uint32 flags, double relVel) override;
|
||||
virtual bool OnDamage(Object *attacker, float kgDamage, const CollisionContact &contactData) override;
|
||||
|
||||
~CargoBody() {};
|
||||
~CargoBody(){};
|
||||
|
||||
protected:
|
||||
virtual void SaveToJson(Json &jsonObj, Space *space) override;
|
||||
|
||||
|
|
|
@ -76,7 +76,6 @@ DynamicBody::DynamicBody(const Json &jsonObj, Space *space) :
|
|||
m_decelerating = false;
|
||||
for (int i = 0; i < Feature::MAX_FEATURE; i++)
|
||||
m_features[i] = false;
|
||||
|
||||
}
|
||||
|
||||
void DynamicBody::SaveToJson(Json &jsonObj, Space *space)
|
||||
|
|
|
@ -30,7 +30,6 @@ public:
|
|||
friend class ObjectViewerView;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
void InitParams(const SystemBody *);
|
||||
void GenerateRings(Graphics::Renderer *renderer);
|
||||
|
|
|
@ -108,7 +108,8 @@ void Projectile::FreeModel()
|
|||
s_glowVerts.reset();
|
||||
}
|
||||
|
||||
Projectile::Projectile(Body *parent, const ProjectileData &prData, const vector3d &pos, const vector3d &baseVel, const vector3d &dirVel) : Body()
|
||||
Projectile::Projectile(Body *parent, const ProjectileData &prData, const vector3d &pos, const vector3d &baseVel, const vector3d &dirVel) :
|
||||
Body()
|
||||
{
|
||||
if (!s_sideMat) BuildModel();
|
||||
m_flags |= FLAG_DRAW_LAST;
|
||||
|
@ -356,7 +357,8 @@ void Projectile::Render(Graphics::Renderer *renderer, const Camera *camera, cons
|
|||
}
|
||||
}
|
||||
|
||||
void Projectile::Add(Body *parent, float lifespan, float dam, float length, float width, bool mining, const Color &color, const vector3d &pos, const vector3d &baseVel, const vector3d &dirVel) {
|
||||
void Projectile::Add(Body *parent, float lifespan, float dam, float length, float width, bool mining, const Color &color, const vector3d &pos, const vector3d &baseVel, const vector3d &dirVel)
|
||||
{
|
||||
ProjectileData prData;
|
||||
prData.lifespan = lifespan;
|
||||
prData.damage = dam;
|
||||
|
|
|
@ -568,7 +568,7 @@ void Ship::UpdateLuaStats()
|
|||
int hyperclass = 0;
|
||||
p.Get<int>("hyperclass_cap", hyperclass);
|
||||
if (hyperclass) {
|
||||
std::tie(m_stats.hyperspace_range_max, m_stats.hyperspace_range) = \
|
||||
std::tie(m_stats.hyperspace_range_max, m_stats.hyperspace_range) =
|
||||
LuaObject<Ship>::CallMethod<double, double>(this, "GetHyperspaceRange");
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ class InternalCameraController;
|
|||
|
||||
class ShipCockpit : public ModelBody {
|
||||
public:
|
||||
|
||||
explicit ShipCockpit(const std::string &modelName);
|
||||
virtual ~ShipCockpit();
|
||||
|
||||
|
|
Loading…
Reference in New Issue