Commit Graph

8416 Commits (7481694e9f14d27ad72d401b5c27d50d71be70af)

Author SHA1 Message Date
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
Cyp a0c1c9de0d Change droid experience from float to uint32_t.
Less floats generally reduces the risk of desynchs, don't know if the droid experience caused desynchs, but it might have been possible. Added experience to syncDebugDroid.

Also, fixed QualityFactor and droidResistance integer truncation and made single-player skirmish damage not affected by difficulty level either.
2010-11-16 14:18:01 +01:00
Cyp 48c4958062 Convert iIMDShape.min/max from Vector3f to Vector3i, since they are used in the game state.
Don't know if that could cause any desynchs, but better not to risk it.
2010-11-16 12:01:43 +01:00
cybersphinx 6a2991c390 Turkish translation update by Ayhan Görgülü.
Closes #2316.
2010-11-15 23:15:36 +01:00
cybersphinx 985d2b8de2 Fix mod shortcuts for the Windows Installer. 2010-11-15 22:54:42 +01:00
cybersphinx ed8db06302 Add missing include. 2010-11-15 21:45:08 +01:00
Cyp 7df59bafdb Fix desynch when constructing and demolishing the same structure at the same time. 2010-11-15 14:31:28 +01:00
Cyp 40602d428e Verify in syncDebug that generated paths are identical. 2010-11-15 13:11:19 +01:00
buginator df83ed0caa Bump netcode's NETCODE_VERSION_MINOR to sync with new testing build. 2010-11-14 22:38:20 -05:00
buginator 341d4d3bf8 Use 'Warzone 2100 master' as the default directory, and the default crash handler (on windows) directory.
fixes ticket:2317
2010-11-14 22:30:45 -05:00
buginator bc295c0110 Don't assume the macro WEAPON_MOUNT_IMD is the same as it is in 3.0.
The 2nd parameter is used in master, but not 3.0.
This was broken in f825a85f5d

Thanks to Berg for the report.
2010-11-14 22:05:25 -05:00
dak180 654819950b Update the dmg script to allow for code signing. 2010-11-14 20:13:59 -05:00
dak180 57b82cc458 Add new (for the mac) translations to the xcode project. 2010-11-14 20:10:43 -05:00
Cyp 487c875dc6 Fix extra '/'s in previous commit. 2010-11-14 20:28:35 +01:00
Cyp 384aa5dab3 Add releaseBranch script. 2010-11-14 18:46:29 +01:00
buginator 44ffff798a make -Cpo update-po 2010-11-13 17:37:59 -05:00
Cyp 66ab1ce53c Fix invalid pointer usage in droidSetBits, due to using getPropulsionStats(psDroid) too soon.
Found by valgrind. Introduced in bb72422a01. Could probably cause desynchs or crashes.
2010-11-13 20:46:50 +01:00
buginator d4588c69f3 Never call mapShutdown() or environReset() in mid-missions, since we come back
to the main map, and that data must be valid or we get no textures, and the water
heights will be incorrect.
Also complain loudly if the mission type is wrong (should never happen!)

fixes ticket:2262
(cherry picked from commit b859c3d6997a9860662b1be8753c643fc48f2a72)
2010-11-13 13:57:00 -05:00
buginator c1b44daf1e Fix underflow, if a pre-built structure has part of it in water.
NOTE: since this is going on, on our mission maps, we just fix the issue, instead of
removing the item, since the item in question might be used by the scripts, and removing
it would break things.

fixes ticket:2302
(cherry picked from commit 94bedce442051a0cb1562fb0f8962c54e60e9fa3)
2010-11-13 13:56:51 -05:00
buginator 03914be31b When doing a map preview, no need to process stuff that is only useful in-game.
This speeds up the preview screen back to 2.x speeds.
(cherry picked from commit 5f42d0032a9c8dc0b4de60cbef7f9bba8b0b70f0)

Conflicts:

	src/game.c
	src/map.c
2010-11-13 13:48:18 -05:00
buginator f8517a7716 Fix another memory clobbering issue. (dereferenced pointer)
Patch Author: Safety0ff
fixes ticket:2300

Original detective work done by Ai_Tak (ticket:1656)

Signed-off-by: buginator <buginator@gna.org>
(cherry picked from commit 1a6fb8a7547f23ce2bd7af153ac839cba999e2b0)
2010-11-13 13:40:58 -05:00