Commit Graph

5406 Commits (73ba9f3a1a7c0a3796f1732c0632661a79d01bcd)

Author SHA1 Message Date
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
Dennis Schridde a3f46201bb Fix out-of-source build: Relative paths to srcdir were double applied
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6748 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 19:41:20 +00:00
Per Inge Mathisen 9d986d917f map2ldn: Fix conversion error. Reported by Mysteryem.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6739 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 09:44:32 +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 df0ada9a50 Fixes crash when certain scripts fail to compile, it don't allocate storage, so we shouldn't (try to) reference / free() it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6736 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 02:17:20 +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
Buginator f0d0bd7ebe Fixes a dangling pointer issue with a global.
In certain circumstances, if you try to abort out of a MP game (maybe SP as well), it would crash after deleting the widget, since it was still referencing the pointer in the global.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6732 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 01:40:19 +00:00
Per Inge Mathisen 7b8e81ed8f map2lnd: Tons of bugfixes thanks to some help by Mysteryem. It is hardcoded to use Arizona at the moment, though.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6731 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-27 22:24:37 +00:00
Per Inge Mathisen 09ddf35b87 mapinfo: Parse .gam file and show scroll limits.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6730 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-26 23:17:05 +00:00
Per Inge Mathisen 08e9bd5efa Initial map to LND format converter from patch #787: LND format exporter, now as a separate
application. It has not been tested with editworld yet. Needs some TLC.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6729 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-26 22:10:57 +00:00
Per Inge Mathisen 58546965b7 Delete commented out references to non-existent files from gamedesc.lev
Delete two unused and broken map files that either belongs to an expand mission or is unreferenced.
Add basic unit testing framework for testing all map files in data/base.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6728 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-26 19:41:25 +00:00
Per Inge Mathisen be34651386 A simple map inspection tool
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6727 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-24 22:12:49 +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
Dennis Schridde b15ac97eeb Fixup ChangeLog sections
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6718 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 13:31:35 +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
Giel van Schijndel ab5e599100 Don't use the deprecated git-$command interface anymore, instead use "git $command"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6707 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 23:42:07 +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
Per Inge Mathisen ebd9718aff Put naval propulsion back. Mistakenly removed in r6695.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6696 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 19:50:52 +00:00
Guangcong Luo ae28099a95 Rebalance 0.2.4 - fixes many balance problems. Changes documented on Warzone Guide - currently available at http://guide.wz2100.net/new/
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6695 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 18:06:37 +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
Gerard Krol 3fa8a7e4ce The textures for the new terrain renderer. These are committed separately to make reverting the actual code changes easier.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6681 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 23:32:30 +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 e920507134 Change debug() output from gametime to real time.
In MP games, since gametime can vary so much between machines, needed a more reliable time source to sync up messages between them.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6679 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 22:24:02 +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