Used division instead of right-shift, since right-shift of negative numbers is implementation defined. (At least GCC does an arithmetic shift.)
Removed two unused enum values.
Reviewed by Per.
Throw in a few checks for changing player position or team, too.
Closes ticket:2346.
Changelog: Fixed crash for all players when the last player clicks "Ready" too many times.
Don't know whether aquatic ground heights could affect game state, but changing in case, and since it means less to debug.
Also, removed unused parts of src/environ (which is pretty much everything).
src/environ is now even more useless, and should probably be deleted in a future commit.
Some distributions disallow this (newer Ubuntu for example), so the gdb call
didn't output anything useful. Based on a patch by Safety0ff.
(cherry picked from commit 023ea5b2cea6f57b6690ac7d25fd472aefc911eb)
(When player drops / leaves, you will still see their name instead of the default color name).
Also fix a log line.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11495 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 847edec81737e6c6a42e4c91aede5c99b9a755ce)
The check against selectedPlayer was incorrect, it caused clients with max trucks + 1 to not believe anyone could give trucks to anyone else.
Introduced in d6b47d1122.
Changelog: Really fix truck limit when giving trucks.
Fixed by setting deltaGameTime = 0 in src/loop.c, after each game-state update.
Also, cleaned up lib/gamelib/gtime slightly.
To reproduce locally, start 2 clients, set one to 20x speed, the other to normal speed, and create droids on uneven terrain using the debug menu.
The MAPTILE.height and MAPTILE.waterLevel fields are now integers and are pre-multiplied by ELEVATION_SCALE (which was 2), and therefore now store the actual heights.
Preserved old behaviour including a couple of ELEVATION_SCALE-related bugs, which will be fixed in the next commit.
Might reduce desynchs, due to reduced floats.
For several recent commits:
Changelog: Removed lots of floats, which hopefully reduces the risk of desynchs.
After making DEG avoid using float (unless given a float argument), had to fix moveCalcBlockingSlide to avoid out-of-range-comparison error-warnings.
The moveCalcBlockingSlide's int16_t instead of uint16_t was introduced in 6c811c1ecb.
Also, remove lots of unused stuff.