mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
items now fall by gravity... also some other random updating
This commit is contained in:
parent
fd7a0735c9
commit
08bbf96877
9 changed files with 147 additions and 46 deletions
|
@ -2436,12 +2436,17 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
return;
|
||||
}
|
||||
|
||||
v3f pos = intToFloat(p_over, BS);
|
||||
pos.Y -= BS*0.45;
|
||||
|
||||
dout_server<<"Placing a miscellaneous item on map"
|
||||
<<std::endl;
|
||||
|
||||
|
||||
// Calculate a position for it
|
||||
v3f pos = intToFloat(p_over, BS);
|
||||
//pos.Y -= BS*0.45;
|
||||
pos.Y -= BS*0.25; // let it drop a bit
|
||||
// Randomize a bit
|
||||
pos.X += BS*0.2*(float)myrand_range(-1000,1000)/1000.0;
|
||||
pos.Z += BS*0.2*(float)myrand_range(-1000,1000)/1000.0;
|
||||
|
||||
/*
|
||||
Create an ItemSAO
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue