diff options
author | darkrose <lisa@ltmnet.com> | 2012-08-10 12:34:02 +1000 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-08-12 15:28:31 +0300 |
commit | d05e3adbc7fe912319a14d5c164941017f2c7170 (patch) | |
tree | 1bf36560d9b27d9de3319b53092079864281ef6e /src | |
parent | a9a475ad50ae93c253e0d1eda1f71a42dbc20298 (diff) | |
download | minetest-d05e3adbc7fe912319a14d5c164941017f2c7170.tar.gz minetest-d05e3adbc7fe912319a14d5c164941017f2c7170.tar.bz2 minetest-d05e3adbc7fe912319a14d5c164941017f2c7170.zip |
fix node timers so on_timer gets the correct position
Diffstat (limited to 'src')
-rw-r--r-- | src/environment.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/environment.cpp b/src/environment.cpp index e3e621065..b88f55dea 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -1087,7 +1087,8 @@ void ServerEnvironment::step(float dtime) i = elapsed_timers.begin(); i != elapsed_timers.end(); i++){ n = block->getNodeNoEx(i->first); - if(scriptapi_node_on_timer(m_lua,i->first,n,i->second.elapsed)) + p = i->first + block->getPosRelative(); + if(scriptapi_node_on_timer(m_lua,p,n,i->second.elapsed)) block->setNodeTimer(i->first,NodeTimer(i->second.timeout,0)); } } |