From 5669053de08bac9726902e96f89aa85b99909399 Mon Sep 17 00:00:00 2001 From: erihel Date: Sat, 27 Apr 2013 17:50:30 +0200 Subject: Some code refactoring Changed vehicule (french) to vehicle (english) in enums and variables --- src/object/motion/motionant.cpp | 2 +- src/object/motion/motionbee.cpp | 2 +- src/object/motion/motionhuman.cpp | 4 ++-- src/object/motion/motionmother.cpp | 2 +- src/object/motion/motionspider.cpp | 2 +- src/object/motion/motiontoto.cpp | 2 +- src/object/motion/motionvehicle.cpp | 2 +- src/object/motion/motionworm.cpp | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/object/motion') diff --git a/src/object/motion/motionant.cpp b/src/object/motion/motionant.cpp index 384d683..07e743f 100644 --- a/src/object/motion/motionant.cpp +++ b/src/object/motion/motionant.cpp @@ -75,7 +75,7 @@ bool CMotionAnt::Create(Math::Vector pos, float angle, ObjectType type, // Creates the main base. rank = m_engine->CreateObject(); - m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICULE); // this is a moving object + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); modelManager->AddModelReference("ant1.mod", false, rank); m_object->SetPosition(0, pos); diff --git a/src/object/motion/motionbee.cpp b/src/object/motion/motionbee.cpp index 8f69945..e4fdd49 100644 --- a/src/object/motion/motionbee.cpp +++ b/src/object/motion/motionbee.cpp @@ -73,7 +73,7 @@ bool CMotionBee::Create(Math::Vector pos, float angle, ObjectType type, // Creates main base. rank = m_engine->CreateObject(); - m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICULE); // this is a moving object + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); modelManager->AddModelReference("bee1.mod", false, rank); m_object->SetPosition(0, pos); diff --git a/src/object/motion/motionhuman.cpp b/src/object/motion/motionhuman.cpp index dc5ff34..76ff353 100644 --- a/src/object/motion/motionhuman.cpp +++ b/src/object/motion/motionhuman.cpp @@ -107,7 +107,7 @@ bool CMotionHuman::Create(Math::Vector pos, float angle, ObjectType type, if ( m_main->GetGamerOnlyHead() ) { rank = m_engine->CreateObject(); - m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICULE); // this is a moving object + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); face = m_main->GetGamerFace(); sprintf(filename, "human2h%d.mod", face+1); @@ -134,7 +134,7 @@ bool CMotionHuman::Create(Math::Vector pos, float angle, ObjectType type, // Creates the main base. rank = m_engine->CreateObject(); - m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICULE); // this is a moving object + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); if (option == 0) // head in helmet? diff --git a/src/object/motion/motionmother.cpp b/src/object/motion/motionmother.cpp index 573a2e4..c01dc66 100644 --- a/src/object/motion/motionmother.cpp +++ b/src/object/motion/motionmother.cpp @@ -74,7 +74,7 @@ bool CMotionMother::Create(Math::Vector pos, float angle, ObjectType type, // Creates main base. rank = m_engine->CreateObject(); - m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICULE); // this is a moving object + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); modelManager->AddModelReference("mother1.mod", false, rank); m_object->SetPosition(0, pos); diff --git a/src/object/motion/motionspider.cpp b/src/object/motion/motionspider.cpp index 59bc6e0..f76b65b 100644 --- a/src/object/motion/motionspider.cpp +++ b/src/object/motion/motionspider.cpp @@ -101,7 +101,7 @@ bool CMotionSpider::Create(Math::Vector pos, float angle, ObjectType type, // Creates the main base. rank = m_engine->CreateObject(); - m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICULE); // this is a moving object + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); // This is an "empty" object, without triangles m_object->SetPosition(0, pos); diff --git a/src/object/motion/motiontoto.cpp b/src/object/motion/motiontoto.cpp index ddb1867..de473a1 100644 --- a/src/object/motion/motiontoto.cpp +++ b/src/object/motion/motiontoto.cpp @@ -88,7 +88,7 @@ bool CMotionToto::Create(Math::Vector pos, float angle, ObjectType type, // Creates the head. rank = m_engine->CreateObject(); - m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICULE); // this is a moving object + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); modelManager->AddModelReference("toto1.mod", false, rank); m_object->SetPosition(0, pos); diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index 44b8fdd..88f7b99 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -102,7 +102,7 @@ bool CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, // Creates the main base. rank = m_engine->CreateObject(); - m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICULE); // this is a moving object + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); if (type == OBJECT_MOBILEfa || diff --git a/src/object/motion/motionworm.cpp b/src/object/motion/motionworm.cpp index ee555a8..d153178 100644 --- a/src/object/motion/motionworm.cpp +++ b/src/object/motion/motionworm.cpp @@ -89,7 +89,7 @@ bool CMotionWorm::Create(Math::Vector pos, float angle, ObjectType type, // Creates the main base. rank = m_engine->CreateObject(); - m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICULE); // this is a moving object + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); // This is an "empty" object, without triangles m_object->SetPosition(0, pos); -- cgit v1.2.3-1-g7c22 From 5fd64624d34e9332b726ecaffecbcbd6686a7d2e Mon Sep 17 00:00:00 2001 From: krzys-h Date: Sun, 28 Apr 2013 20:24:46 +0200 Subject: Fix for game crashing sometimes when using MissionController --- src/object/motion/motiondummy.cpp | 62 +++++++++++++++++++++++++++++++++++++++ src/object/motion/motiondummy.h | 32 ++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 src/object/motion/motiondummy.cpp create mode 100644 src/object/motion/motiondummy.h (limited to 'src/object/motion') diff --git a/src/object/motion/motiondummy.cpp b/src/object/motion/motiondummy.cpp new file mode 100644 index 0000000..68827ff --- /dev/null +++ b/src/object/motion/motiondummy.cpp @@ -0,0 +1,62 @@ +// * This file is part of the COLOBOT source code +// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * +// * This program is free software: you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation, either version 3 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program. If not, see http://www.gnu.org/licenses/. + + +#include "object/motion/motiondummy.h" + +#include "graphics/engine/modelmanager.h" + +#include +#include + + + + + +// Object's constructor. + +CMotionDummy::CMotionDummy(CObject* object) : CMotion(object) +{ +} + +// Object's destructor. + +CMotionDummy::~CMotionDummy() +{ +} + + +// Removes an object. + +void CMotionDummy::DeleteObject(bool bAll) +{ +} + + +// Creates a Dummy traveling any lands on the ground. + +bool CMotionDummy::Create(Math::Vector pos, float angle, ObjectType type, + float power) +{ + m_object->SetType(type); + + // Creates the main base. + int rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICULE); // this is a moving object + m_object->SetObjectRank(0, rank); + + return true; +} \ No newline at end of file diff --git a/src/object/motion/motiondummy.h b/src/object/motion/motiondummy.h new file mode 100644 index 0000000..744df2f --- /dev/null +++ b/src/object/motion/motiondummy.h @@ -0,0 +1,32 @@ +// * This file is part of the COLOBOT source code +// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * +// * This program is free software: you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation, either version 3 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program. If not, see http://www.gnu.org/licenses/. + +// motiondummy.h + +#pragma once + + +#include "object/motion/motion.h" + +class CMotionDummy : public CMotion +{ +public: + CMotionDummy(CObject* object); + ~CMotionDummy(); + + void DeleteObject(bool bAll=false); + bool Create(Math::Vector pos, float angle, ObjectType type, float power); +}; \ No newline at end of file -- cgit v1.2.3-1-g7c22 From 658ebe015f98b8f11f8d46110b5e089323f7d8cb Mon Sep 17 00:00:00 2001 From: XienDev Date: Mon, 29 Apr 2013 13:51:37 +0300 Subject: Fix for shadows (bugs #176 and #132) --- src/object/motion/motionvehicle.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/object/motion') diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index 44b8fdd..2eed83e 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -931,6 +931,7 @@ bool CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, rank = m_engine->CreateObject(); m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_FIX); pPower->SetObjectRank(0, rank); + pPower->CreateShadowCircle(1.5f, 1.0f); //create a shadow for battary if ( power <= 1.0f ) modelManager->AddModelCopy("power.mod", false, rank); else modelManager->AddModelCopy("atomic.mod", false, rank); -- cgit v1.2.3-1-g7c22 From 2ba146cd63cefd58f5ff464b5b94e43740cf0700 Mon Sep 17 00:00:00 2001 From: erihel Date: Mon, 29 Apr 2013 14:29:12 +0200 Subject: Fixed problem with test compilation Altered test cmake files to fix linker problem. Changed tga to png in pyro. Changed enum in CMotionDummy. --- src/object/motion/motiondummy.cpp | 5 +++-- src/object/motion/motiondummy.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/object/motion') diff --git a/src/object/motion/motiondummy.cpp b/src/object/motion/motiondummy.cpp index 68827ff..577ff47 100644 --- a/src/object/motion/motiondummy.cpp +++ b/src/object/motion/motiondummy.cpp @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2013 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -55,8 +56,8 @@ bool CMotionDummy::Create(Math::Vector pos, float angle, ObjectType type, // Creates the main base. int rank = m_engine->CreateObject(); - m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICULE); // this is a moving object + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); return true; -} \ No newline at end of file +} diff --git a/src/object/motion/motiondummy.h b/src/object/motion/motiondummy.h index 744df2f..de29148 100644 --- a/src/object/motion/motiondummy.h +++ b/src/object/motion/motiondummy.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2013 Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -29,4 +30,4 @@ public: void DeleteObject(bool bAll=false); bool Create(Math::Vector pos, float angle, ObjectType type, float power); -}; \ No newline at end of file +}; -- cgit v1.2.3-1-g7c22 From 75950c55ba2065e792dc573adbaa31897cbc113a Mon Sep 17 00:00:00 2001 From: krzys-h Date: Mon, 29 Apr 2013 17:26:32 +0200 Subject: MissionController improved --- src/object/motion/motiondummy.cpp | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'src/object/motion') diff --git a/src/object/motion/motiondummy.cpp b/src/object/motion/motiondummy.cpp index 577ff47..5b35cc4 100644 --- a/src/object/motion/motiondummy.cpp +++ b/src/object/motion/motiondummy.cpp @@ -17,16 +17,12 @@ #include "object/motion/motiondummy.h" - +#include "physics/physics.h" #include "graphics/engine/modelmanager.h" #include #include - - - - // Object's constructor. CMotionDummy::CMotionDummy(CObject* object) : CMotion(object) @@ -59,5 +55,30 @@ bool CMotionDummy::Create(Math::Vector pos, float angle, ObjectType type, m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); + // Movement + m_physics->SetType(TYPE_FLYING); + + m_physics->SetLinMotionX(MO_ADVSPEED, 50.0f); + m_physics->SetLinMotionX(MO_RECSPEED, 50.0f); + m_physics->SetLinMotionX(MO_ADVACCEL, 20.0f); + m_physics->SetLinMotionX(MO_RECACCEL, 20.0f); + m_physics->SetLinMotionX(MO_STOACCEL, 20.0f); + m_physics->SetLinMotionX(MO_TERSLIDE, 5.0f); + m_physics->SetLinMotionZ(MO_TERSLIDE, 5.0f); + m_physics->SetLinMotionX(MO_TERFORCE, 50.0f); + m_physics->SetLinMotionZ(MO_TERFORCE, 50.0f); + m_physics->SetLinMotionZ(MO_MOTACCEL, 40.0f); + m_physics->SetLinMotionY(MO_ADVSPEED, 60.0f); + m_physics->SetLinMotionY(MO_RECSPEED, 60.0f); + m_physics->SetLinMotionY(MO_ADVACCEL, 20.0f); + m_physics->SetLinMotionY(MO_RECACCEL, 50.0f); + m_physics->SetLinMotionY(MO_STOACCEL, 50.0f); + + m_physics->SetCirMotionY(MO_ADVSPEED, 0.4f*Math::PI); + m_physics->SetCirMotionY(MO_RECSPEED, 0.4f*Math::PI); + m_physics->SetCirMotionY(MO_ADVACCEL, 2.0f); + m_physics->SetCirMotionY(MO_RECACCEL, 2.0f); + m_physics->SetCirMotionY(MO_STOACCEL, 2.0f); + return true; -} +} \ No newline at end of file -- cgit v1.2.3-1-g7c22 From 9e1870f6bdb24e278c06929b8bd13225a7fdf8d3 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 1 May 2013 13:19:10 +0200 Subject: Removed some warnings + fix for previous commit --- src/object/motion/motionant.cpp | 2 +- src/object/motion/motionbee.cpp | 2 +- src/object/motion/motionhuman.cpp | 2 +- src/object/motion/motionspider.cpp | 2 +- src/object/motion/motionvehicle.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/object/motion') diff --git a/src/object/motion/motionant.cpp b/src/object/motion/motionant.cpp index 07e743f..3eabc0e 100644 --- a/src/object/motion/motionant.cpp +++ b/src/object/motion/motionant.cpp @@ -425,7 +425,7 @@ bool CMotionAnt::EventFrame(const Event &event) { Math::Vector dir, pos, speed; Math::Point dim; - float s, a, prog, time; + float s, a, prog = 0.0f, time; float tSt[9], tNd[9]; int i, ii, st, nd, action; bool bStop; diff --git a/src/object/motion/motionbee.cpp b/src/object/motion/motionbee.cpp index e4fdd49..a0f4734 100644 --- a/src/object/motion/motionbee.cpp +++ b/src/object/motion/motionbee.cpp @@ -406,7 +406,7 @@ bool CMotionBee::EventProcess(const Event &event) bool CMotionBee::EventFrame(const Event &event) { Math::Vector dir; - float s, a, prog; + float s, a, prog = 0.0f; int action, i, st, nd; bool bStop; diff --git a/src/object/motion/motionhuman.cpp b/src/object/motion/motionhuman.cpp index 76ff353..c469a7e 100644 --- a/src/object/motion/motionhuman.cpp +++ b/src/object/motion/motionhuman.cpp @@ -677,7 +677,7 @@ bool CMotionHuman::EventFrame(const Event &event) float s, a, prog, rTime[2], lTime[2], time, rot, hr, hl; float al, ar, af; float tSt[9], tNd[9]; - float aa, bb, shield, deadFactor, level; + float aa, bb, shield, deadFactor = 0.0f, level; int i, ii, st, nd, action, legAction, armAction; bool bOnBoard, bSwim; diff --git a/src/object/motion/motionspider.cpp b/src/object/motion/motionspider.cpp index f76b65b..a9a9b9b 100644 --- a/src/object/motion/motionspider.cpp +++ b/src/object/motion/motionspider.cpp @@ -363,7 +363,7 @@ bool CMotionSpider::EventFrame(const Event &event) { Math::Vector dir, pos, speed; Math::Point dim; - float s, a, prog, time; + float s, a, prog = 0.0f, time; float tSt[12], tNd[12]; int i, ii, st, nd, action; bool bStop; diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index d65809e..966fe75 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -1650,7 +1650,7 @@ bool CMotionVehicle::EventFrameFly(const Event &event) bool CMotionVehicle::EventFrameInsect(const Event &event) { Math::Vector dir; - float s, a, prog, time; + float s, a, prog = 0.0f, time; int i, st, nd, action; bool bStop, bOnBoard; -- cgit v1.2.3-1-g7c22 From 1250f889d95b8e710f80d374e6b23f02bd76f617 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 2 May 2013 20:59:20 +0200 Subject: Improved MissionController movement a little bit --- src/object/motion/motiondummy.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/object/motion') diff --git a/src/object/motion/motiondummy.cpp b/src/object/motion/motiondummy.cpp index 5b35cc4..f25b81b 100644 --- a/src/object/motion/motiondummy.cpp +++ b/src/object/motion/motiondummy.cpp @@ -63,10 +63,10 @@ bool CMotionDummy::Create(Math::Vector pos, float angle, ObjectType type, m_physics->SetLinMotionX(MO_ADVACCEL, 20.0f); m_physics->SetLinMotionX(MO_RECACCEL, 20.0f); m_physics->SetLinMotionX(MO_STOACCEL, 20.0f); - m_physics->SetLinMotionX(MO_TERSLIDE, 5.0f); - m_physics->SetLinMotionZ(MO_TERSLIDE, 5.0f); - m_physics->SetLinMotionX(MO_TERFORCE, 50.0f); - m_physics->SetLinMotionZ(MO_TERFORCE, 50.0f); + m_physics->SetLinMotionX(MO_TERSLIDE, 0.0f); + m_physics->SetLinMotionZ(MO_TERSLIDE, 0.0f); + m_physics->SetLinMotionX(MO_TERFORCE, 0.0f); + m_physics->SetLinMotionZ(MO_TERFORCE, 0.0f); m_physics->SetLinMotionZ(MO_MOTACCEL, 40.0f); m_physics->SetLinMotionY(MO_ADVSPEED, 60.0f); m_physics->SetLinMotionY(MO_RECSPEED, 60.0f); -- cgit v1.2.3-1-g7c22 From 8765d58b02c9afd00186bae4a0045dff32f7d102 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 26 May 2013 17:47:54 +0200 Subject: Fixed code formatting * moved braces to new lines * fixed some function/variable names * fixed whitespace issues --- src/object/motion/motionant.cpp | 1 - src/object/motion/motionbee.cpp | 1 - src/object/motion/motiondummy.cpp | 3 ++- src/object/motion/motiondummy.h | 1 + src/object/motion/motionhuman.cpp | 1 - src/object/motion/motionmother.cpp | 1 - src/object/motion/motionspider.cpp | 1 - src/object/motion/motiontoto.cpp | 1 - src/object/motion/motionvehicle.cpp | 1 - src/object/motion/motionworm.cpp | 3 +-- 10 files changed, 4 insertions(+), 10 deletions(-) (limited to 'src/object/motion') diff --git a/src/object/motion/motionant.cpp b/src/object/motion/motionant.cpp index 3eabc0e..16e53aa 100644 --- a/src/object/motion/motionant.cpp +++ b/src/object/motion/motionant.cpp @@ -831,4 +831,3 @@ bool CMotionAnt::EventFrame(const Event &event) return true; } - diff --git a/src/object/motion/motionbee.cpp b/src/object/motion/motionbee.cpp index a0f4734..2a052b2 100644 --- a/src/object/motion/motionbee.cpp +++ b/src/object/motion/motionbee.cpp @@ -610,4 +610,3 @@ bool CMotionBee::EventFrame(const Event &event) return true; } - diff --git a/src/object/motion/motiondummy.cpp b/src/object/motion/motiondummy.cpp index f25b81b..86e389e 100644 --- a/src/object/motion/motiondummy.cpp +++ b/src/object/motion/motiondummy.cpp @@ -81,4 +81,5 @@ bool CMotionDummy::Create(Math::Vector pos, float angle, ObjectType type, m_physics->SetCirMotionY(MO_STOACCEL, 2.0f); return true; -} \ No newline at end of file +} + diff --git a/src/object/motion/motiondummy.h b/src/object/motion/motiondummy.h index de29148..2cb3a88 100644 --- a/src/object/motion/motiondummy.h +++ b/src/object/motion/motiondummy.h @@ -31,3 +31,4 @@ public: void DeleteObject(bool bAll=false); bool Create(Math::Vector pos, float angle, ObjectType type, float power); }; + diff --git a/src/object/motion/motionhuman.cpp b/src/object/motion/motionhuman.cpp index c469a7e..b1de44e 100644 --- a/src/object/motion/motionhuman.cpp +++ b/src/object/motion/motionhuman.cpp @@ -1735,4 +1735,3 @@ void CMotionHuman::StopDisplayPerso() m_bDisplayPerso = false; } - diff --git a/src/object/motion/motionmother.cpp b/src/object/motion/motionmother.cpp index c01dc66..03e7c21 100644 --- a/src/object/motion/motionmother.cpp +++ b/src/object/motion/motionmother.cpp @@ -493,4 +493,3 @@ bool CMotionMother::EventFrame(const Event &event) return true; } - diff --git a/src/object/motion/motionspider.cpp b/src/object/motion/motionspider.cpp index a9a9b9b..8d339b6 100644 --- a/src/object/motion/motionspider.cpp +++ b/src/object/motion/motionspider.cpp @@ -743,4 +743,3 @@ bool CMotionSpider::EventFrame(const Event &event) return true; } - diff --git a/src/object/motion/motiontoto.cpp b/src/object/motion/motiontoto.cpp index de473a1..b4ed89d 100644 --- a/src/object/motion/motiontoto.cpp +++ b/src/object/motion/motiontoto.cpp @@ -853,4 +853,3 @@ void CMotionToto::SetLinkType(ObjectType type) m_type = type; } - diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index 966fe75..a67ae24 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -1944,4 +1944,3 @@ void CMotionVehicle::SetTraceWidth(float width) m_traceWidth = width; } - diff --git a/src/object/motion/motionworm.cpp b/src/object/motion/motionworm.cpp index d153178..80bf7fc 100644 --- a/src/object/motion/motionworm.cpp +++ b/src/object/motion/motionworm.cpp @@ -91,7 +91,7 @@ bool CMotionWorm::Create(Math::Vector pos, float angle, ObjectType type, rank = m_engine->CreateObject(); m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); - // This is an "empty" object, without triangles + // This is an "empty" object, without triangles m_object->SetPosition(0, pos); m_object->SetAngleY(0, angle); @@ -356,4 +356,3 @@ bool CMotionWorm::EventFrame(const Event &event) return true; } - -- cgit v1.2.3-1-g7c22 From b22d852b4c4aa89e0394397a703ecfa442b0a928 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Mon, 27 May 2013 22:26:44 +0200 Subject: Fixed variable shadowing warnings * fixed -Wshadow warnings * refactored some constructors --- src/object/motion/motionhuman.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/object/motion') diff --git a/src/object/motion/motionhuman.cpp b/src/object/motion/motionhuman.cpp index b1de44e..edee260 100644 --- a/src/object/motion/motionhuman.cpp +++ b/src/object/motion/motionhuman.cpp @@ -1617,18 +1617,18 @@ bool CMotionHuman::EventFrame(const Event &event) legAction == MH_MARCHTAKE ) { Sound sound[2]; - float speed, synchro, volume[2], freq[2], hard, level; + float synchro, volume[2], freq[2], hard; - speed = m_physics->GetLinMotionX(MO_REASPEED); + float speedX = m_physics->GetLinMotionX(MO_REASPEED); if ( m_object->GetFret() == 0 ) { - if ( speed > 0.0f ) synchro = 0.21f; // synchro forward + if ( speedX > 0.0f ) synchro = 0.21f; // synchro forward else synchro = 0.29f; // synchro backward } else { - if ( speed > 0.0f ) synchro = 0.15f; // synchro forward + if ( speedX > 0.0f ) synchro = 0.15f; // synchro forward else synchro = 0.35f; // synchro backward } time = rTime[1]+synchro; -- cgit v1.2.3-1-g7c22