mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Scripting WIP
This commit is contained in:
parent
38944467d3
commit
75a0ca6bd6
14 changed files with 148 additions and 15 deletions
|
@ -135,6 +135,10 @@ ServerActiveObject* InventoryItem::createSAO(ServerEnvironment *env, u16 id, v3f
|
|||
/*
|
||||
Create an ItemSAO
|
||||
*/
|
||||
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 object
|
||||
ServerActiveObject *obj = new ItemSAO(env, pos, getItemString());
|
||||
return obj;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue