mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
fix node timers so on_timer gets the correct position
This commit is contained in:
parent
a9a475ad50
commit
d05e3adbc7
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue