Commit Graph

1671 Commits (8b891888c97776c12618660be7026f4449351ed6)

Author SHA1 Message Date
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
Giel van Schijndel 99be7db2f4 Update Code::Blocks project to match:
* removal of bullet.h in r2060
 * renaming of base.h, bulletdef.h and weapons.h to basedef.h, projectiledef.h and weapondef.h respectively in r2063

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2080 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 23:12:34 +00:00
Giel van Schijndel 33a8ba3a18 * Fix column description id->volume (change copied from r2059 which was a patch by Martin Koller)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2078 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 22:17:32 +00:00
Giel van Schijndel 6e23e99afc * #include "lib/sound/audio.h" in the implementation files that need it rather than in a header file which doesn't use it at all
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2077 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 22:14:47 +00:00
Giel van Schijndel b10e316999 * Make all (I hope I didn't miss any) references to audio filenames lowercase (as all audio files themselves have a fully lowercase name)
* Fix two typos of wrong filenames (these two are not case mismatches) in audio_id.c (one used a ',' instead of '.' and used wav as extension, the other missed a '-')
 * Don't use case insensitive matching of filenames in audio_GetIDFromStr anymore as our filesystems aren't guaranteed to be case insensitive (this should cause no problems together with the above fixes)
 * Use calloc instead of malloc and a for-loop to allocate an array of NULL pointers in sound_Init

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2076 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 22:11:04 +00:00
Per Inge Mathisen a8e813fbbd Another small cleanup to movement code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2075 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 21:33:12 +00:00
Per Inge Mathisen edf0a59a2e A bit cleanup to movement code, and sprinkle a few asserts to find the moveCalcTurn bug.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2074 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 20:58:37 +00:00
Per Inge Mathisen bc383a6997 Fix projectile crash. Iteration became screwed up sometimes when a projectile
object was free()d and its memory was overwritten before we had time to iterate
to the next object in the list. Now we delay free() until after updates are done.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2073 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 20:55:50 +00:00
Per Inge Mathisen aa061810a5 Call the reference counting primitives when releasing objects. Ensure
that we take dead structures off the grid map immediately.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2072 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 18:46:07 +00:00
Per Inge Mathisen 99cf7adee0 Overwrite, instead of append, debug logfiles.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2071 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 18:31:37 +00:00
Per Inge Mathisen f94ff0ce9d New .sta file format in plain text. This should fix problems people have had
with corrupted player name and such when mixing 2.0 and 2.1 versions, or old 
and new versions of 2.1.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2070 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 18:14:25 +00:00
Per Inge Mathisen d079d6cf08 Make sure projectiles are not assigned to dead targets. Some cleanup.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2069 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-13 17:36:31 +00:00