projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9a475a
)
fix node timers so on_timer gets the correct position
author
darkrose
<lisa@ltmnet.com>
Fri, 10 Aug 2012 02:34:02 +0000
(12:34 +1000)
committer
Perttu Ahola
<celeron55@gmail.com>
Sun, 12 Aug 2012 12:28:31 +0000
(15:28 +0300)
src/environment.cpp
patch
|
blob
|
history
diff --git
a/src/environment.cpp
b/src/environment.cpp
index e3e6210650d9bf786b62a637eee17f50d277e7c9..b88f55dead838a51b25f3c0a89c50fad8e9ddde7 100644
(file)
--- 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));
}
}