[z1836] A bit gameobject code refactoring

Only partly backported as rotation is differently handled in 1.12.1

(based on commit 565f52c)
(based on commit 6874951)

(cleaned version of f525237)

(based on commit [s1395] - a6d2610)