mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 01:05:48 +01:00 
			
		
		
		
	fix node timers so on_timer gets the correct position
This commit is contained in:
		@@ -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));
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user