File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 30
30
#include < mc/world/actor/Mob.h>
31
31
#include < mc/world/actor/SynchedActorData.h>
32
32
#include < mc/world/actor/SynchedActorDataEntityWrapper.h>
33
+ #include < mc/world/actor/components/SynchedActorDataAccess.h>
33
34
#include < mc/world/actor/item/ItemActor.h>
34
35
#include < mc/world/attribute/Attribute.h>
35
36
#include < mc/world/attribute/AttributeInstance.h>
@@ -1268,8 +1269,6 @@ Local<Value> EntityClass::stopFire(const Arguments& args) {
1268
1269
CATCH (" Fail in stopFire!" )
1269
1270
}
1270
1271
1271
- #include " mc/entity/utilities/ActorDataIDs.h"
1272
-
1273
1272
Local<Value> EntityClass::setScale (const Arguments& args) {
1274
1273
CHECK_ARGS_COUNT (args, 1 );
1275
1274
CHECK_ARG_TYPE (args[0 ], ValueKind::kNumber );
@@ -1278,8 +1277,7 @@ Local<Value> EntityClass::setScale(const Arguments& args) {
1278
1277
Actor* entity = get ();
1279
1278
if (!entity) return Local<Value>();
1280
1279
1281
- entity->getEntityData ().set ((ushort)ActorDataIDs::Scale, args[0 ].asNumber ().toFloat ());
1282
- entity->_sendDirtyActorData ();
1280
+ SynchedActorDataAccess::setBoundingBoxScale (entity->getEntityContext (), args[0 ].asNumber ().toFloat ());
1283
1281
return Boolean::newBoolean (true );
1284
1282
}
1285
1283
CATCH (" Fail in setScale!" )
Original file line number Diff line number Diff line change 83
83
#include < mc/world/actor/Actor.h>
84
84
#include < mc/world/actor/SynchedActorData.h>
85
85
#include < mc/world/actor/SynchedActorDataEntityWrapper.h>
86
+ #include < mc/world/actor/components/SynchedActorDataAccess.h>
86
87
#include < mc/world/actor/player/Player.h>
87
88
#include < mc/world/attribute/Attribute.h>
88
89
#include < mc/world/attribute/AttributeInstance.h>
@@ -1761,8 +1762,7 @@ Local<Value> PlayerClass::setScale(const Arguments& args) {
1761
1762
Player* player = get ();
1762
1763
if (!player) return Local<Value>();
1763
1764
1764
- player->getEntityData ().set ((ushort)ActorDataIDs::Scale, args[0 ].asNumber ().toFloat ());
1765
- player->_sendDirtyActorData ();
1765
+ SynchedActorDataAccess::setBoundingBoxScale (player->getEntityContext (), args[0 ].asNumber ().toFloat ());
1766
1766
return Boolean::newBoolean (true );
1767
1767
}
1768
1768
CATCH (" Fail in setScale!" );
You can’t perform that action at this time.
0 commit comments