Update collisionbox for Minetest 5.x (#8)

After leaving the spectator mode in Minetest 5.x, the collisionbox isn't the right size and at the right place.
I simply changed the values of the collisionbox to match the vanilla ones.

A better solution would be to get the current size of the collisionbox when the player enter the spectator mode, store them, and use those when leaving that mode.
This would make the mod more compatible with other mods that changes the player's size.
This commit is contained in:
Lemente 2020-07-15 20:34:52 +02:00 committed by GitHub
parent 7aed82d42d
commit 36483716ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ local function unwatching(name)
watcher:set_properties({
visual_size = {x = 1, y = 1},
makes_footstep_sound = true,
collisionbox = {-0.3, -1, -0.3, 0.3, 1, 0.3}
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}
})
if not privs.interact and privs.watch == true then