MT-CTF / capturetheflag

Capture the Flag game using the Minetest Voxel Engine
https://ctf.rubenwardy.com
81 stars 88 forks source link

Combat mode triggered even when not standing inside blocks #931

Closed appgurueu closed 2 years ago

appgurueu commented 2 years ago

The check doesn't take different collisionboxes of slabs, stairs etc. into account at all. A proper implementation like https://github.com/appgurueu/modlib/blob/master/minetest/collisionboxes.lua must be used instead.

Note that the else branch will happily push combat time higher and higher while you're standing on slabs: https://github.com/MT-CTF/capturetheflag/blob/master/mods/ctf/ctf_combat/ctf_combat_mode/init.lua#L35

savilli commented 2 years ago

FIxed in 746c5c3bfd15ee530721b82feb4bcb854bc6633e

appgurueu commented 2 years ago

FIxed in 746c5c3

No, not fixed, rather hacked around (and only applying to water?).

The timer should still trigger if you're inside stairs/slabs, meaning there's no way around using collisionboxes for a clean solution.

savilli commented 2 years ago

Looks good to me