Commit Graph

53 Commits (75d615d1344a5904d06fbd42cd5a957b0351256d)

Author SHA1 Message Date
Giel van Schijndel 45dc51512b * Add a new function transporterIsEmpty to determine whether a transporter holds no droids
* Allow sending of transporter droids when they're empty

Addresses ticket:5

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5681 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-27 13:38:17 +00:00
Giel van Schijndel 855ec725d4 Use sstrcpy|sstrcat instead of strlcpy|strlcat for manipulation of statically sized strings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5176 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 13:46:49 +00:00
Per Inge Mathisen be566a7d6d Add -Wcast-align and -Wmissing-declarations to autoconf debug builds, and fix warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4403 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 23:28:44 +00:00
Dennis Schridde 10f2ccfd56 TRUE->true, FALSE->false (except in scripts)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:51:17 +00:00
Per Inge Mathisen d9e5d4a54b Try to fix bug #11261 with some added basic sanity checking to random gifts.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4133 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-17 21:57:01 +00:00
Per Inge Mathisen a07da6772c Wrap several access to asPower with getPower().
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3792 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 21:48:51 +00:00
Per Inge Mathisen f3fd0e6fe4 Fix bug in the sending of research gifts. We cannot delay the NETend() call for long,
because other codes like to use the netcode, too.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3786 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 20:25:31 +00:00
Per Inge Mathisen 0fbcf9399b Fix another NetMsg vs duplicate buffer bug. Also assert corect packet type
when decoding them.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3774 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-13 20:25:12 +00:00
Giel van Schijndel f558eb0d61 Revert unintentional part of r3612
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3613 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-30 23:39:31 +00:00
Giel van Schijndel 4f93b03142 Make function-pointer array pLoadFunction a local (but still static) array instead of global
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3612 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-30 23:38:05 +00:00
Per Inge Mathisen 17f8c1b4c3 Fix port of gifts code to new net code. Transports can no longer be gifted away to
circumvent sleeping dragons in this code. Patch by Buginator in patch #939 with changes by me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3542 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-22 19:49:03 +00:00
Giel van Schijndel 30b9c1d6b1 Fix two Doxygen errors:
* parameters `weaponClass` and `impactSide` of featureDamage() didn't have a description
 * parameter `subType` was wrongly referrered to as `type` of function sendMultiPlayerFeature

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3415 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-09 12:18:36 +00:00
Freddie Witherden 9099584718 Fix a bug introduced in r3339, thanks to Buggy for the heads up.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3400 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-06 22:44:42 +00:00
Giel van Schijndel dfc4e101ad * When cheating ourselvs new features & droids (in the CTRL+O debug menu) make sure to notify other hosts & players of this
Patch #920 with some modifications by me to make it compile and slightly simpler


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3399 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-06 21:55:23 +00:00
Freddie Witherden 848f5a233b Commit a modified versiob of patch #915 which fixes picking up artefacts in MP.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3368 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 21:26:44 +00:00
Giel van Schijndel e8be7978e6 * Make some functions const correct
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3151 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 11:59:47 +00:00
Giel van Schijndel b133979966 * Backport changes to src/multigifts.c and dependent changes to other files from netcode branch to trunk
* Utilize the net primitives API for sending & receiving of different types of gifts

Patch #888 by EvilGuru


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3123 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 18:51:45 +00:00
Giel van Schijndel 50c444f6e6 * Apply a large quantity of style changes from patch #888 by EvilGuru (it's a backport from the netcode branch btw) (to reduce the diff-size of it)
* Remove some useless casts
  * Rewrite some "else { if (X) { } }" statements to "else if (X) { }"
  * Rewrite several "if (X) { if (Y) { } }" statements to "if (X && Y) { }"
  * Remove some commented out (and sometimes also duplicated) code
  * Add some tiny bits of comments here & there


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3119 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 00:30:27 +00:00
Giel van Schijndel 75753bc3f8 * Replace two uses of strcpy() with the safer strlcpy()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3118 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 00:00:16 +00:00
Freddie Witherden c4fe7ad919 Update BASE_OBJECT and friends to use Vector3i.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3065 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 15:39:29 +00:00
Per Inge Mathisen c3f5cd3183 Only psDroid->psActionTarget is actually used for multiweapon targetting.
psDroid->psTarget is only used for orders, where multiweapon has no meaning.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2797 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 17:20:25 +00:00
Per Inge Mathisen 8b14087c3a Remove multiweapon orders. Multiple weapons do not need separate orders.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2782 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 17:31:37 +00:00
Stefan Huehner 3b3199b7f9 remove the text.h include from a lot of files
which dont need its declarations


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2691 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-03 17:49:53 +00:00
Roman C 8d7c7810ec Scripting engine update:
- some functions dealing with structure quantity at some location now additionally take a boolean which indicates whether half-built structures should be ignored (stock AI is updated accordingly)
- added sqrt() and exp() functions
- added friendlyWeapObjCostInRange() function to calculate cost of friendly units within a certain range
- CALL_RESEARCHCOMPLETED now additionally returns structure that has completed research and its owner

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2495 4a71c877-e1ca-e34f-864e-861f7616d084
2007-09-29 15:04:25 +00:00
Giel van Schijndel 75f820d1b1 * Replace the last of "<< TILE_SHIFT" and ">> TILE_SHIFT" usage with world_coord and map_coord respectively
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2490 4a71c877-e1ca-e34f-864e-861f7616d084
2007-09-28 19:25:21 +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
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
Per Inge Mathisen fc3d29124d Weed out some deadwood from the multiplayer code, and fix a warning.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1653 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-17 14:00:15 +00:00
Stefan Huehner fef987633f Convert some more strresGetString calls to using the
new gettext style. As per Mailinglist post
'Gettext - part2'




git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1355 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-03 17:31:30 +00:00
Per Inge Mathisen c232641119 Copy strings back into the C code, and make them translatable by gettext.
Thanks to Huehner for writing the script that transformed calls to strres
back into C strings.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1325 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-01 20:15:46 +00:00
Giel van Schijndel d659136496 * move audio_id.[ch] to lib/sound (because the soundlib depends on it, and libraries shouldn't depend on the main source, i.e. src/)
* further remove audio_GetIDFromStr from src/aud.c and rename audioID_GetIDFromStr (from audio_id.c) to audio_GetIDFromStr
  * also changed calling method of audio_GetIDFromStr, now it returns its retrieved value (ID index number) rather than writing it in a pointer given as parameter

PS MSVC project might be broken, I don't have it so can't check nor fix it

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1288 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-27 18:59:03 +00:00
Dennis Schridde 2a74242eb3 - Replaced various vectors with Vector3i and Vector3f (idea by Watermelon)
- Vector3i from lib/ivis also used in lib/audio, maybe want to move it to some more generic place?
- Replace iPoint with Vector2i
- Remove additional integer type declarations from pietypes.h
- Rename all iSprite to iTexture
- Various warning fixes: Unsigned/signed comparisons, uninitialized variables, declared but not defined symbols
- Replace DEBUG_BLOCK with DEBUG_MALLOC (it was virtually the same)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1245 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 16:20:16 +00:00
Dennis Schridde 49ceba7503 Add GPL notices to all sourcecode files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-15 20:09:25 +00:00
Roman C f3e0227b45 Patch by Watermelon:
-fixes disappearing oil derricks (bug #7740)
-allows structures to have multiple weapons (structureweapons.txt format changed)
-fixes muzzle flash for 2nd and 3rd weapon

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@857 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-25 17:38:27 +00:00
Dennis Schridde fb74a1f8dc Patch by Thomas Rast: Include string.h against warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@821 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-06 14:40:07 +00:00
Dennis Schridde 67056c8d24 - Droped a lot of (nearly) unused types from lib/framework/types.h
- Remove lots of unused functions (Windows/DDraw related)
- Now store the used bitdepth in the config and thus make it configurable without having to modify the sourcecode


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@808 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 01:11:26 +00:00
Roman C aa25866177 -Fixed AIs getting renamed when changing player number in MP games.
-Prevented NETbcast() from flooding the log in games with no network communication.
-orderDroidObj() scripting function will no longer cause ASSERT when DORDER_DROIDPERAIR is passed as parameter.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@773 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-02 17:58:10 +00:00
Roman C b7627bd9c8 Minor cleanup: replaced VOID with void.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@772 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-30 23:57:38 +00:00
Roman C 01259aaab9 -fixed and enabled shared ally vision for TEAMPLAY and 'Locked Teams' modes
-fixed disabled players allying their team members
-reenabled God Mode (Ctrl-G) for Debug builds and campaign mode

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@769 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-28 02:11:19 +00:00
Roman C 9aaae50baa Replaced 'Humans vs AIs' with 'Locked Teams' alliance mode.
Fixed difficulty slider applying settings to the wrong players.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@763 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-26 18:14:05 +00:00
Dennis Schridde 3261a09baf BIG cleanup of headers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@749 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-23 17:24:55 +00:00
Roman C 741250cef3 -Added "Humans vs AIs" alliance mode: Humans and AIs make 2 teams, alliances cannot be created or broken
-Added now frontend texture to frend.img
-Disabled "Allied players send vision to each other automatically (only once)" for "Allow alliances" alliance mode, since (x allied y) is not a transitive relation in this mode

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@744 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-21 20:42:48 +00:00
Dennis Schridde 728b9a9913 - Commit patches "code cleanup: void" and "code cleanup: const" by Stefan Huehner
- Replace every occurence of VOID with void (and LPVOID with void*)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@703 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-13 09:09:05 +00:00
Roman C a9a74444a1 Added beacons for skirmish and multiplayer, default key combination: Alt+H.
Allied players send vision to each other automatically (only once)
Fixed caching problems for variables of type GROUP
Some other scripting engine updates and cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@647 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-26 15:50:47 +00:00
Dennis Schridde 0e288f45e7 - Replace all ASSERT(( )) with ASSERT( )
- Simplify definition of ASSERT(). Now is the same for GCC and MSVC.
  This may not work on versions older than MSVC 2005. If you experience this, please report it!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@613 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-23 12:58:48 +00:00
Dennis Schridde 62ae49b0ce Replaced all occurences of DBMB, DBPRINTF and DBERROR with their former define.
( DBPRINTF(("Message")); becomes debug( LOG_NEVER, "Message" ); )



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@608 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-22 14:28:49 +00:00
Roman C 8447972580 Added new scripting functions, cleaned up flex debug output
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@600 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-21 15:33:49 +00:00
Per Inge Mathisen a3df2ad6c8 Another force fix. Remove more references to DirectX.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@552 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-10 13:53:26 +00:00
Per Inge Mathisen 081ec89b32 Remove legacy graphics code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@550 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-08 20:03:05 +00:00