Commit Graph

2588 Commits (b9b1a4bac74d321f9cf0d97b5cd552b6ce6b8362)

Author SHA1 Message Date
Gerard Krol c6690fa894 Only automatically repair completed buildings, and do not help build automatically anymore (was bugged). 2009-04-16 12:15:51 +02:00
Gerard Krol 72da02cf97 Power is now used directly when building, no power is accrued anymore. 2009-04-16 12:15:51 +02:00
Gerard Krol 510d8d7735 Construction droids now go help build a building instead of trying to repair it. 2009-04-16 12:15:51 +02:00
Guangcong Luo 795f7e65c5 Commit patch #380: Draw negative resistance correctly (patch submitted by Adam Olsen)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7029 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-15 20:36:59 +02:00
Gerard Krol ab377a74dd Use a default map of Sk-Rush to prevent victory from being declared after 10 seconds when starting a multiplayer skirmish game with the default config values. 2009-04-15 20:34:11 +02:00
Buginator f4574ef688 Change config directory for the trunk.
Yes, everything is now set to default values.
Do *NOT* copy over your old "config" file and "keymap.map" file from your old config directory!
You can copy these directories though:
savegame  (holds your savegames)
maps      (the ONLY place non default maps should be)
multiplay  (player stats)
music      (...)

See what a working svn host can do? ;)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7019 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:08 +02:00
Buginator e1c91576c9 Game server port is now 2100
Master server port is now 9990 

Updated masterserver python program as well.

merge: r6994

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7018 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:07 +02:00
Buginator 70ae5430ec Fix the backdrop for when people get kicked.
Reported by another Random Whiny User
merge: r7012
And typo fix merge: r7007

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7017 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:07 +02:00
Buginator 96bdc06fdd Fix a C99 issue that prevented compiles on MSVC.
Broken in r6998


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7015 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:07 +02:00
Buginator 7a6fa22b1e Version checking code.
If client connects to host, and they don't respond (within 7secs) to the version packet, then it will auto-kick them.
If client sends wrong version in the version packet, then it will auto-kick them.

Also adds kick message support, for the different types of kicks that we do.

merged from r6992
NOTE: trunk won't connect with 2.2.  This is *on purpose*, just testing version checking code for now.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7014 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:06 +02:00
Guangcong Luo dda2e8539a Allow queuing of DORDER_SCOUT (shift+click)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7009 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:06 +02:00
Guangcong Luo 854c6a6218 Fix line accidentally removed in r6996
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7000 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:05 +02:00
Guangcong Luo 8dab7fb36c Fix incorrect connection error display introduced in r6998
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6999 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:05 +02:00
Guangcong Luo fac8b8ffb9 Commit patch #366: Show "Connection error" in case of connection error
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6998 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:05 +02:00
Guangcong Luo e05e06dc80 Fixes a crash that should never happen in multiplayer, but still somehow did. Also cleaned up recvTextMessage().
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6996 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:05 +02:00
Buginator ae197163ec Fixes issue when a person starts a MP game, and aborts out (that is, starts a MP game, but then does *not* hit 'ready' and instead, aborts back to main menu).
If they then tried to start a SP game or load a SP game, it would crash, since it was still in MP mode.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6989 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:04 +02:00
Per Inge Mathisen 071ed52da0 Improved text for energy bar display. Patch by Adam Olsen in ticket:372
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6987 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:04 +02:00
Per Inge Mathisen aad6bc5341 Fix assert failure when trying to "build" demolition. Caused by either failure to reset
target stats when previous order was build and next is demolish, or when a droid is 
told to help demolish a building (hard to do because demolish is so fast, but possible).


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6986 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:04 +02:00
Per Inge Mathisen 5943e1fba1 Clean up intGetObject and improve its assert message.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6985 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:04 +02:00
Per Inge Mathisen acec2d7c6a Improve assert message in scrOrderGroupLoc when an order goes out of map bounds.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6984 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:04 +02:00
Per Inge Mathisen 5ee8538680 Improve assert message when getting the gridRemove crash.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6983 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-12 14:12:03 +02:00
Guangcong Luo 5c2aa2ba92 Commit patch #351: Hide resolutions smaller than Warzone supports.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6980 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-08 14:04:26 +02:00
Buginator c89229667b The video file (sequences.wz) is now added to the search path.
It will find the video files in data/sequences.wz  (the same location as the other .wz files that we use.)

Thanks to per for the renaming of the file on GNA.

fixes & closes ticket:322
backported from r6975



git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6978 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-08 14:04:26 +02:00
Per Inge Mathisen 509a618185 Test
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@6974 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-08 14:04:26 +02:00
Gerard Krol 5a2ff6f410 Allow structure baseplates to have transparency. 2009-04-07 12:18:14 +02:00
Gerard Krol 3b7fbcd837 Fix an array out of bounds error (off by one) that could occur when picking up an artifact during a multiplayer game. 2009-04-06 14:25:23 +02:00
Per Inge Mathisen cfe68c3602 Add radar detector turret to the game. It will detect and target enemy sensors up to twice their
range away. Both land and air droids can be assigned to it. See ticket #340 for more discussion.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6955 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-06 13:09:09 +02:00
Gerard Krol 90edf63fd2 Don't show smoke for a building that is under construction. 2009-04-03 22:39:38 +02:00
Gerard Krol 6b817fbcf5 Display both the health and build progress of a building that is under construction. 2009-04-03 22:37:36 +02:00
Gerard Krol 510b18497e Structures start at 10% health and gain more during construction. 2009-04-03 22:21:22 +02:00
Gerard Krol 55b2652b6c Replace spaces by tabs in structureDemolish. 2009-04-03 21:55:59 +02:00
Gerard Krol ca4bf40d2f Move the demolish code to it's own function in structure.c.
Also fix a bug that caused demolish to proceed exponentially. Demolishing now takes a fifth of the time needed to construct the building.
2009-04-03 21:40:59 +02:00
Gerard Krol ddf159ca4e Move the code for constructing a structure by a droid to a separate function in structure.c 2009-04-03 21:00:50 +02:00
Guangcong Luo 0644e25415 Commit patch #323 (Fix divide-by-zero crash when null pointer passed to getDroidDestination).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6923 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:59 +02:00
Giel van Schijndel f179b6f092 Allow compiling and linking with lib/framework/stdio_ext.h and src/version.h from C++ code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6920 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:59 +02:00
Per Inge Mathisen 7781fe6ab4 Fix problem that prevented information about enemy research to be shared between hosts.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6914 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:58 +02:00
Per Inge Mathisen 82a97e938e Various fixes to be able to compile (but not yet link) Warzone with g++
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6912 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:58 +02:00
Per Inge Mathisen 1b4559cb98 Remove dead code in intResearchFinished()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6911 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:58 +02:00
Per Inge Mathisen 60fe79b68f Fix ticket 342 - out of range path node crashes game
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6905 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:57 +02:00
Per Inge Mathisen 2ad693b643 Ticket 340 - implement basic support for partial visibility and radar power that diminishes by range.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6904 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:57 +02:00
Per Inge Mathisen 18ae6c42da Don't crash if some tech takes zero research points to finish. Problem found by Buginator. Also fix NTW sky texture names.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6903 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:57 +02:00
Giel van Schijndel e7d6676599 Document the meaning and purpose of BODY_UPGRADE's member variables
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6897 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:57 +02:00
Giel van Schijndel 9b8f292073 * Access arrays with array-indexing syntax
- i.e. array[index] instead of *(array + index)
 * Access a variable's size using sizeof(variable)
  - Instead of sizeof(typeof(variable)) * ARRAY_SIZE

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6896 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:56 +02:00
Per Inge Mathisen 2d6b971336 Remove dead code. Move variables into closer scope.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6894 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:56 +02:00
Per Inge Mathisen 34769c53f3 Wrap changes to cached sensor and ecm stats for objects into two new functions to clean up the code. Reviewed by stiv.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6893 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:56 +02:00
Per Inge Mathisen 264fc0d450 Remove dead code. One less unnecessary global.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6892 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:56 +02:00
Per Inge Mathisen 9d6734c767 Wrap access to psGateways behind an accessor. One global down, so many to go...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6891 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:55 +02:00
Buginator 93bae75382 Fix a few Asserts to give more info, and correct spelling.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6887 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:55 +02:00
Buginator 6dc7ff51bb Allow F10 to *always* be the screenshot key.
This also allows you to take screenshots of anything now. (main menus / game menus, FMVs*, and of course, in game)
*While it can do screencaps of a FMV, right now, it is setup to abort the sequence when you hit a key.  So that means only 1 frame from the FMV.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6884 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-20 21:22:47 +01:00
Git SVN Gateway 2ad4d5518f Merge branch 'master' of git@gitorious.org:warzone2100/gerard_ 2009-03-20 20:41:17 +01:00
Gerard Krol 68a623a6f0 No longer assert when the thing we want to display a blueprint of is not a building, it might be a droid or a feature from the debug menu. 2009-03-20 20:30:15 +01:00
Per Inge Mathisen 3ea41a0b2d Restrict private messages to 0..7 instead of 0..8, which can be more than the
maximum 8 number of players. Bug found by Buginator.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6876 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-18 23:57:48 +01:00
Gerard Krol a3b1bbf2c7 Add a check if deliveryPointToMove == NULL in the blueprint code and ASSERT. 2009-03-17 02:51:21 +01:00
Per Inge Mathisen f15c0292e8 Fix some issues with 'make dist'.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6853 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-15 23:30:57 +00:00
Dennis Schridde 852b81ea8b Replace C99 style variable declarations inside for() header with C89 style decls
Fixes #313

Author: Buginator
Signed-off-by: Dennis Schridde <devurandom@gna.org>

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6848 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-14 23:32:23 +00:00
Giel van Schijndel 4dc0520846 Add a FIXME note regarding the maxPlayers config setting (that setting is only required due to a design flaw).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6846 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-14 16:56:32 +00:00
Guangcong Luo a7674f82f2 Fix bug #309 - display.c errors can't compile
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6843 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-13 03:32:37 +00:00
Guangcong Luo 2340b9e81d Commit patch #291: Add option for right-click ordering.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6841 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-12 09:25:29 +00:00
Gerard Krol dc834b2a3a Place buildings using blueprints (green) instead of highlighting the ground.
The blueprint is a green transparent version of the building you want to build. It is bright green when the build location is valid and red when it is not. After the building is placed a darker version of the green building will remain until a droid starts construction.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6840 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 22:55:41 +00:00
Gerard Krol 380c32bb33 Rewrite map_Height so that the height it reports matches with what the terrain renderer shows.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6838 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 22:39:56 +00:00
Per Inge Mathisen aa7509fc84 Fix silly indentation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6836 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 16:21:22 +00:00
Per Inge Mathisen 4028c9f48f Remove dead code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6835 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 14:19:46 +00:00
Gerard Krol 652701af56 Give a detailed error message when glDrawRangeElements is not supported and shut down. This fixes #294.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6833 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 12:44:04 +00:00
Gerard Krol 71bc279c9e Fix some spelling errors in debug messages and comments. Patch by Paul Wise <pabs3>.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6832 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 11:51:40 +00:00
Gerard Krol 73d4569733 Load the new terrain textures when going from cam1->cam2 or cam2->cam3. This fixes bug #299.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6831 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 11:50:55 +00:00
Gerard Krol 21011fd176 Accept DORDER_NONE as a valid order to the orderDroid script function, needed for the BecomePrey AI. (committed for Buginator)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6823 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-09 17:15:44 +00:00
Per Inge Mathisen 3905de35cb When playing Mayhem mode, burning scavengers can crash (or rather, lead to assert failure)
the game because they may have nowhere to run when burning, and may trigger checks because 
they die while doing orders ("burn out"). The former should be properly fixed in scripts 
by always setting retreat coordinates, and the latter is rather bad design, but not 
changing it now.  Close bug #296. Reviewed by Gerard.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6820 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-08 17:57:44 +00:00
Dennis Schridde c18c426c73 Fix a crash when loading savegames by loading effects earlier
This works around a crash discovered when loading the savegame attached
 to #196 by loading effects earlier, which will initialise the effects
 system before we try to add new effects.
This is by no means an optimal fix, but given the messed-up state of game.c
 it was the fastest and most simple solution for the given issue.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6813 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-08 13:34:26 +00:00
Gerard Krol ab549ac68d Only enable the backdrop when pausing the game for both the design screen and the intelligence screen. This fixes bug 295.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6812 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-08 12:40:42 +00:00
Dennis Schridde d655d548f4 Effect memory pool cleanup
I played a bit with implementing a better memory pool for effects and this
 is what came out.

Major changes:
Allocates in chunks of 10k effects, uses free/used lists to speed up search
 for free and updates of active effects.

Benefits:
 * Unlimited number of effects possible.
 * Faster
   Not (yet) benchmarked, but logic dictates that iterating over MAX_EFFECTS
   is slower than iterating over just the number of active effects.

(Patch as posted to mailinglist.)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6807 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-08 11:45:08 +00:00
Per Inge Mathisen 5da9b30f7d Fix missing files in makefiles so that 'make dist' can be run again.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6792 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-07 18:09:58 +00:00
Gerard Krol 47f89c7fc6 Clean up the videoLoop and backdrop enabling/disabling code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6769 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-03 21:55:33 +00:00
Per Inge Mathisen 5e1895ac70 Branch merge in oil drum fix from 2.2 in r6764.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6765 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-01 23:50:18 +00:00
Freddie Witherden 677c52277e Remove some long-dead code in function.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6761 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-01 18:29:30 +00:00
Dennis Schridde cf10a5f45d More cleanup of effects
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6752 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 19:41:52 +00:00
Dennis Schridde bba65f6361 Unify spelling of effect setup functions
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6751 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 19:41:48 +00:00
Dennis Schridde 86cb5ff6d5 Cleanup effects (mostly const correctness)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6750 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 19:41:44 +00:00
Dennis Schridde 7e795ebf9f Const correctness (IMDs are never modified in bucket3d functions)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6749 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 19:41:40 +00:00
Buginator 119f48163f Add Asserts() to catch the bad player value
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6738 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 05:17:41 +00:00
Buginator fc8bbc5bd9 Feature fixes & enhancements.
*Adds LOG_FEATURE (--debug feature) so we can keep track of features.

*Disallow VTOLs from being able to poach features.

*Changes feature spawning from instant to a variable time period.

*When feature can't be placed, break out of routine instead of sending invalid data.

*Actually remove features, and notify others that the feature was removed. (AKA, actually sync between machines.)

ASSERT() when numNaybors is invalid.
Fix a spamming debug line mistakenly changed in r6677


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6737 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 03:36:26 +00:00
Buginator 19852d694c Changes big tabs to smaller tabs when you have many maps.
(It would crash after showing 4 'pages')

NOTE, if we have *lots* of maps (more than 7 pages), added ASSERT, so we will know we need to port over the scroll tab modifications to this routine as well.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6735 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 02:11:33 +00:00
Buginator f4fb5a269b Fixes issue with max / min player bug in host screen.
Basically, when you pick a 2/4/8p map, we didn't save that info along with the map.  This resulted in possibly starting 2/4/8p games with the wrong number of players set. (ie, 8p map with 4 players, or 2p map with 4 players)


Closes ticket #10  (I think it was 10--trac is down)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6734 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 02:04:09 +00:00
Buginator ca447ad076 Fixes crash issue when psWeapStats is still set to NULL (on init), when this pointer was referenced again.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6733 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 01:47:47 +00:00
Giel van Schijndel df35bb7cbe debug_console isn't a function anymore (it's a macro) so don't declare it as a function anymore
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6726 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-24 12:48:01 +00:00
Gerard Krol 104df92a88 Close the file when an error occurs while loading a map. PhysFS likes that. Gotoified from a patch by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6725 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 22:44:54 +00:00
Gerard Krol 22dd8d58f6 Make sure that the left edge of the radar stays a fixed distance from the edge of the screen when increasing the size of the radar.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6724 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 22:31:31 +00:00
Gerard Krol f7e9028969 Fix bug 278 (On C2M3 the map overlays are offset the terrain map). The scroll limits were not being taken into account for drawing the viewing window and the radar
blips.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6723 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 22:04:03 +00:00
Gerard Krol 73f68dcc55 Shift the lightmap half a tile so the red light will be centered on the landing lights again.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6722 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 20:05:42 +00:00
Gerard Krol fb2b2559ba Fix a bug introduced in r6719 that caused an attempt to draw an off-map sector, which resulted in an assert.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6721 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 19:19:22 +00:00
Gerard Krol 10ce0cc72b Scale down textures used for 3D when they exceed the size specified with the textureSize option. Also add two assert statements to check for the correct handling of the parameters for glDrawRangeElements.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6720 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 18:56:41 +00:00
Gerard Krol 6b1432d1e6 Clean up the glDrawRangeElements code and respect GL_MAX_ELEMENTS_VERTICES and GL_MAX_ELEMENTS_INDICES by reducing the sector size and not appending calls
when the limits would be exceeded. This probably will fix the crashes people with intel cards were having.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6719 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 14:03:34 +00:00
Gerard Krol 0cebae9c43 When the tileset is not set, default to Arizona (this fixes the map preview).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6715 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 12:00:17 +00:00
Giel van Schijndel baa232a17c aiexperience:
* Make functions not used outside of aiexperience.c static
 * Remove unused functions
 * Compose paths using sasprintf instead of nasty string manipulation with sstrcpy and sstrcat
 * Some general clean up to increase code readability
 * Move some variables into the most local scope where they where used
 * Use a for-loop instead of a while loop and put all the looping logic in the for () statement
 * Reduce several series (in functions CanRememberPlayer\w+Loc) of if-statements to a single logic statement with logical ands

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6714 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 01:26:18 +00:00
Giel van Schijndel 1849c5e721 * Rename printf_console to debug_console because it only prints messages to the ingame console in debug builds
* Define debug_console in terms of console()
  - debug_console does ''exactly'' the same as console() with the exception of debug_console doing nothing in non-debug builds, so #define debug_console to console() on debug builds and nothing on non-debug builds

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6711 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 00:21:46 +00:00
Giel van Schijndel f4c0ad23f0 Change global var oilResFeature to what it's used as: a pointer to a FEATURE_STATS containing the oil resource's stats
The previous variable contained an integer indexing into an array to point to the same stat

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6710 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 00:21:42 +00:00
Guangcong Luo 0d07f77411 Fix "you found power" message sent to players who weren't supposed to see it
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6705 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 22:22:17 +00:00
Freddie Witherden 0c2180e7c9 Remove the near-useless 'looser gifts' on account that no one has ever actually received them...ever.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6704 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 21:48:42 +00:00
Per Inge Mathisen 7248c712ac Remove dead code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6702 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 21:06:12 +00:00
Buginator cdc704b487 Adds debug() statements to sync code, and ups the sync rate a bit--not that it helps that much.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6699 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 20:11:15 +00:00
Buginator ebbac5e6e9 * Do NOT calculate power when we create a droid on local machine, since we *know* that the droid's creator had enough power to build it in the first place. Instead, we set the player's power at this point.
* Add more debug() clarification comments/lines.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6698 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 20:08:49 +00:00
Buginator b5e8e28001 Fixes Research topic crash
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6697 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 20:06:56 +00:00
Buginator 9d868d4c0c Adds LOG_LIFE to track when units are created.
(We already had LOG_DEATH)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6694 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 17:59:57 +00:00
Buginator 33ca3b9ecc Changes a few debug() lines to give better info.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6693 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 17:49:53 +00:00
Buginator 7aec5dd86a Fixes LaSat strikes again.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6692 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 17:44:58 +00:00
Gerard Krol 5601741b95 Brace for impact, this is the new terrain renderer!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6682 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 23:35:21 +00:00
Buginator 17de0cfaab Fixes issue with picking a 'invalid color flag' (for SP) in a MP game, and then trying to go to the game options screen to change whatever.
Also removes a spamming debug() line

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6680 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 22:54:58 +00:00
Buginator 19a76d4320 Blow up the walls as well when a player leaves/drops.
We don't need reminders of their wall building skills.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6678 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 22:16:25 +00:00
Buginator 9e0767ecfd * Fixes memory leak.
* Fixes eventFireCallbackTrigger which was called multiple times.

* LOG_NET is to *only* be used for network traffic, not for sync issues.

* Adds visual display about when player leaves/drops.

* Adds / cleans up debug messages concerning connection issues.

* Adds new message type NET_PLAYER_DROPPED, (as opposed to NET_PLAYER_LEAVING). One is when we lose a connection, the other is when a player quits 'normally'.


Will be adding icons from Ticket #247 done by Zarel soon.

NOTE: please use --debug net if you have connection issues!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6677 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 22:09:58 +00:00
Buginator 41749efffb Remove the duplicate 'win' & 'loss' message (/ video) from playing on game win/lost.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6675 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 21:43:19 +00:00
Buginator 3c6fb634f0 Adds some checks to detect NULL pointers in these two functions which resulted in crashes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6674 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 21:41:08 +00:00
Buginator 68888ac5a0 Adds a forgotten 'info' response when debug menu is opened.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6673 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 21:37:30 +00:00
Giel van Schijndel 6e1d019403 * Update SQLite stats database
* Fix loading of stats from the SQLite database (utilised in the campaign)

This fixes #276 and #269.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6670 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 21:09:37 +00:00
Freddie Witherden c5f23a0739 Move the modifyResources function into the body of loadPowerGenFunction on account that it is only ever called from there.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6669 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 15:58:03 +00:00
Per Inge Mathisen 8e3bd16a4d Remove dead mission code, and doxygenize mission.h a bit.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6667 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-19 21:37:13 +00:00
Freddie Witherden 8edf7e88e0 Simplify projectile range-clipping using the CLIP macro.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6666 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-19 21:18:08 +00:00
Per Inge Mathisen ac5170ab5d Remove more dead gateway code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6665 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-19 21:14:24 +00:00
Freddie Witherden 2f941b931f Remove the (mostly) dead function FeedbackClickedOn, replacing it with FeedbackOrderGiven.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6664 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-19 21:05:09 +00:00
Per Inge Mathisen 3e96bd6b1d Clean up mapLoad(), using physfs to read directly from file instead of casting structs to a memory buffer. Closes ticket:274.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6662 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-19 20:35:43 +00:00
Per Inge Mathisen d073d9cc7c Remove dead gateway<->zone code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6657 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-18 19:35:28 +00:00
Guangcong Luo c378975386 Commit patch #264 - Enable cursors on Mac OS X
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6655 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-17 05:24:15 +00:00
Per Inge Mathisen a95f8e221a Clean out some dead code from map loading.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6654 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-16 22:30:51 +00:00
Buginator e601d071d0 Fixes #267 (and Fixes #268)
"If teams are already set, and host clicks on no alliance, teams are not reset. "

So I reset them back to default.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6652 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 21:04:08 +00:00
Buginator a8be3ee501 LOG_NET should not be used for reporting sync issues. Use LOG_SYNC for that.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6651 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 19:30:51 +00:00
Giel van Schijndel 4d7cb371e7 iAudioFireID and iAudioImpactID aren't stored in the CSV files, so don't store them in the database either (for now)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6647 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 12:32:40 +00:00
Giel van Schijndel 57de43c140 * Generate CREATE VIEW statements in the SQL schema
* Use these VIEWs instead of rather complicated SELECT statements in the C SQLite loading code

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6646 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 12:32:29 +00:00
Buginator 46cac4d64b Fixes #169
Reset team status on new map picks.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6644 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 06:37:30 +00:00
Buginator 1b5f3fafca Fixes #258
Updates cheat routines to cover all possible cheat functions, so they are all now reported.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6643 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 06:29:54 +00:00
Guangcong Luo 84821b2a2f Commit patch #265 - Give player feedback when getting an oil drum
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6636 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 05:16:34 +00:00
Giel van Schijndel 0a45316b65 Fix compiling by using C89 style variable declarations
This fixes #256 (r6634 broke MSVC compilation); patch by Buginator

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6635 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-12 18:31:59 +00:00
Giel van Schijndel 0711b342ed Major (but partly) cleanup of actionUpdateDroid:
* Move variables into a more local scope
  - I don't think I screwed up start-at-block-declaration rules for MSVC, but given the size of these changes I can't be sure.
 * Remove a large amount of low level bit manipulation and replace it with arrays of boolean values instead
  - Yes bit shift and bitwise and where used; bitwise or was replaced with addition though
 * Don't use *WORD/*BYTE when we don't need the size guarantee (and the size guarantee is in fact an optimisation prone to introduce bugs)
 * "Concatenate" nested if statements into a single condition in a single if-statement
  - Less nested code to convey exactly the same meaning
 * Remove unused variable moveAction
  - It was only ever written to, but never read from

We don't need the size guarantee for WEAPON::nStat, so substitute "unsigned int" for "UDWORD"

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6634 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 22:00:47 +00:00
Giel van Schijndel 29bb57948c ''Properly'' document what some of WEAPON's member variables are (instead of stating the obvious):
* Do this for nStat and lastFired (which had "obvious" comments attached to them)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6633 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 22:00:45 +00:00
Giel van Schijndel 9bfd745549 Add a FIXME note to actionUpdateDroid indicating that it's in need of a major refactoring
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6632 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 22:00:40 +00:00
Per Inge Mathisen 50271ebc53 Do not abort() if we attempt to place a module on a non-existing building while loading a savegame.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6631 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 20:24:02 +00:00
Per Inge Mathisen 18abf8124c Add workaround for crash if you try to build a null structure. Bug found by Giel.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6630 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 20:03:00 +00:00
Dennis Schridde e64d525bc9 One more missing include
Noticed on MinGW

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6628 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 14:13:30 +00:00
Dennis Schridde 0cd964d6cb Moved some items out of effects.h, safened up map.h macros
fireOnLocation() -> map.c/h
SKY_SHIMMY -> display3ddef.h

map.h: TILE_IS_NOTBLOCKING() (macro) -> TileIsNotBlocking() (function)
 * reason: All others are "TileIs..." functions as well
 * affected: map.c, fpath.c

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6624 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 12:12:03 +00:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Dennis Schridde fcca92459c We no longer need to respect 8-char filename limits, be clear in naming instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6616 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:23 +00:00
Dennis Schridde 52b07e9cf0 Move piefixedpoint.h and pievector.h out of ivis, since they are quite generic
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6615 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:18 +00:00
Dennis Schridde 0c5d56b35a Move endian_* functions into a dedicated header and do not include it from frame.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6614 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:14 +00:00
Dennis Schridde cbbc58d1e9 Move files which extend a c std library header to a filename of similar name
Extension functions dealing with ...
 * strings are in string_ext.h
 * stdio (namely printf variants) are in stdio_ext.h
 * math are in math_ext.h

These headers are no longer included by frame.h

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6613 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:09 +00:00
Dennis Schridde 8050b17162 Cleanup
Incl: Move MAX_STR_LENGTH out of wzglobal.h, since it is only used in src

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6612 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:03 +00:00
Dennis Schridde 16c9241fa2 Rename Vector*_New() to Vector*_Init(), since that seems less confusing
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6611 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:22:59 +00:00
Dennis Schridde 4778917737 Fixup includes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6610 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:22:55 +00:00
Dennis Schridde 13f5044e0d Remove redundand macro
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6609 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:22:50 +00:00
Giel van Schijndel 516067dec0 Alter frandom's API such that it takes no parameters and returns a float ranging from 0.f to 1.f
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6608 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 22:51:41 +00:00
Dennis Schridde f1ae7b9620 Some simplifications and cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6607 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 21:53:40 +00:00
Dennis Schridde d1780335ee Make more functions static, remove unused functions, unify spelling
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6606 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 21:53:34 +00:00
Dennis Schridde b8ba70de36 Try to cleanup some magic numbers, variable scope, etc
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6605 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 21:53:30 +00:00
Dennis Schridde dd314e6cba Revert "TEMP Work In Progress TEMP"
That says it, doesn't it?

This reverts commit 9dd2471f34317d181479a75d3a41e703ca6649ac.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6602 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:54:30 +00:00
Dennis Schridde 10e935e6ee TEMP Work In Progress TEMP
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6599 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:53:01 +00:00
Dennis Schridde 882d6e76d9 Fix "infinite" flamer range
This should fix #53.
A projectiles death timer would be reset on penetration,
instead of dying at the same time as the projectile we spawned from

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6598 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:21:51 +00:00
Per Inge Mathisen c599637530 Fix potential bug that might cause a unit to go outside the map due to division rounding error,
since code was manually dividing by TILE_UNITS instead of bit-shifting with map_coord(). Patch
reviewed by EvilGuru. Crash report by acidjnk.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6595 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-07 19:13:14 +00:00
Per Inge Mathisen 4b8ee8ad09 Improve gridStartIterate assert message
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6594 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-07 19:07:13 +00:00
Giel van Schijndel 449d93267e * Add CSV field entries for ECM, REPAIR and BRAIN
* Generate SQL INSERT statements from CSV data for ECM
  - REPAIR and BRAIN are still "exceptional" cases requiring syntactical extensions to the DB mini/meta language

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6579 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-01 19:10:29 +00:00
Buginator ae27065c85 Fixes ticket #237
Using C99 declaration instead of C98.
 

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6573 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 19:44:15 +00:00
Dennis Schridde 30044e860c Fix usage of BOOL which should have been int instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6568 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 15:51:31 +00:00
Dennis Schridde bb5d6bec73 Remove unused variable
fixes #236, caused by r6566

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6567 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 14:39:36 +00:00
Buginator 6440d68d2c Closes ticket #131
Adds weapon range display to the sensor display routine.
Function was split for future enhancements.

This is *not* meant to be played with it enable all the time, as you know, it is a severe resource hog, and it is mainly helpful for modders, to check what the range of the weapons & sensors are.

NOTE: it only shows range for *first* weapon slot.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6566 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 06:20:22 +00:00
Giel van Schijndel 6986905a65 Give --join's parameter value a name: "host"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6559 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-25 00:06:25 +00:00
Giel van Schijndel 1f4e369cf2 * Add a new struct-level qualifier: %csv-field-override
- This qualifier allows overriding of CSV field numbers given in base classes
  - This is required for the WEAPON stats because it differs from most other stats in that it doesn't have the "designable" field as the last CSV field
 * Specify all CSV field numbers for the fields in struct WEAPON
 * Generate SQL INSERT statements from weapons.txt


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6553 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-22 22:18:48 +00:00
Per Inge Mathisen 0881493713 New cheat "noassert" and new command line option "--noassert" turns off the abort functionality in ASSERT() calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6527 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-02 11:16:40 +00:00
Per Inge Mathisen c10ffeb2ec Improve assert in buildModule to aid in tracking down bug in ticket #167. Also add
decent fallback for non-debug builds.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6526 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-02 10:46:17 +00:00
Per Inge Mathisen 7e895fa751 Add check for demolition as build target to CHECK_DROID(). Fix some visual ugliness in that function.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6525 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-02 10:40:58 +00:00
Dennis Schridde 8eb5ddcadb fix bug #4831 (Endlessly spinning droids)
Make sure we get sucked stronger towards the 2nd waypoint than 1/2 times the strength
 we get turned towards the first. Also ensure we get never turned away from a waypoint.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6524 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-02 00:31:05 +00:00
Dennis Schridde 49b5b568b3 Another attempt against #141 (out of bounds access at scriptfuncs:11467)
Since the original assignment probably happened out of confusion what asParts[] shall or shall not contain,
I removed the offending line and added a bit more documentation about that array.

fixes ticket:141

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6523 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-30 14:37:41 +00:00
Dennis Schridde ab15c34724 Revert "GCC complained in scriptfuncs.c:11467 that asParts[COMP_WEAPON] is an out of bounds access, so define that to a greater value."
This reverts commit fbe7a559ee13da78660a68fb69466a46e3d46505.

!!! WARNING: The original issue (clear out of bounds access) is still present in scriptfuncs.c:11467 !!!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6522 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-30 12:45:56 +00:00
Dennis Schridde 1d88daf05a GCC complained in scriptfuncs.c:11467 that asParts[COMP_WEAPON] is an out of bounds access, so define that to a greater value.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6521 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-30 04:04:32 +00:00
Dennis Schridde 91dfdcfea2 Add worldOnMap3f()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6519 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-30 04:04:22 +00:00
Dennis Schridde d04ceed183 Remove airTarget member from PROJECTILE
This was used to make AA cannons which originaly aimed at a VTOL not hit anything else
As a speed optimisation we could skip searching the structure list for victims,
 if the projectile exploded above the maximum structure height, and do the same for droids

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6518 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-30 04:04:17 +00:00
Dennis Schridde fed9ced1a4 Simplify initialisation of projectiles a bit
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6517 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-30 04:04:09 +00:00
Dennis Schridde 1ad8db5ad8 Remove unused member targetRadius from PROJECTILE (was set, but never read)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6516 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-30 04:04:04 +00:00
Dennis Schridde 6d879e324a Reorder gfxVisible() to remove the need for a local variable, just return early instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6515 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-30 04:04:00 +00:00
Giel van Schijndel 5006a64d83 * Remove script function numMessageBox which is an unused alias for script function debugBox
* Minor cleanup of function scrNumMB (C implementation of debugBox script function)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6514 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-28 21:47:48 +00:00
Giel van Schijndel ccc29cb92a * Do not perform endian swapping twice when loading, as it'll undo the first swap
* Make saving and loading of move controls symmetric

This should fix #96, #127 and #177


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6512 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-28 14:31:54 +00:00
Dennis Schridde e7c5db3790 Rename psProj -> psPrevProj and psObj -> psProj, to remove confusion
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6506 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-26 01:46:33 +00:00
Dennis Schridde ad234fb5a3 Use conversion constructors everywhere, where we need to workaround Vector3uw in BASE_OBJECT
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6505 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-26 01:46:29 +00:00
Dennis Schridde 92b22e4d63 Cleanup proj_ImpactFunc
- Use Vector3i_InCircle/Vector3i_InSphere where applicable
- Move variable declarations innerwards

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6503 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-26 00:46:38 +00:00
Dennis Schridde defb67afbb The fourth part removes the fire-box hack (another premature optimisation).
Author: EvilGuru
Signed-off-by: Dennis Schridde <devurandom@gna.org>

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6501 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-26 00:46:31 +00:00
Dennis Schridde d3e29ec540 The third part removes some premature optimisation in the naybour functions.
Author: EvilGuru
Signed-off-by: Dennis Schridde <devurandom@gna.org>

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6500 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-26 00:46:28 +00:00
Dennis Schridde 8bd3f3111c Remove concept of nominal damage to baseplates of structures
The second part removes the (useless) concept of nominal damage - which occurs when a projectile hits the base-plate of a structure. Considering how infrequently this occurs and how little damage is done (5) there is little point keeping the functionality.

Author: EvilGuru
Signed-off-by: Dennis Schridde <devurandom@gna.org>

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6499 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-26 00:46:24 +00:00
Dennis Schridde dbf5e962b9 Use squared radius to test in-sphere for projectile impacts
The attached patch fixes a bug in proj_ImpactFunc whereby it would use the radius cubed as opposed to the radius squared when doing hit-detection. Furthermore it also removes some premature optimisations (hit-box detection).

Author: EvilGuru
Signed-off-by: Dennis Schridde <devurandom@gna.org>

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6498 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-26 00:46:18 +00:00
Gerard Krol 710e09eb27 Fix scrCheckTemplateExists so that it doesn't try to break out of an outer loop using a break statement.
The function would quite often report an already existing template while there was none.
This fixes bug #186. This fix has already been applied in the lua branch.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6490 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-25 14:27:19 +00:00
Giel van Schijndel 64f87a0b8e * Make function countAssignedDroids static because it's only used in the file where it's defined
* Code clean up
 * Make countAssignedDroids const correct
 * Make countAssignedDroids return the amount of artillery ''and'' VTOL droids that are assigned to a structure
  * This fixes #90, patch by i-NoD, modified by me

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6464 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-13 17:58:25 +00:00
Per Inge Mathisen ab0c686df2 Fix bug #12448: crash in hci.c:3101 in TRUNK (r6160) by simply removing the mostly spurious assert.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6457 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-12 17:07:55 +00:00
Per Inge Mathisen 52dd85264f Improve assert message to help track down bug #12448.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6456 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-12 16:55:06 +00:00
Gerard Krol abbcda662f Remove some code duplication from the getProduction* functions and a lot of code duplication from the pickATile* functions.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6435 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-04 22:21:10 +00:00
Gerard Krol 94b7867399 Remove duplicate code responsible for drawing the health and construction progress of buildings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6434 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-04 20:56:16 +00:00
Giel van Schijndel f0f937a0aa * Make sure that we use the correct printf formats
* Use ASSERT_HELPER where required (and ASSERT as used)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6433 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-04 14:19:21 +00:00
Gerard Krol bb7e111e00 Updated CoordInRadar function which somehow did not make it into r6410 (rotating radar). This fixes an assert in CalcRadarPosition.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6418 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-30 22:44:58 +00:00
Gerard Krol 0906040c8b Add an option to rotate the radar when the player rotates the camera. The viewing window on the radar
is thus always facing upwards.  This option is now enabled by default to obtain some feedback.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6410 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-30 15:10:49 +00:00
Freddie Witherden d54a1e8566 Colored => Coloured. We use British spelling by convention.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6397 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-26 21:22:47 +00:00
Giel van Schijndel 0723d7a5b9 Fix compiling on MSVC:
* Use C89 style variable declarations (i.e. at the beginning of scope-blocks)
 * Use a proper set of #include paths

This should fix #160, patch by <i-NoD> slightly modified by me (moved variable declarations to the most local scope where used)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6385 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-25 23:53:44 +00:00
Giel van Schijndel 216cbe8789 * Use a spiral-like search for VTOL landing sites instead of expanding square search
- This will result in smaller travel distances in some cases

This closes #143 ("true distance instead of manhattan distance"), patch by <mfreire> with some modifications by me

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6363 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-22 18:41:39 +00:00
Gerard Krol d2c8082c87 Change the way the edges of the map fade. With fog of war enabled they fade to transparency so that mountains in the distance will fade
in instead of pop in. The transparency did not play well with the distance fog and in that case the tiles fade to the fog color. All 
terrain tiles are now drawn as alpha enabled textures, which could have an impact on the performance for some people. Remember this 
commit when complaints about reduced performance start coming in.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6348 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-17 10:39:44 +00:00
Gerard Krol a5128f0d6d Rename the current skybox texture page to page-25-sky-arizona and use the entire texture, instead of only the bottom half of
it. This will make it easier to change the sky for the different areas.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6345 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-17 08:06:49 +00:00
Giel van Schijndel 5f05dd99e6 Check for Perl in the configure script, rather than just assuming it's installed
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6343 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 19:13:39 +00:00
Giel van Schijndel 67b80c973d Regenerate stats-db2.c to get rid of old field data from a C-only-field (which since r6341 gets ignored properly)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6342 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 18:49:23 +00:00
Giel van Schijndel 25a9402757 Add loading-specifications for enums MOVEMENT_MODEL and WEAPON_EFFECTS
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6340 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 17:25:43 +00:00
Giel van Schijndel 3cc8d0e1a2 * Use the database-meta-language code generator to generate a new stats loading function: loadPropulsionStatsFromDB
* Get rid of the (previous) handcrafted version for loadPropulsionStatsFromDB
 * Get rid of the old (handcrafted) `propulsion` table and replace it with the autogenerated `PROPULSION` table

NOTE: Only src/data.c src/stats-db.[ch] src/stats-db2.tpl got changed manually, the other changes where generated from these

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6337 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 16:28:23 +00:00