Commit Graph

8186 Commits (a7f468cc7c5b3404d7dbe8ce3bcf1da777a4928d)

Author SHA1 Message Date
Cyp a7f468cc7c Add map name to desynch dumps. 2010-11-29 17:57:31 +01:00
Cyp 29e240f3f7 Fix defenses not being able to be built next to oil wells without derricks.
Try to simplify logic which decides what can be built next to what.
2010-11-29 17:37:18 +01:00
Cyp 2ad6ff0855 Fix desynch when player leaves, due to clearing buildings at different gameTimes. 2010-11-29 12:48:51 +01:00
Cyp b8b42f931e Simplify tile->psObject update of features. 2010-11-29 01:46:23 +01:00
Cyp 2571cfecf2 Process own GAME_FEATURES messages, fixes placing features in debug menu. 2010-11-29 01:46:20 +01:00
Cyp 747d77819b Remove unused AUXMAP structure. 2010-11-29 01:46:16 +01:00
Cyp d242e2f1d0 Fix bad pointer when loading maps with horizontal cyborg factories.
Probably the cause of some desynchs and crashes.
2010-11-29 01:46:04 +01:00
Cyp a8f6faaed0 Fix spurious desynch at gameTime 102, due to not clearing desynch logs between games.
Also, no need to duplicate function name strings, which are link-time constants.
2010-11-29 01:45:19 +01:00
safety0ff 77a46d31c9 Use the base dataset name instead of texture<->tileset mapping to determine tileset.
Closes #2355, #2193.
2010-11-28 16:11:49 -05:00
cybersphinx 50e55403dd Polish translation update by Emdek.
Closes #1347.
2010-11-28 19:20:55 +01:00
dak180 ec0d8eadbf Fix the mac builds broken by Cyp in rfccb548124. 2010-11-27 18:16:41 -05:00
Cyp f98ef53bfc Simplify movement code slightly and reduce rounding errors.
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.
2010-11-27 22:58:22 +01:00
Per Inge Mathisen e3293267a4 Now that we have logical updates, we can simplify the calculations slightly. Patch reviewed by Cyp. Closes ticket:2360 2010-11-27 16:49:22 +01:00
Per Inge Mathisen 301fea4188 Difficulty level should only apply to campaign, not to single player skirmish. 2010-11-27 14:46:08 +01:00
Per Inge Mathisen 6bace8bdf5 Remove unused variables for weapons. 2010-11-25 22:32:46 +01:00
Per Inge Mathisen dc4c88e5ee Fix hoverwreck with zero body points 2010-11-25 20:19:30 +01:00
Per Inge Mathisen bc1fd6cbbc Do not keep unused structure variables in memory, and document them as being unused in the data header. 2010-11-25 20:05:42 +01:00
Cyp 1699da10cf Fix clients and/or host crashing due to the last client clicking ready too many times. Based on patch by Buggy.
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.
2010-11-25 12:58:28 +01:00
buginator 3ede70143e Re: fccb548124
Really remove all references to it.
2010-11-24 21:01:12 -05:00
Cyp fccb548124 Remove completely useless src/environ.[ch], and all references to it. 2010-11-24 21:19:34 +01:00
Cyp 7c14ee39c4 Initialise structure direction before using the structure width/breadth in auxStructureBlocking().
Fixes unsynchronised errors in the blocking map when building cyborg factories or lassats.

Closes ticket:2290. Refs ticket:2203.
2010-11-24 21:13:14 +01:00
Cyp 21aaef1dbc When clearing AUXBITS_THREAT, clear AUXBITS_AATHREAT too.
Refs ticket:2203.
2010-11-24 21:13:12 +01:00
Cyp c18fa650bb Make aquatic ground heights be deterministic.
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.
2010-11-24 21:13:02 +01:00
cybersphinx 39085d62fd Update translations. 2010-11-24 17:59:51 +01:00
cybersphinx bdcb2f6f2d Korean translation update by urgood2.
Closes #2098.
2010-11-24 17:59:48 +01:00
cybersphinx b7cb308f30 Allow process to be traced for the crash handler.
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)
2010-11-24 16:49:50 +01:00
Cyp e9cbdace22 Check with syncDebug that blocking and danger maps are identical. 2010-11-24 12:23:03 +01:00
Buginator 83f1a892e1 Only clear player name when needed.
(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)
2010-11-22 16:06:29 +01:00
Cyp 502c8a19ac Fix danger map threading, pointer-to-int compile -Werror warning, and dangerFloodFill running for player -1.
Refs ticket:2203.
2010-11-22 16:05:33 +01:00
safety0ff ae6b76dda5 Fix for ivis state desync, fixes menu colour bug noticed by vexed. 2010-11-22 01:02:11 -05:00
safety0ff b4abb4f8eb Reset colors after drawing droid selections.
Closes #2341.
2010-11-22 00:58:18 -05:00
safety0ff 7e872312b8 Fix opengl state clobbering, optimize terrain rendering a little. 2010-11-22 00:05:42 -05:00
Per Inge Mathisen 1401fbd13d Uh. I hate git. 2010-11-21 23:25:35 +01:00
Per Inge Mathisen 6f29cab638 Rework the cached information in psTiles to be easily copied for use in threads. Put danger map processing in a separate work thread. See ticket:2203 2010-11-21 23:22:37 +01:00
safety0ff 8c9e7d5bd0 Fix an invalid pointer dereferencing issue in the script events system.
Closes #2300.
2010-11-21 15:48:31 -05:00
safety0ff 16681df600 Revert "Fix another memory clobbering issue. (dereferenced pointer)"
This reverts commit 1a6fb8a7547f23ce2bd7af153ac839cba999e2b0.
2010-11-21 15:48:31 -05:00
Cyp 00d69c1317 Initialise psFeature->lastHitWeapon to avoid valgrind warning found by Safety0ff.
Also changed lastHitWeapon from UDWORD to WEAPON_SUBCLASS.
2010-11-21 14:18:31 +01:00
Cyp ea1e76a09d Handle floating point connector coordinates as well as integer (ignores the floating point part).
Correctly handles "42 127 -3", "42.999 127. -3.1415926535897932384626" and "42... 127.0.0.1 -3.0..0...0" as (42, 127, -3).
Doesn't handle the floating point and integer mixture "42 127.0 -3".
2010-11-21 11:38:36 +01:00
Cyp bdca765f06 Change connector locations and pie_TRANSLATE from floats to ints.
Probably fixes desynchs involving different projectile sources.

Hope no floats are left to affect the game state...
2010-11-20 20:44:40 +01:00
buginator 4fdba622e6 update .gitignore for profiler noise 2010-11-19 23:31:26 -05:00
Cyp 701abfdaa1 Fix multiturret droids trying to look at invalid weapon slots of structures when looking at their targets.
Fixes a desynch when multiturreted droids are present.
2010-11-19 17:29:15 +01:00
Cyp 3da5952483 Fix broken check for giving too many trucks to a player. Caused desynchs due to players not agreeing who owned what.
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.
2010-11-19 15:29:12 +01:00
Cyp a0ea827340 Fix VTOLs teleporting to a planet 2.5 million tiles up, due to missing cast before division in last commit. 2010-11-19 12:42:19 +01:00
Cyp 53da8ac0d0 Fix desynch due to deltaGameTime not being deterministic during message processing.
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.
2010-11-18 10:56:41 +01:00
cybersphinx e45ee5024c Spanish translation update by Saberuneko.
Closes #2327.
2010-11-17 05:43:59 +01:00
Cyp 6ea8e50b65 Fix broken mapObjIsAboveGround and incorrect lighting normals due to ELEVATION_SCALE.
Changelog: Fix projectiles going through terrain due to bad terrain height calculations.
Changelog: Fix terrain shading.
2010-11-16 20:20:54 +01:00
Cyp 275428c161 Remove floats related to map height.
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.
2010-11-16 20:17:58 +01:00
Cyp 902ec04272 Remove floats from src/droid.c. 2010-11-16 19:00:55 +01:00
Cyp 3359fac395 Fix broken moveCalcBlockingSlide comparisons, and make DEG(42) evaluate to 7645 without use of floating point.
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.
2010-11-16 18:33:20 +01:00
Cyp 2af8f9c712 Remove some float usage from src/structure.c. 2010-11-16 14:48:06 +01:00