}
}
+void ItemSAO::rightClick(Player *player)
+{
+ dstream<<__FUNCTION_NAME<<std::endl;
+ InventoryItem *item = createInventoryItem();
+ if(item == NULL)
+ return;
+
+ bool to_be_deleted = item->use(m_env, player);
+
+ if(to_be_deleted)
+ m_removed = true;
+ else
+ // Reflect changes to the item here
+ m_inventorystring = item->getItemString();
+
+ delete item;
+}
/*
RatSAO
m_oldpos = v3f(0,0,0);
m_last_sent_position = v3f(0,0,0);
- m_yaw = 0;
+ m_yaw = myrand_range(0,PI*2);
m_counter1 = 0;
m_counter2 = 0;
m_age = 0;
Move it, with collision detection
*/
- core::aabbox3d<f32> box(-BS/3.,0.0,-BS/3., BS/3.,BS*2./3.,BS/3.);
+ core::aabbox3d<f32> box(-BS/3.,-BS*2/3.0,-BS/3., BS/3.,BS*4./3.,BS/3.);
collisionMoveResult moveresult;
// Maximum movement without glitches
f32 pos_max_d = BS*0.25;