Commit Graph

1599 Commits (3f342f72a94f77d29a830476f2888647f3859741)

Author SHA1 Message Date
Giel van Schijndel 3f342f72a9 * Fix spelling error in MSVC project file (got there due to my manual conversion probably)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2168 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 12:05:07 +00:00
Giel van Schijndel e89edb7fbb * Use forward slashes for commandline arguments to makensis.exe because NSIS uses forward slashes on windows, while it uses dashes on GNU/Linux; (doh! inconsistencies aren't good!)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2167 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 12:00:21 +00:00
Giel van Schijndel ed12db0b4f * The raw makefile system (wrongly) depended upon the GNU FileUtils ("rm" to be precise);
* we now use "$(RMF)" (which expands to "del /f") instead of "$(RM)" (which expands to "rm -f")

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2166 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 11:54:36 +00:00
Giel van Schijndel d3628a0d11 * Don't use (void) as argument list for functions anymore; with C++ this is implicit when using (), a variadic function has to be explicitly declared using (x, y, ...)
* Replace BOOL, TRUE and FALSE with bool, true and false respectively
 * Use the initializer list of the constructor instead of its function body for member variable initialization
 * Replace usage of "operator delete" with "operator delete []" where the respective pointer had its memory allocated using "operator new []" (not doing so may cause heap corruption)
 * Don't if (pointer != NULL) delete pointer; since delete NULL is a valid no-op.
 * declare variables in a more local scope
 * Use algorithms instead of custom implementations; e.g. std::swap rather than { tmp = x; x = y; y = tmp}
 * Use reintrepret_cast<T> at some places instead of a C style cast, since these casts are really bad in this case (i.e. unnecessary), but they're easier to recognize this way

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2165 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-23 14:51:22 +00:00
Per Inge Mathisen 2e24b34ef7 Fix oil animation. Enable "kill" and "get off my land" cheats in single
player skirmish.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2164 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-23 11:30:26 +00:00
Per Inge Mathisen 59768447c6 Remove some overzealous asserts
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2163 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-23 10:47:26 +00:00
Per Inge Mathisen ca6d31dc6c Remove unused POWER_STATS
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2162 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-22 13:22:01 +00:00
Per Inge Mathisen fcc8c41fe9 Hide share research and share vision buttons in intelligence dialog when in
locked teams mode. Patch #773.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2161 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-22 11:34:34 +00:00
Per Inge Mathisen dcfe102699 Fix bug in removal of baba player in campaign if too many human players.
Also add some fallback in case server sends us a bad player number.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2160 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-22 11:12:50 +00:00
Per Inge Mathisen d94d7ea9ea Remove force editor. Nice widget, but nobody knew what to do with it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2159 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-21 17:22:30 +00:00
Per Inge Mathisen f9a3adeaba Rename multiplayer game mode "Campaign" to "Mayhem" mode. Remove possibility
of alliances in this mode, and always add scavengers. Note that this mode
will not work if there are eight human players, and I do not know exactly
what will happen in this case. A check to remove scavengers has been added, 
but not tested. The problem is of course that scavengers need a player, too.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2158 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-21 16:44:38 +00:00
Per Inge Mathisen cc17f21df5 Remove templay related code in scripts. Sorry for breaking skirmish for a few minutes :)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2157 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-21 16:41:53 +00:00
Per Inge Mathisen 45b4dfb7b7 Remove unused "death match" game mode code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2156 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-21 15:52:33 +00:00
Per Inge Mathisen ac131d745f Remove separate "team play" game mode. We now have proper team play
functionality in the skirmish game mode, so it is not necessary.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2155 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-21 15:39:00 +00:00
Roman C 2cce50c2ad Allow to disable all AIs in a multiplayer game with more than 1 human.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2154 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-21 14:18:40 +00:00
Giel van Schijndel 46a2f0ade2 * Remove some rather useless debugging printf statements
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2153 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-21 14:12:49 +00:00
Roman C 8fdfad5a67 Fix the second file checking end condition from the mp folder.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2152 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-21 13:16:56 +00:00
Roman C 74c29b312f Fix end condition checking for the multiplayer campaign game mode.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2151 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-21 13:13:21 +00:00
Per Inge Mathisen 74af7fefa1 Clean up missionDestroyObjects() and ensure that projectiles are free()d there.
Make sure that "let me win" cheat works again by fixing assert when grid is
updated with the base (non-off-world) units.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2150 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-19 22:15:17 +00:00
Per Inge Mathisen e3b98734d5 Fix crash when loading savegames and animations are not properly cleaned up first.
This is similar to the fix in r2050.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2149 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-19 21:15:22 +00:00
Per Inge Mathisen 77bc1dfd1d Fix bug #9542. Check that projectiles are within the map before updating them.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2148 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-19 20:30:53 +00:00
Roman C a23b19137f Added some commander templates for the ai.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2147 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-19 19:31:03 +00:00
Roman C 996502340c Scripting Engine:
-Added necessary scripting function to enable commander support for the scripts.
-Added a "group" member var to droids, to find out the group a droid belongs to.
-Added "type" member var to a script GROUP object, to find out the type of the group (commander group, transporter group etc).
-Added "commander" member var to GROUP, to find out the commander, a particular group belongs to.
-It is now possible to find out if a player has all necessary components to build a certain repair/command/cyborg engineer/cyborg mechanic droid using the scripts.
-Fixed a scripting function pushing a boolean to the script stack instead of an expected integer.
-Updated scripting manual.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2146 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-19 19:28:25 +00:00
Roman C d39bee2955 Replace magic numbers scattered around the code by defines.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2145 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-19 19:17:00 +00:00
Giel van Schijndel c8b99f0ae0 * Don't #include <boost/utility.hpp> and inherit from boost::noncopyable;
* Instead declare our copy constructor and copy assignment operator private, also we don't provide an implementation of those

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2137 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-18 22:01:07 +00:00
Per Inge Mathisen 86bee82372 Remove bad assert. psAttacker could be a PROJECTILE, which is not yet a full BASE_OBJECT.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2132 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-18 20:26:45 +00:00
Dennis Schridde 9dafbd404f More vector math, by EvilGuru. Minor changes by me (brackets around the ()^2 and swap RHS,LHS in the comment, so Kate's highlighting doesn't go nuts (yes, I know this is stupid...))
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2126 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-17 15:02:57 +00:00
Dennis Schridde 84f1d476e4 strings.txt removal by Martin Koller.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2124 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-16 17:44:42 +00:00
Dennis Schridde d9529e9d1c Localised data, patch by Martin Koller, slightly modified by me.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2123 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-16 17:19:47 +00:00
Giel van Schijndel 73401c14c9 Cleanup:
* Merge a nested if by using && to combine their conditions

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2119 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-16 10:08:00 +00:00
Dennis Schridde 7fb85e80a6 warnings.patch dated 20070716 by Martin Koller.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2118 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-16 09:46:40 +00:00
Dennis Schridde 0a5464c191 frame.h has to be always included before any other headers!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2117 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-16 09:38:35 +00:00
Per Inge Mathisen 00b0b8c322 Fix signedness warning
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2116 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 15:59:54 +00:00
Roman C a161bf8d00 - Added calcDroidPower() scripting function to calculate power required to build a droid.
- Updated scripting manual.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2115 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 15:53:41 +00:00
Per Inge Mathisen 451c5fdd8b Fix network bug that would send truncated float on the network, because
the network expected uint16. Introduced in r1524.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2114 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 15:52:44 +00:00
Per Inge Mathisen 6a25589a62 Add network statistics logging, to figure out which parts of the code consume
the most network bandwidth. Look in in the netplay.log file for this info.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2113 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 15:26:23 +00:00
Roman C f0fd2363da 1.10 AI:
Make sure cyborg engineers end up in the construction group and are used for construction.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2112 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 14:33:07 +00:00
Roman C fb5b691c3a Make cyborg mechanic and cyborg engineer droid types constants available for the scripts.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2111 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 14:31:06 +00:00
Roman C ccf43f38cb Fixed AI templates that had too many weapons.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2110 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 13:58:42 +00:00
Per Inge Mathisen e509767d23 Clean out some unused code from netplay.c|h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2109 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 13:48:22 +00:00
Roman C 7337171595 Show correct line number of the error in the input script file when using script includes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2108 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 13:11:09 +00:00
Per Inge Mathisen 851cd03367 Remove unused packet vtolrearm
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2107 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 13:08:59 +00:00
Roman C e5b9869719 Fix MSVC issue.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2106 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 13:02:40 +00:00
Roman C cd126ac034 Only bodies marked as HEAVY in body.txt are allowed to have 2 weapons. LIGHT and MEDIUM bodies can only have 1 weapon attached.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2105 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 11:01:05 +00:00
Dennis Schridde 807f41a852 - Further improve moveGetDirection.
- Extend the Vector library.
- Cleanup (more Vectors).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2104 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 20:13:24 +00:00
Giel van Schijndel 6b912bc40d * Remove duplicated function sound_TrackAudibleRadius (was an unused duplicate of sound_GetTrackAudibleRadius)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2103 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 19:56:10 +00:00
Giel van Schijndel ebff194ba7 * Remove some unused macros
* Remove a dual check of psTrack == NULL in sound_Play2DTrack (is already tested by invoked function sound_CheckTrack)
 * sound_GetTrackID now won't loop through a list of 600 pointers to find a match anymore if the given pointer is NULL

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2102 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 19:12:46 +00:00
Per Inge Mathisen b1a42e88ee Clean up drive code, and add missing header guard.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2101 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 19:09:44 +00:00
Giel van Schijndel 27bbae281b * Add a workaround for a crash in OpenAL triggered when shooting the first scavengers in the campaign
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2100 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 18:42:39 +00:00
Roman C 0a9388ca0f 1.10 AI Update:
-AI will now also build cyborg engineers
-fixed bug #9503

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2099 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 18:02:30 +00:00