@@ -142,12 +142,12 @@ class TestCAO : public ClientActiveObject
142
142
public:
143
143
TestCAO (IGameDef *gamedef, ClientEnvironment *env);
144
144
virtual ~TestCAO ();
145
-
145
+
146
146
ActiveObjectType getType () const
147
147
{
148
148
return ACTIVEOBJECT_TYPE_TEST;
149
149
}
150
-
150
+
151
151
static ClientActiveObject* create (IGameDef *gamedef, ClientEnvironment *env);
152
152
153
153
void addToScene (scene::ISceneManager *smgr, ITextureSource *tsrc,
@@ -192,9 +192,9 @@ void TestCAO::addToScene(scene::ISceneManager *smgr, ITextureSource *tsrc,
192
192
{
193
193
if (m_node != NULL )
194
194
return ;
195
-
195
+
196
196
// video::IVideoDriver* driver = smgr->getVideoDriver();
197
-
197
+
198
198
scene::SMesh *mesh = new scene::SMesh ();
199
199
scene::IMeshBuffer *buf = new scene::SMeshBuffer ();
200
200
video::SColor c (255 ,255 ,255 ,255 );
@@ -286,12 +286,12 @@ class ItemCAO : public ClientActiveObject
286
286
public:
287
287
ItemCAO (IGameDef *gamedef, ClientEnvironment *env);
288
288
virtual ~ItemCAO ();
289
-
289
+
290
290
ActiveObjectType getType () const
291
291
{
292
292
return ACTIVEOBJECT_TYPE_ITEM;
293
293
}
294
-
294
+
295
295
static ClientActiveObject* create (IGameDef *gamedef, ClientEnvironment *env);
296
296
297
297
void addToScene (scene::ISceneManager *smgr, ITextureSource *tsrc,
@@ -308,12 +308,12 @@ class ItemCAO : public ClientActiveObject
308
308
void processMessage (const std::string &data);
309
309
310
310
void initialize (const std::string &data);
311
-
311
+
312
312
core::aabbox3d<f32>* getSelectionBox ()
313
313
{return &m_selection_box;}
314
314
v3f getPosition ()
315
315
{return m_position;}
316
-
316
+
317
317
std::string infoText ()
318
318
{return m_infotext;}
319
319
@@ -357,9 +357,9 @@ void ItemCAO::addToScene(scene::ISceneManager *smgr, ITextureSource *tsrc,
357
357
{
358
358
if (m_node != NULL )
359
359
return ;
360
-
360
+
361
361
// video::IVideoDriver* driver = smgr->getVideoDriver();
362
-
362
+
363
363
scene::SMesh *mesh = new scene::SMesh ();
364
364
scene::IMeshBuffer *buf = new scene::SMeshBuffer ();
365
365
video::SColor c (255 ,255 ,255 ,255 );
@@ -469,7 +469,7 @@ void ItemCAO::updateTexture()
469
469
<<" : error deSerializing itemstring \" "
470
470
<<m_itemstring<<std::endl;
471
471
}
472
-
472
+
473
473
// Set meshbuffer texture
474
474
m_node->getMaterial (0 ).setTexture (0 , texture);
475
475
}
@@ -514,7 +514,7 @@ void ItemCAO::processMessage(const std::string &data)
514
514
void ItemCAO::initialize (const std::string &data)
515
515
{
516
516
infostream<<" ItemCAO: Got init data" <<std::endl;
517
-
517
+
518
518
{
519
519
std::istringstream is (data, std::ios::binary);
520
520
// version
@@ -527,7 +527,7 @@ void ItemCAO::initialize(const std::string &data)
527
527
// itemstring
528
528
m_itemstring = deSerializeString (is);
529
529
}
530
-
530
+
531
531
updateNodePos ();
532
532
updateInfoText ();
533
533
}
@@ -748,7 +748,7 @@ ClientActiveObject* GenericCAO::getParent()
748
748
void GenericCAO::removeFromScene (bool permanent)
749
749
{
750
750
// Should be true when removing the object permanently and false when refreshing (eg: updating visuals)
751
- if ((m_env != NULL ) && (permanent))
751
+ if ((m_env != NULL ) && (permanent))
752
752
{
753
753
for (std::vector<u16>::iterator ci = m_children.begin ();
754
754
ci != m_children.end (); ci++)
@@ -759,7 +759,7 @@ void GenericCAO::removeFromScene(bool permanent)
759
759
}
760
760
761
761
m_env->m_attachements [getId ()] = 0 ;
762
-
762
+
763
763
LocalPlayer* player = m_env->getLocalPlayer ();
764
764
if (this == player->parent ) {
765
765
player->parent = NULL ;
@@ -898,7 +898,7 @@ void GenericCAO::addToScene(scene::ISceneManager *smgr, ITextureSource *tsrc,
898
898
m_meshnode = smgr->addMeshSceneNode (mesh, NULL );
899
899
m_meshnode->grab ();
900
900
mesh->drop ();
901
-
901
+
902
902
m_meshnode->setScale (v3f (m_prop.visual_size .X ,
903
903
m_prop.visual_size .Y ,
904
904
m_prop.visual_size .X ));
@@ -1014,7 +1014,7 @@ void GenericCAO::updateNodePos()
1014
1014
}
1015
1015
}
1016
1016
}
1017
-
1017
+
1018
1018
void GenericCAO::step (float dtime, ClientEnvironment *env)
1019
1019
{
1020
1020
// Handel model of local player instantly to prevent lags
@@ -1485,7 +1485,7 @@ void GenericCAO::updateBonePosition()
1485
1485
}
1486
1486
}
1487
1487
}
1488
-
1488
+
1489
1489
void GenericCAO::updateAttachments ()
1490
1490
{
1491
1491
@@ -1716,14 +1716,14 @@ void GenericCAO::processMessage(const std::string &data)
1716
1716
m_armor_groups[name] = rating;
1717
1717
}
1718
1718
} else if (cmd == GENERIC_CMD_UPDATE_NAMETAG_ATTRIBUTES) {
1719
- u8 version = readU8 (is); // forward compatibility
1719
+ // u8 version = readU8(is); // forward compatibility
1720
1720
m_nametag_color = readARGB8 (is);
1721
1721
if (m_textnode != NULL ) {
1722
1722
m_textnode->setTextColor (m_nametag_color);
1723
1723
}
1724
1724
}
1725
1725
}
1726
-
1726
+
1727
1727
/* \pre punchitem != NULL
1728
1728
*/
1729
1729
bool GenericCAO::directReportPunch (v3f dir, const ItemStack *punchitem,
0 commit comments