Commit Graph

2668 Commits (9d06afce244d0bf204a57eced412e2189bdbc840)

Author SHA1 Message Date
Christian Ohm 0cedc95346 Fix spelling of "similiar".
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7963 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:03 +02:00
Christian Ohm aeb3193811 Add some ASSERT_OR_RETURNS.
In getLandingX/Y, if iPlayer is 8, 0 is returned anyway, so no behaviour
changes, just cleaner code. In missionFlyTransporters in, we currently print an
error message and return, so change that to ASSERT_OR_RETURN so we get a
backtrace to fix the real problem.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7962 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:02 +02:00
Per Inge Mathisen dba1290112 This patch adds the beginnings of a "Challenge" single player game mode. It
adds fixed game setups with a running timer, which becomes a game score. The 
faster you can finish the challenge, the better the score. However, if you 
have been unable to finish the challenge, then the higher the score is better 
(you survived it longer)! Challenges are setup in INI files in a challenges/ 
directory. This closes ticket:778


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7954 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:02 +02:00
Per Inge Mathisen aca362c350 Add keyboard shortcuts to "guard position" and "go to transport". Patch by
lolando@debian.org, this closes ticket:806


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7953 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:02 +02:00
Guangcong Luo 9233395b39 Fix segfault in formationLeave() from being passed null pointers. (Fixes bug #782, which has nothing to do with any sound patch.)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7948 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:01 +02:00
Guangcong Luo 6c37cae9a7 Fix a null pointer segfault in multiint.c:217 (loadMapPreview).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7946 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:00 +02:00
Per Inge Mathisen cdf00a1da4 Remove erronous comment and definitions belonging to long since removed force editor.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7940 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:59 +02:00
Per Inge Mathisen 33e23992d8 Make some local functions static.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7937 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:58 +02:00
Per Inge Mathisen 7f24bd6dfb iniparser: More const correctness. Make it output INI files using physfs.
scores.c: Make a function static.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7936 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:58 +02:00
Per Inge Mathisen f00a34f3de Remove wrong comments and duplicate declarations.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7931 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:57 +02:00
Per Inge Mathisen 5af14e1137 Fix compilation. Patch by stiv. Closes ticket:775
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7929 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:57 +02:00
Guangcong Luo d1bf617727 Fix segfault when trying to read target of droid with no target in aiUpdateStructure.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7927 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:57 +02:00
Guangcong Luo f69561117e General order/action code cleanup:
- rewrite secondaryGetState to just return the state instead of pushing it into a pointer
- disallow WSS turret from targeting things it can't see
- introduce a "temporary hold" order
- fix the bug that considered keyboard shortcuts cheats that could not be used in multiplayer
- make trucks and repair turrets hold their position when in "Hold Position" mode (this involves moving the #define of REPAIR_RANGE from action.c to action.h, in case that affects anyone)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7925 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:56 +02:00
Buginator f7695e31bc Fix a typo, we wanted to display "???" when ping is >=2000...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7921 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:56 +02:00
Per Inge Mathisen a33e89200b Remove useless, old astar measurement code. Some code cleanup.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7919 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:56 +02:00
Per Inge Mathisen f0f13e295c Do some micro-optimizations on inner loop of path-finding code. Boosts performance by a measured 20%.
Also add a unit test for further testing, optimization and measurement work on this code.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7918 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:55 +02:00
Per Inge Mathisen 8e3fd76c3c Fix assert failure when paths are generated that are exactly 256 nodes long, and we try to store
this in our silly uchar path length variable. For now we need to cap path lengths to 255 because
of savegame compatibility. Also rewrote parts of the A* path handover code to get rid of some old
cruft. Closes ticket:765


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7915 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:55 +02:00
Per Inge Mathisen 090c7cd846 Move some code around to facilitate easier unit testing of path code.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7913 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:54 +02:00
Per Inge Mathisen 1b00f3f1ee Fix indentation in setUpMission()
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7912 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:54 +02:00
Per Inge Mathisen bcaaca2115 Verify that our "target" is still around before doing fire support with it. This closes ticket:759
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7911 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:54 +02:00
Per Inge Mathisen 1d80719f5a Fix bug where a check for player < max number of players is toos trick. Closes ticket:762
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7909 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:54 +02:00
Per Inge Mathisen a015282a1e Fix bug in SQL part of weapon stats loader. Patch by i-NoD. Closes ticket:758
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7908 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:54 +02:00
Per Inge Mathisen 08306f2bb1 Fix camera bug in warcam code. Patch by i-NoD in ticket:757
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7907 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:53 +02:00
Per Inge Mathisen f55c3ad471 Add INI file parser (iniParser -- version 3.0b (beta) by N.Devillard)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7902 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:53 +02:00
Per Inge Mathisen bd937b8515 Add new assert to try to trigger bug in ticket:738 earlier.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7901 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:52 +02:00
Per Inge Mathisen 639f21ed21 Add type of unit to assert message for bug in ticket:738
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7898 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:52 +02:00
Per Inge Mathisen ae8ec8652c Fix division by zero crash in visibility code. Found in local LAN game.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7893 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:52 +02:00
Guangcong Luo 95ce6a6fde Fix crash from accessing an invalid object ID in intGetObject (fix found by cybersphinx)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7890 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:37 +02:00
Guangcong Luo a7cf3b6edf Stop rotation when "Continue" is pressed after winning a multiplayer/skirmish game.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7888 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:37 +02:00
Guangcong Luo cfda22f528 Fix compile error introduced by r7884
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7886 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:37 +02:00
Guangcong Luo 91b7bd2b99 Fix crash when attempting to leave a null group.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7884 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:37 +02:00
Guangcong Luo 081e5ab566 Fix crash when attempting to read a sensor tower's droid type.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7882 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:37 +02:00
Christian Ohm d7c46a7b3f Show when a game was saved in a tooltip on the loading screen.
Patch by Rawler, closes #682.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7865 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:34 +02:00
Guangcong Luo bc01c345af Fix a bug that caused some keyboard shortcuts to be unusable in multiplayer since they were considered cheats.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7857 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:32 +02:00
Christian Ohm d70c4a8de2 Initialize some possibly uninitalized variables to make optimized debug builds
easier.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7853 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:32 +02:00
Guangcong Luo 1907b3aa73 Fix possible crash in fpathBaseBlockingTile.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7846 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:31 +02:00
Guangcong Luo 0a5b68c4a1 Forwardport r7822 by Buginator to trunk: Add ASSERT_OR_RETURN() to guard against buffer overflow.
(Real fix is still needed, and the cause is the unit is trying to build in a invalid area, and the path finding needs to be reset for the droid)
ref ticket:698

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7845 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:31 +02:00
Guangcong Luo a31465c75d Fix possible buffer overflow in missionFlyTransportersIn and getLandingX/Y.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7841 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:30 +02:00
Guangcong Luo d5dfdc17e0 Fix bug #691: Cannot display more than one game from lobby. Also fix a lobby display issue that I thought I already fixed.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7840 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:30 +02:00
Per Inge Mathisen 72a10b7cc7 Fix that closes ticket:633 Made research speed and power go haywire if we loaded a game.
Patch by i-NoD. Quick fix. Will fix this properly with new savegame format later.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7834 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:29 +02:00
Per Inge Mathisen a70ba3f2e1 More silly typo fixes
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7833 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:29 +02:00
Per Inge Mathisen d78d670166 Fix silly typo
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7832 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:29 +02:00
Guangcong Luo b6bb00f405 Fix possible bug on connection error not clearing old games; reformat surrounding code.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7830 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:28 +02:00
Guangcong Luo 8994b78c6f More fixes to the options menu (align graphics menu; rephrase colored cursor).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7827 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:28 +02:00
Per Inge Mathisen b86f0f85cc Improve documentation of PLAYER.allocated field. Improve asserts for indexing into some player methods.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7826 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:27 +02:00
Guangcong Luo 5b45d1ac9c Rename "Reverse Mouse" and "Right-Click Orders" to "Reverse Rotation" and "Switch Mouse Buttons", respectively.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7823 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:27 +02:00
Guangcong Luo d58af93eb5 Fix possible crash in hasCommander()
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7816 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:26 +02:00
Per Inge Mathisen 63c94de726 Fix bug introduced in r7737 where we would iterate wrongly over uninitialized effects during
shutdown, and badly initialize new nodes in the effect chunks. This caused a counter underflow
and crash during any game save. This closes ticket:640 for real this time.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7801 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:25 +02:00
Per Inge Mathisen fc78b8326e No longer save most game state as tagfile format (wzs). Closes ticket:640 reported by Samowar.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7800 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:24 +02:00
Buginator 7044fb1ca2 Make sure we take xOffset into account, we don't always start at 0 for the FMV text.
fixes ticket:625

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7781 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:23 +02:00