diff options
author | nat-goodspeed <nat@lindenlab.com> | 2024-09-24 07:28:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 07:28:44 -0400 |
commit | 1175288a3c685310dbbf7fdd46d7deae0b0bf92d (patch) | |
tree | 84fd4d186169807c4da1c0c352d9be92f1e63227 /indra/newview/lltoolplacer.cpp | |
parent | 0ee1106faccf90c883d8b9ffc522a341659742ed (diff) | |
parent | 9036e4582cec1893016bd692293ec1c0135f7112 (diff) |
Merge pull request #2534 from secondlife/release/luau-scripting
Add Lua scripting to develop, behind feature flag
Diffstat (limited to 'indra/newview/lltoolplacer.cpp')
-rw-r--r-- | indra/newview/lltoolplacer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index b15bb5efd5..2ac5d6b6b1 100644 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -164,13 +164,17 @@ bool LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) bool b_hit_land = false; S32 hit_face = -1; LLViewerObject* hit_obj = NULL; - U8 state = 0; bool success = raycastForNewObjPos( x, y, &hit_obj, &hit_face, &b_hit_land, &ray_start_region, &ray_end_region, ®ionp ); if( !success ) { return false; } + return rezNewObject(pcode,hit_obj, hit_face, b_hit_land, ray_start_region, ray_end_region, regionp, use_physics); +} +bool LLToolPlacer::rezNewObject(LLPCode pcode, LLViewerObject * hit_obj, S32 hit_face, bool b_hit_land, LLVector3 ray_start_region, + LLVector3 ray_end_region, LLViewerRegion* regionp, U8 use_physics) +{ if( hit_obj && (hit_obj->isAvatar() || hit_obj->isAttachment()) ) { // Can't create objects on avatars or attachments @@ -195,6 +199,8 @@ bool LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) bool create_selected = false; LLVolumeParams volume_params; + U8 state = 0; + switch (pcode) { case LL_PCODE_LEGACY_GRASS: |