summaryrefslogtreecommitdiff
path: root/src/serverobject.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-04-10 16:20:31 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-04-10 16:20:31 +0300
commit7aa2d4d109cf8a92582a271d505f20a0f348f5a3 (patch)
tree265dc64c7c3abba94e0883907cacb03b0133fea4 /src/serverobject.cpp
parent1a32e5585f542a400c48e6befbbb0aade631e506 (diff)
downloadminetest-7aa2d4d109cf8a92582a271d505f20a0f348f5a3.tar.gz
minetest-7aa2d4d109cf8a92582a271d505f20a0f348f5a3.tar.bz2
minetest-7aa2d4d109cf8a92582a271d505f20a0f348f5a3.zip
new-style rats are now generated in the map
Diffstat (limited to 'src/serverobject.cpp')
-rw-r--r--src/serverobject.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/serverobject.cpp b/src/serverobject.cpp
index ce7259d67..3174b75a7 100644
--- a/src/serverobject.cpp
+++ b/src/serverobject.cpp
@@ -169,6 +169,7 @@ ServerActiveObject* ItemSAO::create(ServerEnvironment *env, u16 id, v3f pos,
void ItemSAO::step(float dtime, Queue<ActiveObjectMessage> &messages,
bool send_recommended)
{
+ assert(m_env);
core::aabbox3d<f32> box(-BS/3.,0.0,-BS/3., BS/3.,BS*2./3.,BS/3.);
collisionMoveResult moveresult;
// Apply gravity
@@ -300,17 +301,19 @@ ServerActiveObject* RatSAO::create(ServerEnvironment *env, u16 id, v3f pos,
void RatSAO::step(float dtime, Queue<ActiveObjectMessage> &messages,
bool send_recommended)
{
+ assert(m_env);
+
/*
The AI
*/
- m_age += dtime;
+ /*m_age += dtime;
if(m_age > 60)
{
// Die
m_removed = true;
return;
- }
+ }*/
// Apply gravity
m_speed_f.Y -= dtime*9.81*BS;