mirror of
https://github.com/moparisthebest/minetest
synced 2024-11-17 14:55:13 -05:00
fix node timers so on_timer gets the correct position
This commit is contained in:
parent
a9a475ad50
commit
d05e3adbc7
@ -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));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user