Commit Graph

6988 Commits (36a6036b9f8ad5e73467bb29b027258e98add83d)

Author SHA1 Message Date
Cyp 36a6036b9f newnet: Fix corner case which resulted in updating before all messages had arrived. Make NET_FIREUP start the game before processing more messages (fixes case where one client is running under valgrind, or is just very very slow). 2010-02-21 16:51:20 +01:00
Cyp 65196b0bd9 newnet: Sanity check that floating point is the same on all machines. 2010-02-20 13:17:58 +01:00
Cyp 8c5712e6cb newnet: Move checking for NET_ and GAME_ messages from the middle of an update to before deciding whether to update, fixes doing half of an update too soon on some clients. Fix droid synch messages going out of synch.
A few groups of patrolling trucks belonging to different players, and bumping into each other all the time stay in synch for several minutes, at least if not doing unsynchronised actions such as building new trucks (adding a lot of trucks, before ordering any of them to patrol is fine). They seem to get stuck in traffic jams, but at least they are synchronised traffic jams.
2010-02-20 12:19:10 +01:00
Cyp f978943eb6 newnet: Fix the host mixing up broadcast messages with messsages to the host, by making NetQueue even more message-oriented. Use -Wall -Werror on C++ files too, and fix the corresponding werrors. Don't use gameRand() from scripts, since the scripts are apparently only executed on the host. Add syncDebug() log function, which is only printed, if it would print different things on different clients. 2010-02-16 23:02:27 +01:00
Cyp 5298844797 newnet: Use deltas to stop GAME_CHECK_STRUCT from breaking things that aren't already broken. 2010-02-15 20:56:59 +01:00
Cyp 08fc464a80 newnet: Use deltas to stop GAME_CHECK_POWER from breaking things that weren't already broken. 2010-02-15 20:56:59 +01:00
Cyp 75b06b330a newnet: Use deltas to stop GAME_CHECK_DROID from breaking things that aren't already broken. 2010-02-15 20:56:59 +01:00
Cyp 1b41da254b newnet: Process own GAME_ARTIFACTS messages (and remove the corresponding duplicate code). 2010-02-15 20:56:59 +01:00
Cyp 33790b11a2 newnet: Rename all messages that go into game queues from NET_BLAH to GAME_BLAH, remove unused messages, and assert that the right messages go into the right kinds of queues. 2010-02-15 20:56:58 +01:00
Cyp 6cdde8d607 newnet: Make main thread block on second call to fpathDroidRoute. This makes the code more deterministic, improving synch a lot.
Also, merge most of fpath.c from Qt branch, fixes a useless delay before pathfinding starts and should reduce merge conflicts later.
2010-02-15 20:56:58 +01:00
Cyp 864b830a44 newnet: Don't wait for dropped players to send NET_GAME_TIME. Add more comments and cleanup. 2010-02-15 20:56:58 +01:00
Cyp 1943e08ba8 newnet: Change popped too much assert to warning, since the queue might have been cleared if a player disconnects. May still wait for NET_GAME_TIME messages from the player that no longer exists. 2010-02-15 20:56:57 +01:00
Cyp d1ba8c087b newnet: Remove extra game queue, added due to misunderstanding. 2010-02-15 20:56:57 +01:00
Cyp a8dae49113 newnet: Convert NET_DROIDINFO, NET_DROIDMOVE, NET_GROUPORDER and NET_SECONDARY. A pair of trucks can now patrol for 10 seconds or so, before going out of synch (was previously 1 second). 2010-02-15 20:56:57 +01:00
Cyp e9e30bcb27 newnet: Synch game queues, and play them back at the same rate on all clients. Multiplayer now "works" as it did before, with the advantage that it will be possible to remove the bMultiMessages hacks and implement real multiplayer support.
I even tested that campaign, skirmish, saving and loading still works.
2010-02-15 20:56:57 +01:00
Cyp 7e18c64533 newnet: Change NetQueue into a message queue instead of a byte queue and fix some things. Take into account that NETbeginDecode isn't always matched with NETend, just most of the time.
Apart from each player playing a completely different games, multiplayer seems to work now. The players can chat with each other.
So everything seems normal, just with slightly worse synchronisation; now with literally no synchronisation, instead of just practically no synchronisation.
Newly built trucks are doubled, due to listening to own game messages. Game messages ought to all be implied (and not sent), or sent but not executed until received.
2010-02-15 20:56:57 +01:00
Cyp 8991ed6e76 newnet: Replace use of NETMSG with NetQueue. Breaks multiplayer, which never really worked, anyway. Compiles, links and runs, but freezes in multiplayer. 2010-02-15 20:56:56 +01:00
Cyp a336d6455d newnet: Rename lib/netplay/nettypes.c to lib/netplay/nettypes.cpp. 2010-02-15 20:56:56 +01:00
Cyp 9635b01ef0 newnet: Add NetQueue class. 2010-02-15 20:56:55 +01:00
Cyp e1bfee9a4c make: Better (hopefully) hack to fix broken dependency files.
Probably closes ticket:1590.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9817 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:08 +01:00
dak180 5fc308b749 More encoding fixes and fix some names.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9816 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:08 +01:00
Per Inge Mathisen 47beb57842 Fix saving water level heights. Existing savegames with wrong heights remain wrong.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9815 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:08 +01:00
Giel van Schijndel 946c9965f2 Replace ''all'' usage of BOOL in lib/framework with bool instead
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9812 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:08 +01:00
Giel van Schijndel b3ea108cce Replace some BOOL usage with bool
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9811 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:07 +01:00
Giel van Schijndel ad3b3c9f06 Mark functions internal to data.c as static
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9810 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:07 +01:00
Per Inge Mathisen 018b64662c Forward port a fix from 2.3 for bad visibility data when changing missions
that closes ticket:1546 and closes ticket:1524


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9809 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:06 +01:00
Per Inge Mathisen 823cf96eeb semperfi AI: Rewrite base expansion code - teach AI to spend like a drunken sailor when it
has too much power on its hands. Fix some bugs. Guide it to research mg tower and the first
power upgrade.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9807 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:06 +01:00
Cyp f4ed16feea logical: Use graphics time for spinning on victory. Makes victory animation smoother.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9805 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:05 +01:00
Per Inge Mathisen 90b398b3d0 Revert r9800 - if you did remake your keymap after this commit, re-remake it again.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9804 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:05 +01:00
Cyp d5a69618ce logical: Fix bug in confusing illogical mess of random units which caused (at least) VTOLs to roll.
Closes ticket:1586.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9803 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:05 +01:00
Buginator 468c0b7c6b Thy creator creates (r8069) and now I must show him the inevitable.
Reset your keymaps, debug mode enabled, select thy subject and hit left shift delete :)



git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9800 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:05 +01:00
Buginator b3b29140a2 Take into account if a user is upgrading the factory when deciding if we should drop a artifact or not.
fixes the issue in r9786

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9794 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-13 23:05:01 +01:00
Per Inge Mathisen d254e6a339 Remove duplicate points removal in PIE loader. Closes ticket:1582 Reviewed by Safety0ff
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9793 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-13 23:05:01 +01:00
Per Inge Mathisen 7b7aca3ce0 Remove 5878 duplicate points in PIE files. See ticket:1582 Reviewed by Safety0ff.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9792 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-13 23:05:00 +01:00
Per Inge Mathisen 303a4d20ba Fix texture file references in base wz wall PIEs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9791 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-13 23:05:00 +01:00
Per Inge Mathisen f3affb4c58 simplipie: Add duplicate point removal.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9790 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-13 23:05:00 +01:00
Cyp 12c488c70d Fix race condition in pathfinding caused by -Wdeclaration-after-statement. Pathfinding jobs should no longer get lost.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9788 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-13 23:04:59 +01:00
Buginator 5d772d4b6f Only drop artifacts on a fully built factory
fixes ticket:1574

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9786 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-13 23:04:59 +01:00
Buginator c2fc183703 Fix a dangling pointer issue concerning the text input.
patch reviewed by vexed.

fixes ticket:1480
Thanks to the excellent detective work by Ai_Tak !


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9784 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-13 23:04:58 +01:00
Buginator aeaab52615 Add a new directory name 'logs' (in config dir) to store all our netplay logs in.
fixes ticket:1564

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9778 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:35 +01:00
Guangcong Luo 815725c039 Apply patch #1474 - Fix sync issues involving alt-orders.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9777 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:35 +01:00
Guangcong Luo 88b7093f95 Fix bug #1527 - droid->actionStarted sometimes not initialized.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9775 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:35 +01:00
Giel van Schijndel 40208015e4 string_ext.h doesn't actually use frame.h, so don't #include it
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9774 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:35 +01:00
René Jürgens ee1aad0d42 NTW Mod Version 1.8.9
- Fix Templates Bug
- Fix Scourge and Arch Angel Balance
- Fix Command Center Limit
- Fix Illogical Tech Levels

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9772 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:34 +01:00
Per Inge Mathisen 22039c1969 Check against AI building in a gateway, as this can seriously block AI passages.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9771 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:34 +01:00
Per Inge Mathisen b084022d5e Clean up function pickStructLocation() - stylistic changes only.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9770 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:34 +01:00
Buginator c8340c4e43 frontport r9768
"Do away with the illogical cruff in clearPlayer() since it didn't make sense to remove the oil _feature_ (and only for player 0!?) when a player leaves the game.
It is now simplified to destroy everything, and if we want the effects on or off for the destruction.

fixes ticket:1558 "


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9769 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:34 +01:00
dak180 6ff43cbbaa Correct some encoding issues and typos in the strings files.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9767 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:34 +01:00
i-nod d457d866ba - Aivolution has been removed from the MinGW build system and NSIS project
- NSIS: Aivolution and Original remnants should be removed from target system before installing new files
- NSIS: Force admin-privileges in UAC (they are required anyway), this will allow correct SM shortcuts removal possible on Vista/7


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9764 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:34 +01:00
Per Inge Mathisen c4fddbc513 A new in-progress rewrite of large parts of the current AI. Kept in a mod while it is being
worked on, to avoid breaking other people's testing and skirmish saves unnecessarily.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9763 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:33 +01:00