From 119bff351450ea16ffda550b6e0f67379b29f708 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 17:37:16 +0700 Subject: Revert "shared_ptr -> std::shared_ptr" This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5. --- Minecraft.World/Entity.h | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'Minecraft.World/Entity.h') diff --git a/Minecraft.World/Entity.h b/Minecraft.World/Entity.h index 2b8b167b..bde83e30 100644 --- a/Minecraft.World/Entity.h +++ b/Minecraft.World/Entity.h @@ -52,7 +52,7 @@ public: bool blocksBuilding; weak_ptr rider; // Changed to weak to avoid circular dependency between rider/riding entity - std::shared_ptr riding; + shared_ptr riding; Level *level; double xo, yo, zo; @@ -118,7 +118,7 @@ protected: bool fireImmune; // values that need to be sent to clients in SMP - std::shared_ptr entityData; + shared_ptr entityData; private: // shared flags that are sent to clients (max 8) @@ -159,7 +159,7 @@ protected: virtual void defineSynchedData() = 0; public: - std::shared_ptr getEntityData(); + shared_ptr getEntityData(); /* public bool equals(Object obj) { @@ -243,12 +243,12 @@ public: virtual void setLevel(Level *level); void absMoveTo(double x, double y, double z, float yRot, float xRot); void moveTo(double x, double y, double z, float yRot, float xRot); - float distanceTo(std::shared_ptr e); + float distanceTo(shared_ptr e); double distanceToSqr(double x2, double y2, double z2); double distanceTo(double x2, double y2, double z2); - double distanceToSqr(std::shared_ptr e); - virtual void playerTouch(std::shared_ptr player); - virtual void push(std::shared_ptr e); + double distanceToSqr(shared_ptr e); + virtual void playerTouch(shared_ptr player); + virtual void push(shared_ptr e); virtual void push(double xa, double ya, double za); protected: @@ -261,7 +261,7 @@ public: virtual bool isPickable(); virtual bool isPushable(); virtual bool isShootable(); - virtual void awardKillScore(std::shared_ptr victim, int score); + virtual void awardKillScore(shared_ptr victim, int score); virtual bool shouldRender(Vec3 *c); virtual bool shouldRenderAtSqrDistance(double distance); virtual int getTexture(); // 4J - changed from wstring to int @@ -283,20 +283,20 @@ protected: public: virtual float getShadowHeightOffs(); - std::shared_ptr spawnAtLocation(int resource, int count); - std::shared_ptr spawnAtLocation(int resource, int count, float yOffs); - std::shared_ptr spawnAtLocation(std::shared_ptr itemInstance, float yOffs); + shared_ptr spawnAtLocation(int resource, int count); + shared_ptr spawnAtLocation(int resource, int count, float yOffs); + shared_ptr spawnAtLocation(shared_ptr itemInstance, float yOffs); virtual bool isAlive(); virtual bool isInWall(); - virtual bool interact(std::shared_ptr player); - virtual AABB *getCollideAgainstBox(std::shared_ptr entity); + virtual bool interact(shared_ptr player); + virtual AABB *getCollideAgainstBox(shared_ptr entity); virtual void rideTick(); virtual void positionRider(); virtual double getRidingHeight(); virtual double getRideHeight(); - virtual void ride(std::shared_ptr e); - virtual void findStandUpPosition(std::shared_ptr vehicle); // 4J Stu - Brought forward from 12w36 to fix #46282 - TU5: Gameplay: Exiting the minecart in a tight corridor damages the player + virtual void ride(shared_ptr e); + virtual void findStandUpPosition(shared_ptr vehicle); // 4J Stu - Brought forward from 12w36 to fix #46282 - TU5: Gameplay: Exiting the minecart in a tight corridor damages the player virtual void lerpTo(double x, double y, double z, float yRot, float xRot, int steps); virtual float getPickRadius(); virtual Vec3 *getLookAngle(); @@ -306,7 +306,7 @@ public: virtual void animateHurt(); virtual void prepareCustomTextures(); virtual ItemInstanceArray getEquipmentSlots(); // ItemInstance[] - virtual void setEquippedSlot(int slot, std::shared_ptr item); // 4J Stu - Brought forward change from 1.3 to fix #64688 - Customer Encountered: TU7: Content: Art: Aura of enchanted item is not displayed for other players in online game + virtual void setEquippedSlot(int slot, shared_ptr item); // 4J Stu - Brought forward change from 1.3 to fix #64688 - Customer Encountered: TU7: Content: Art: Aura of enchanted item is not displayed for other players in online game virtual bool isOnFire(); virtual bool isRiding(); virtual bool isSneaking(); @@ -316,7 +316,7 @@ public: virtual bool isSprinting(); virtual void setSprinting(bool value); virtual bool isInvisible(); - virtual bool isInvisibleTo(std::shared_ptr plr); + virtual bool isInvisibleTo(shared_ptr plr); virtual void setInvisible(bool value); virtual bool isUsingItemFlag(); virtual void setUsingItemFlag(bool value); @@ -336,7 +336,7 @@ public: void setAirSupply(int supply); virtual void thunderHit(const LightningBolt *lightningBolt); - virtual void killed(std::shared_ptr mob); + virtual void killed(shared_ptr mob); protected: bool checkInTile(double x, double y, double z); @@ -347,7 +347,7 @@ public: virtual wstring getAName(); // TU9 - bool skipAttackInteraction(std::shared_ptr source) {return false;} + bool skipAttackInteraction(shared_ptr source) {return false;} // 4J - added to manage allocation of small ids private: @@ -374,14 +374,14 @@ public: void considerForExtraWandering(bool enable); bool isExtraWanderingEnabled(); int getWanderingQuadrant(); - - virtual vector > *getSubEntities(); - virtual bool is(std::shared_ptr other); + + virtual vector > *getSubEntities(); + virtual bool is(shared_ptr other); virtual float getYHeadRot(); virtual void setYHeadRot(float yHeadRot); virtual bool isAttackable(); virtual bool isInvulnerable(); - virtual void copyPosition(std::shared_ptr target); + virtual void copyPosition(shared_ptr target); private: unsigned int m_uiAnimOverrideBitmask; -- cgit v1.2.3