Skip to content

Commit

Permalink
Update LuaSyncedCtrl.cpp
Browse files Browse the repository at this point in the history
lua addgrass
  • Loading branch information
Beherith authored Apr 21, 2021
1 parent 4eedb47 commit e9d73da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rts/Lua/LuaSyncedCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2845,8 +2845,9 @@ int LuaSyncedCtrl::RemoveObjectDecal(lua_State* L)
int LuaSyncedCtrl::AddGrass(lua_State* L)
{
const float3 pos(luaL_checkfloat(L, 1), 0.0f, luaL_checkfloat(L, 2));

grassDrawer->AddGrass(pos.cClampInBounds());
int grassValue = luaL_optint(L, 3, 1);

grassDrawer->AddGrass(pos.cClampInBounds(), grassValue);
return 0;
}

Expand Down

0 comments on commit e9d73da

Please sign in to comment.