supertuxkart / stk-code

The code base of supertuxkart
Other
4.54k stars 1.06k forks source link

The soccer ball doesn't roll #4811

Closed Wuzzy2 closed 2 years ago

Wuzzy2 commented 2 years ago

Description

In Soccer, the soccer ball doesn't roll. It slides over the ground, but doesn't roll.

This is a regression, as the soccer ball did roll in version 1.3.

Steps to reproduce

  1. Start a Soccer game on a map with a soccer ball. Las Dunas Stadium, Soccer Field, it doesn't matter.
  2. Kick the ball. Ram into it, shoot at it with a bowling ball, etc.
  3. Look whether the ball rolls.

Configuration

Benau commented 2 years ago

it falls like a puck but still rolls when you shoot it (confirmed by stk fans)

it falls like a puck because it is thrown from 0.0 7.0 0.0 (more fair) instead of -0.47 7.00 0.55

Benau commented 2 years ago

seems that archlinux package has some problem, try use the official stk-code linux build for now

Benau commented 2 years ago

yes flathub package works too so maybe some problem when arch is building supertuxkart, physically it behaves the same, you can experience that by joining stk server with 1.4 arch binary

Benau commented 2 years ago

maybe the use of -O3 (cmake_build_type=release) matters... difficult to track, don't have much time to bother it or wait @isjerryxiao (archlinux user too) to find out why

Benau commented 2 years ago

for the record even i compile stk with -O3 it behaves normally with gcc 12.2

Wuzzy2 commented 2 years ago

Yes, I got the package from Arch Linux (supertuxkart 1.4-1). Sorry, forgot to mention.

To be clear: I fail to get the ball rolling at all, no matter if I bump into it with the kart, shoot it with a bowling ball, shoot it against a wall, etc. Sadly, I can't compile STK right now. Let's see if other users can confirm this.

Benau commented 2 years ago

i try to makepkg -si the official supertuxkart pkgbuild and the ball rolls too, so maybe the official archlinux buildbot has compiler problem

They seem to have a 1.4-2 (for openssl3) staging you can see if it works later

Benau commented 2 years ago

seems like -flto=auto is the problem, if you build 1.3 package with a chroot environment it fails too (works in 'real' arch linux)

@isjerryxiao can comment more (or can paraphrase based on reading coded message in telegram )

Benau commented 2 years ago

@felixonmars seems that (gcc 12.2) lto doesn't know how to optimize hpr.toIrrVector()*RAD_TO_DEGREE properly, 0c2b81a fixed the issue

I would also recommend update archlinux pkgbuild deps as they are very outdated:

depends=('openal' 'libvorbis' 'freetype2' 'harfbuzz' 'curl' 'bluez-libs' 
         'sqlite' 'libjpeg-turbo' 'libpng' 'hicolor-icon-theme' 'sdl2' 'shaderc')
makedepends=('cmake' 'setconf' 'ninja')
source=("https://github.com/supertuxkart/stk-code/releases/download/${pkgver}/SuperTuxKart-${pkgver}-src.tar.xz")
sha512sums=('e88f3fb5ccdb38d0ef75e92d73b43c5cc7a1f6c76ac9502033df099a00d6dc3e86b2c5442b806237d2420c44ada7dd23a2c90ecf94785a44d2348c933770a5ab')

build() {
  cd "$srcdir"/SuperTuxKart-${pkgver}-src

  curl https://github.com/supertuxkart/stk-code/commit/0c2b81ac1f9ff29f5012a98f530880b87f416337.diff | patch -p1

Tested in chroot environment and fixed the ball issue

isjerryxiao commented 2 years ago

https://bugs.archlinux.org/task/76394

Benau commented 2 years ago

gift https://github.com/archlinux/svntogit-community/blob/packages/supertuxkart/trunk/PKGBUILD

Wuzzy2 commented 2 years ago

Bugfix confirmed. :+1: