Commit Graph

1582 Commits (74c29b312fa30a900a0f8ae6de032caeac7c33f1)

Author SHA1 Message Date
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
Per Inge Mathisen a31285a651 Fix lassat crash where its target would not be updated. Turn some asserts
for AI building defense buildings in the wrong place into log messages. Fix
those more properly later!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2098 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 18:01:12 +00:00
Per Inge Mathisen 5f0a762669 Fix segfault with lassat in recently added assert
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2097 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 16:43:11 +00:00
Per Inge Mathisen 175b7cf4d6 Fix crash in pie_Draw3DShape2() when starting skirmish twice without quitting.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2096 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 14:21:56 +00:00
Giel van Schijndel 2bb8afe647 * Check whether g_apTrack == NULL since that is a valid state when audio is disabled
* Add some additional info about which track is being asked about into the assert

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2095 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 14:19:14 +00:00
Per Inge Mathisen d1b82698ce Fix bug introduced in r2086 which would give droids trouble avoiding obstacles.
Thanks to Troman for pointing out the problem.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2094 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 13:48:11 +00:00
Roman C db66f6c053 autogame feature update: after enabling autogame feature, make ai use droids built while autogame feature was off
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2093 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 13:40:22 +00:00
Dennis Schridde c08c2ba7eb Fix MSVC to have C99 isfinite().
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2092 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 12:49:20 +00:00
Per Inge Mathisen 998ebd166b MSVC does not support finitef() either, so remove assert instead.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2091 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 12:45:22 +00:00
Per Inge Mathisen 416504797b Use finitef() instead of isfinite() because isfinite() is C99 and therefore
not MSVC compatible.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2090 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 12:26:02 +00:00
Per Inge Mathisen d416f78650 Fix moveCalcTurn bug. If we are standing exactly on our last waypoint, our
driving angle will be infinite. Instead, make it (0, 0), which is more sane.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2089 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 12:21:21 +00:00
Per Inge Mathisen bd49bb3bc3 Clean up moveGetDirection(). Next step: Fix the bug in it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2088 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 11:42:04 +00:00
Per Inge Mathisen 4e86088118 Remove a ton of unused movement code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2087 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 11:25:08 +00:00
Per Inge Mathisen 939003a47f Remove a ton of useless MAKEFRACT casts used in the old pseudo-float code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2086 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 10:59:04 +00:00
Dennis Schridde d4feb045d9 PIE-Blender v1.0 by Kage.
Amoung a lot of changes here come:
- Handling of polygons referencing the same vertex more than once.
- Nicer GUI.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2085 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 10:22:05 +00:00
Giel van Schijndel 83ef0a6e3c * Make audio_SetTrackVals return the track ID number rather than write it into a pointer given as parameter (failure is now indicated by a zero value instead; non-zero indicates success)
* Move a large portion of code from audio_SetTrackVals into sound_SetTrackVals (audio_SetTrackVals only checks whether sound is enabled now, the rest of the job is entirely delegated to sound_SetTrackVals)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2084 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 23:39:40 +00:00
Giel van Schijndel 9de99e7d33 * Don't use (void) as parameter list for the function implementation (this is only required for function declarations, not implementations)
* in sound_GetAvailableID start looking for available IDs starting from ID_SOUND_NEXT, not zero (0) as that might cause ID collisions when used in conjunction with the hardcoded IDs in audio_id.*
 * Make ID_SOUND_MAX be equal to the highest ID number (of the ID set defined in audio_id.*) rather than one more (since this is what "max" suggests: the highest number, not one more than the highest number)
 * ID_SOUND_NEXT is now one higher than the highest ID number and can be/is used where one higher is required

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2082 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 23:25:29 +00:00
Giel van Schijndel bc40797884 * Remove global var `static SDWORD g_iMaxSameSamples` from track.c which was only ever written to (not read from)
* Remove parameter `SDWORD iMaxSameSamples` from sound_Init who's value was only used to set g_iMaxSameSamples

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2081 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 23:15:24 +00:00