Detecting click-on-endpost, setting pivot accordingly, bugfix

bugfix: some getclicked calls were not updated to get a matrix as a parameter rather than a number.
This should fix it now.

Signed-off-by: Lennard Wasserthal <Wasserthal@nefkom.net>