Remove unused field "material" from CObject class in CBot

master
Piotr Dziwinski 2015-06-24 23:25:02 +02:00
parent 37e2f24fbc
commit 7814c0c7bd
3 changed files with 412 additions and 461 deletions

View File

@ -90,7 +90,6 @@ void uObject(CBotVar* botThis, void* user)
ObjectType type;
Math::Vector pos;
float value;
int iValue;
if ( object == 0 ) return;
@ -161,11 +160,6 @@ void uObject(CBotVar* botThis, void* user)
value = object->GetAbsTime();
pVar->SetValFloat(value);
// Updates the material of the object.
pVar = pVar->GetNext(); // "material"
iValue = object->GetMaterial();
pVar->SetValInt(iValue);
// Updates the type of battery.
pVar = pVar->GetNext(); // "energyCell"
power = object->GetPower();
@ -2829,25 +2823,6 @@ float CObject::GetTransparency()
}
// Management of the object matter.
ObjectMaterial CObject::GetMaterial()
{
if ( m_type == OBJECT_HUMAN )
{
return OM_HUMAN;
}
if ( m_type == OBJECT_SCRAP4 ||
m_type == OBJECT_SCRAP5 )
{
return OM_HUMAN;
}
return OM_METAL;
}
// Indicates whether the gadget is a nonessential.
void CObject::SetGadget(bool bMode)

View File

@ -53,17 +53,6 @@ const int OBJECTMAXDESELLIST = 10;
const int OBJECTMAXINFO = 10;
const int OBJECTMAXCMDLINE = 20;
enum ObjectMaterial
{
OM_METAL = 0, // metal
OM_PLASTIC = 1, // plastic
OM_HUMAN = 2, // cosmonaut
OM_ANIMAL = 3, // insect
OM_VEGETAL = 4, // plant
OM_MINERAL = 5, // stone
};
enum DriveType
{
DRIVE_OTHER = 0,
@ -305,8 +294,6 @@ public:
void SetTransparency(float value);
float GetTransparency();
ObjectMaterial GetMaterial();
void SetGadget(bool bMode);
bool GetGadget();
@ -476,7 +463,6 @@ protected:
float m_shield; // shield
float m_range; // flight range
float m_transparency; // transparency (0..1)
int m_material; // matter(0..n)
float m_aTime;
float m_shotTime; // time since last shot
bool m_bVirusMode; // virus activated/triggered

File diff suppressed because it is too large Load Diff