Commit Graph

2332 Commits (1ed72f87abf0793051dea02837c10db91b64add7)

Author SHA1 Message Date
Giel van Schijndel 1ed72f87ab Don't use EPIPE when it doesn't exist
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9973 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-22 01:00:19 +01:00
Per Inge Mathisen 21bd0ffdc3 Fix assert if socket set not allocated but socket needs to be deleted. Patch reviewed by cybersphinx and Giel.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9968 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-22 00:50:38 +01:00
Per Inge Mathisen 9bbf6a655c Sync up network changes from 2.3
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9964 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-22 00:50:38 +01:00
Giel van Schijndel 2c09022412 NetPlay refactoring:
* Rename addSocket to more descriptive SocketSet_AddSocket
 * Rename delSocket to more descriptive SocketSet_DelSocket

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9952 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 21:50:20 +01:00
Giel van Schijndel 401723958c Make backtraces regarding FD_SET related crashes (see #1136) more useful
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9950 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 21:50:20 +01:00
Giel van Schijndel d96986488f Netcode, refactoring: move setting of (SOL_SOCKET, SO_NOSIGPIPE) to a function rather than duplicating code
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9939 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 16:50:45 +01:00
Giel van Schijndel 2322e1f03d Use a decently named constant for passing to setsockopt(SOL_SOCKET, SO_REUSEADDR)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9938 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 16:50:45 +01:00
Giel van Schijndel 36cd206534 Netcode: slight refactoring, move connection status checking into a separate predicate function: connectionIsOpen
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9937 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 16:50:44 +01:00
Buginator d03dbc0a87 If we were in the middle of a file transfer, and we abort out, close filehandle.
If a file exists, but we can't read it (for whatever reason), then leave the game 'nicely', and abort out of game, since it is a fatal error.
(2.3: r9923)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9927 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 06:50:54 +01:00
Giel van Schijndel f02cd084d9 Copy paste error, make sure to use the proper file descriptor
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9921 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 01:50:21 +01:00
Giel van Schijndel 4aa213a937 Do our very best *not* to receive SIGPIPE:
When possible do:
 * Set socket option SO_NOSIGPIPE
 * Pass MSG_NOSIGNAL to send(2)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9917 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 01:00:16 +01:00
Giel van Schijndel d4b0ab8c21 Socket API, writeAll: Detect disconnects *before* we're slapped in the face with SIGPIPE
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9913 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 00:50:15 +01:00
Giel van Schijndel cfaaf057f5 Be nice and act according to POSIX spec and check for EWOULDBLOCK as well as EAGAIN
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9912 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 00:00:26 +01:00
Giel van Schijndel 74f4f8a1e2 Make sure that we definitly won't allocate memory while in the exception handler
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9905 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 20:50:23 +01:00
Giel van Schijndel 4bfa5e928d dumpinfo.cpp:
* Make sure that config.h is #included (for PACKAGE_DISTRIBUTOR)
 * addDumpInfo: don't (explicitly) convert the parameter to std::string
  - std::ostream already takes care of that ''if'' necessary (usually it isn't)
 * addDumpInfo: use a 24 hour clock (%H to strftime instead of %I)
  - more info in the same bytes!
 * sizeof instead of magic numbers

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9904 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 20:50:23 +01:00
Per Inge Mathisen 232a070ce2 Remove unused dead terrain code. From ticket:1616 by i-NoD.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9886 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 01:50:15 +01:00
Christian Ohm d6416c34eb Return 0 in the various _lex_destroy int functions.
Original patch by Seismo (WarningC4716(_2).patch).

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9884 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 00:50:15 +01:00
Christian Ohm a0f08bff1d Don't return a value in void function.
Patch by Seismo (WarningC4098.patch).

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9879 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 00:00:21 +01:00
Giel van Schijndel 60c55e4009 #undefine NOMINMAX before #defining it
Prevents warnings about #redefining previously #defined macros

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9869 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-19 18:00:09 +01:00
Buginator 6850d05a78 When player drops, and we were transferring a map to them, abort the send.
Reported by themac on IRC.

Show the progress of the map being sent, of each player, to the host.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9842 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-17 06:50:19 +01:00
dak180 a3f8200327 Step 1 of X in getting translations working on the mac.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9835 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-16 23:50:09 +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
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
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
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
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
Per Inge Mathisen 9bb288d1f4 Remove erroneous comment
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9745 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:18 +01:00
Cyp 4651724689 Move #includes out of extern "C" blocks, make STATIC_ASSERT work in C++.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9737 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:16 +01:00
Giel van Schijndel 392c08cd3c Use LOG_INFO to report non-existant playlist files (instead of LOG_ERROR)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9732 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:16 +01:00
i-nod cec20aae6a - NSIS changes from 2.3 (#1111).
- Additional fixes to [9642]: remove old-1.10-balance.wz instead of origianl.wz.
- MinGW build system updates.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9727 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:16 +01:00
Buginator 6a083086e2 Frontport r9650
"Add a error message about not being able to (re)allocate a string"

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9706 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:12 +01:00
Buginator a6d88bda6b frontport r9645
"Change netplay.log to netplay-xxx_yyy.log where xxx is the date, and yyy is the time. So people can have a history of all their MP games, and they can upload said file to us.

This log is in the config directory!"


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9705 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:12 +01:00
Buginator dbdbd4f1a3 frontport r9644
"Change / add a few log WARNINGS to INFO instead, to track down why the game thinks that people have left when they haven't, and also fix the bug of not destroying the player who dropped / left feature(s).

fixes ticket:1020"

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9704 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:12 +01:00
Cyp 238d42c0f8 logical: Use separate pseudorandom number generator for game decisions, which should at some point be made to be synchronised between clients.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9670 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:09 +01:00
Cyp abe95f17ff logical: Bump updates per second to 10, since 3 was just for testing.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9668 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:09 +01:00
Cyp 709e9c677d logical: Fix droid legs disappearing during first update interval.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9665 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:08 +01:00
Cyp f6cff80f6b logical: Completely use graphics time for effects.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9663 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:08 +01:00
Cyp 162157ef5a logical: Rename some things. Fix when not updating fast enough.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9659 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:07 +01:00
Cyp 92225b6b18 logical: Make some projectiles animated in-flight.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9656 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:05 +01:00
Cyp a99ef4ba19 logical: Logical updates.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9655 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:05 +01:00
Christian Ohm d6113fa149 Clear buffers on start and exit.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9633 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:03 +01:00
Per Inge Mathisen 4b008a7f67 Fix texture disapparance act in hudless mode. Patch by Safety0ff. Closes ticket:1421
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9629 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:03 +01:00
Per Inge Mathisen d21f071e8c Fix truck texture glitches in trunk by turning on face culling. Patch by Safety0ff. Closes ticket:1503
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9628 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:03 +01:00
Per Inge Mathisen 5799b53f99 Add rendering support for the TRANS_FILTER transparency mode.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9621 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:01 +01:00
Per Inge Mathisen 6f5a49387f Clean up the definitions of the rendering modes.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9620 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:01 +01:00
Per Inge Mathisen b28f8d36e0 Remove client socket from socket set when a client unexpectedly disconnects, and let other
clients know about this event. Patch reviewed by Cyp_.  Closes ticket:1515


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9607 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:59 +01:00
Cyp 4e72da7a2a lib/netplay/netplay.c: Change two more don't-while loops into do-while loops.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9598 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:58 +01:00
Buginator 7266552505 Fix for 64bit compilers.
Reported by atis_home  (thanks!)

closes ticket:1523

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9594 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:58 +01:00