Commit Graph

3713 Commits (985d2b8de275d57034bbcbcff7e33339a187a78d)

Author SHA1 Message Date
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 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
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 0ed42c0b2d Forgot the include for f4e8221ef53c4f9af6b3f5f2af3c7e5b28c89654
(cherry picked from commit d4639fea223ab74f4953af8ee4263c2699f712e4)
2010-11-13 13:40:35 -05:00
buginator f825a85f5d CHANGELOG: Fix unit explosion color for turret
fixes ticket:2294
(cherry picked from commit f4e8221ef53c4f9af6b3f5f2af3c7e5b28c89654)

Conflicts:

	src/component.c
	src/effects.c
	src/effects.h
2010-11-13 13:40:10 -05:00
buginator b6baa8338e Actually copy the default template name
(cherry picked from commit 5132e5cace5f6e2299e4ef0b6ed9267738e28ff5)
2010-11-13 13:15:47 -05:00
Per Inge Mathisen e41fa8fbef Change savegame date description format to %x %X which is short, descriptive and locale-dependent. Patch by Emdek, closes ticket:2303 2010-11-13 13:57:15 +01:00
Per Inge Mathisen 77fb642247 The current algorithm for matching a defensive structure to terrain looks at the higher corner of a tile. This new algorithm looks instead at the higher position on a tile where a vertex in the model would intersect the terrain if it were level with the ground. This makes defensive structures match up with the terrain much closer, avoiding the 'jutting out of the terrain' effect of building defensive structures on uneven terrain. This closes ticket:2299 2010-11-09 19:11:15 +01:00
cybersphinx 8facf5e178 Include autorevision.h in the tarball for Mac builds.
(cherry picked from commit fa3abb70e5ad9dfdd41451c1135648e240f2f2b3)
2010-11-08 02:55:40 +01:00
Cyp be5285f916 Fix duplicate structure IDs by removing GAME_BUILD message type.
The only remaining purpose of GAME_BUILD was to hackishly change structure IDs around, which is not useful since structure IDs are already synchronised.

Changelog: Fix inability to select or target some structures due to duplicate structure IDs.
2010-11-07 14:16:56 +01:00
Cyp c53a59b709 Don't call glBufferSubData(GL_ARRAY_BUFFER, *, 0, *), which crashes some drivers.
Probably shouldn't have crashed... Fixes ticket:2293.

Changelog: Work around crash in some graphics drivers on some maps.
2010-11-07 11:46:51 +01:00
Per Inge Mathisen 97f0d5b3e3 Do not crash when building ugly gates in L-formation. Closes ticket:2292 reported by Cyp. 2010-11-06 16:26:19 +01:00
Per Inge Mathisen ba0d8f3509 Do not make AIs build gateway fortifications in places where they can be shot at. 2010-11-05 21:39:07 +01:00
Per Inge Mathisen bd82f2b8e2 Make danger map accessible to scripts. New functions: safeDest(plr, x, y) and threatAt(plr, x, y) for querying it. 2010-11-05 21:16:05 +01:00
Per Inge Mathisen b676dcded4 Make danger map block fill on buildings as well as features again. Mark buildings and features in safe territories as safe. 2010-11-05 21:15:02 +01:00
Per Inge Mathisen 2a56d64b0b Speed up danger map performance by using a preallocated array instead of a dynamically allocated linked list for storing open nodes. 2010-11-03 21:14:05 +01:00
Per Inge Mathisen 5b0422af3c Fix warning for missing parentheses. Closes ticket:2291 2010-11-03 20:06:09 +01:00
Per Inge Mathisen aeb20e839e Make AI players able to produce more than one thing in each factory again. 2010-11-03 19:47:28 +01:00
Cyp 374c1a97be Fix desynch due to pre-placed oil drums being weird and unsynchronised.
Fixes audio message that shouldn't be there, since power from oil drums is no longer sent as a "gift".

Changelog: Fixed desynch on picking up oil drums included in maps. Also fixed power transferred audio on picking up oil drums.
2010-11-02 23:35:53 +01:00
Per Inge Mathisen bb72422a01 Cache the blocked status of tiles in a bitset to make lookups faster, especially for time consuming map analysis like danger maps. See ticket:2283 for discussion. 2010-11-02 21:30:56 +01:00
Per Inge Mathisen 1617b4c3d7 Add new keyword WZ_DECL_ALWAYS_INLINE to label functions that we always want to inline, even when compiling in debug mode.
Also manually inline map tile lookups in the danger map code for maximum performance (avoiding some checks).
2010-11-02 21:12:58 +01:00
Per Inge Mathisen b1c4980c81 Speed up danger map performance a bit by rejecting tiles during flood fill that have already been processed. 2010-11-02 21:06:03 +01:00
Buginator 0702fa9eb5 Show map / game name / hosted by in the tooltip for the lobby
closes ticket:2121

This does *NOT* break GAMESTRUCT compatibility.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11546 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 1119dada6868433f6840dd1fe174a7aa3858b081)
2010-11-02 15:30:36 +01:00
Cyp 92cd24faaa Make game difficulty setting not affect skirmish games.
Hopefully, skirmish games will be just like multiplayer now.

Changelog: Game difficulty setting no longer affects damage in single-player skirmish games.
2010-11-01 19:18:42 +01:00
Cyp bad36b8a48 Fix power generation speed in multiplayer depending on game options difficulty level.
Basically, any player that changed the game difficulty level to help them beat the campaign would end up accidentally cheating 10% extra power in multiplayer...

This caused desynchs for obvious reasons.

Changelog: Fix desynch due to each player's power generation speed in multiplayer depending on the their game options difficulty level.
2010-11-01 11:47:45 +01:00
Cyp 66286268f2 Don't crash on MOVEPOINTTOPOINT for paths of zero length.
Should that be possible, though?
2010-10-31 08:56:31 +01:00
Cyp b8523681d6 Draw blueprints of pending but not yet synchronised orders from order queue, to fix blueprints flashing.
(Adding a "Changelog" line, in case anyone wants to try making a changelog using a script.)
Changelog: Fix queued structure blueprints flashing just before being built.
2010-10-30 08:15:00 +02:00
Cyp d8fbf4bccc Fix droid order lists not getting cleared when giving a non-queued order.
Ended up removing SendGroupOrderSelected in the process.
2010-10-29 05:45:26 +02:00
buginator 249713b04a Don't shutdown the map on (specific) SP missions, it still is in use for away missions when we come back.
If said map is shutdown, then instead of crashing, this just makes it so you don't see textures.
Note for the future: Perhaps it is better to just abort out instead, since it means that we
shutdown the map when we were not supposed to...

fixes ticket:2265
fixes ticket:2256
(cherry picked from commit f3406075e3cca5599bf699d0e07fc4e83266e55f)
2010-10-28 07:13:19 +02:00
Cyp 2bd260f2aa Fix lassat party, re-add the delay between lassat shots. 2010-10-28 06:44:29 +02:00
Cyp 0ee3a2147b Add version stuff for mac, and shorten version display in-game to a 7 char hash. 2010-10-27 19:43:18 +02:00
Cyp 9cd889fb6a Fix order-queue-related desynch.
Could usually be reproduced by filling a transporter, ordering to unload in an enemy base, and queueing an order to fly back.

Would probably trigger randomly, but not in autogames where orders usually aren't queued.

Also added action targets to syncDebugDroid for easier future bugfinding.
2010-10-27 12:17:35 +02:00
Cyp 2590c196f6 Fix host being unable to ever research any topic which an AI player has begun research on.
Affected single-player, too.

Closes ticket:2264.
2010-10-26 20:20:02 +02:00
Cyp 5bec739eda When a derrick is destroyed, make the oil well visible to the players that know the derrick exploded. 2010-10-26 15:35:07 +02:00
Cyp 590752c08a Fix broken pathfinding on non-square maps.
Was typo in isBlocked() function in a3569a758f.

Closes ticket:2259.
2010-10-26 15:26:07 +02:00
Cyp 0a687db4ca Add most of sMove structure to syncDebugDroid.
Also, remove unused bound[XY] variables in sMove.
2010-10-26 10:11:54 +02:00
Cyp 6f1fbbde33 Make the droidOrder*() functions take a ModeQueue/ModeImmediate parameter.
Removes the need for turnOffMultiMsg() in some places.
Should reduce the number of messages sent over the network a bit.
Also removes two unused functions in src/transporter.[ch].
2010-10-24 19:36:08 +02:00
Cyp 40ffee51fc Allow changing game speed in multiplayer when debug mode is enabled.
All players should change to the same speed, unless wanting to test what happens if some computers are too slow.
2010-10-24 17:17:54 +02:00
Cyp a9ac2c755a Fix some droids not going to rally points.
The droids were getting DORDER_GUARD messages after getting the DORDER_MOVE.
2010-10-23 23:30:36 +02:00
Cyp aea0933672 Don't desynch on embarking nor crash on disembarking. 2010-10-23 22:16:28 +02:00
Cyp 1481ec6830 Fix flamers shooting into outer space due to unsigned underflow and fix penetrating projectiles going 100 times too far.
Also, renamed the confusingly named partially-unsigned vectors {startX, startY, srcHeight} and {tarX, tarY, altChange - srcHeight} to signed vectors src and dst, respectively.
2010-10-23 18:02:56 +02:00
Cyp 5c431a36d1 Convert muzzle location from floats to integers. 2010-10-23 18:02:56 +02:00
Cyp 9b52ee44b4 Fix synch error, don't let AIs bypass the message queue when starting researching. 2010-10-23 18:02:56 +02:00
Cyp e8ebb11d4a Remove NETnull() function, which was potentially confusing.
NETnull() was equivalent to uint32_t zero = 0; NETuint32_t(&zero);, which no longer adds/removes 4 bytes of padding as advertised.
2010-10-23 18:02:56 +02:00