diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2018-08-05 22:28:41 +0200 |
---|---|---|
committer | Paramat <paramat@users.noreply.github.com> | 2018-08-05 21:28:41 +0100 |
commit | ee63b94f2c9e176f549c4446391e4c59f5a5be53 (patch) | |
tree | 767f643bf1849b521646ed0ca41c323efd384a7a /src/serverobject.h | |
parent | 88efebdf864baeb422cbe4d992a44ff7c99373fb (diff) | |
download | hax-minetest-server-ee63b94f2c9e176f549c4446391e4c59f5a5be53.tar.gz hax-minetest-server-ee63b94f2c9e176f549c4446391e4c59f5a5be53.zip |
Prevent objects from colliding with own child attachments (#7610)
Also, use a better distance calculation for 'collide with objects'.
Fixes the issue of a vehicle occasionally colliding with its own driver,
causing one of the velocity components to be set to zero.
Diffstat (limited to 'src/serverobject.h')
-rw-r--r-- | src/serverobject.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/serverobject.h b/src/serverobject.h index ba205f6a5..04d52425d 100644 --- a/src/serverobject.h +++ b/src/serverobject.h @@ -173,6 +173,7 @@ public: {} virtual const std::unordered_set<int> &getAttachmentChildIds() { static const std::unordered_set<int> rv; return rv; } + virtual ServerActiveObject *getParent() const { return nullptr; } virtual ObjectProperties* accessObjectProperties() { return NULL; } virtual void notifyObjectPropertiesModified() |