Commit Graph

6872 Commits (27534ac95a839c265942c32886ceb6e1c5533eeb)

Author SHA1 Message Date
Per Inge Mathisen 46a987621e Set visibility variables properly to remove random visibility bugs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9547 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:53 +01:00
Cyp 1da4d6e731 Add the "void" in "processVisibility(void)" to compile with --enable-debug=yes.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9546 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:53 +01:00
Cyp 2c900bbc39 Cleanup and code that could be used to make clusters (whatever that means) spend a lot less time updating (if that wouldn't break anything).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9545 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:52 +01:00
Cyp a19eb86fda visibility: Make object-object visibility less weird and less inefficient.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9544 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:52 +01:00
Per Inge Mathisen f703e92962 Remove some duplicate code for determining a structure's display brightness, and in the process
make animated buildings (ie oil derrick) pulse when selected and darken with true fog of war as well.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9542 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:52 +01:00
Per Inge Mathisen faba60b3fa Clear team selection when loading saves from in-game.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9540 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:52 +01:00
Cyp e095e8d80e visibility: Cast terrain visibility as sectors instead of rays.
Previous algorithm had a surprisingly high asymptotic runtime. (Insertion into unsorted sets.)
The new implementation does not generate pretty moiré patterns.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9539 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:52 +01:00
Guangcong Luo 850cc41653 Fix bug #1483 - unbuilt structures and walls shouldn't confer visibility.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9536 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:51 +01:00
Per Inge Mathisen 21d38e3685 Fix typo in AI script
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9535 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:51 +01:00
Per Inge Mathisen f4aba9fb28 Workaround for bug that makes the AI stop researching.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9533 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:51 +01:00
Per Inge Mathisen eb5f9d4395 Deactivate reached oil resource script when human player is playing. Bug reported by cyp_.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9532 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:51 +01:00
Cyp c597cba214 Fix uninitialised variable in aiStructHasRange, making it random whether sensors were in range.
This removes a warning in optimised builds.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9530 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:51 +01:00
Cyp 0d956bb81b structure.c: Fix crash in hqReward on campaign start.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9529 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:51 +01:00
Guangcong Luo 9723bbb44b 2.3: Fix bug #1444 - crash upon exit - patch provided by Safety0ff.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9527 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:51 +01:00
Guangcong Luo 3cb6835e5c Delete cms.php - it appears to be superfluous.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9525 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:50 +01:00
Guangcong Luo 518bd1bf79 Add persist library to Guidecode.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9524 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:50 +01:00
Guangcong Luo cd8fc32f0e Fix typo in guidecode readme.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9523 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:50 +01:00
Guangcong Luo 23b3d52c46 Add Warzone Guide code into /trunk/tools/guidecode/.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9522 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:50 +01:00
Per Inge Mathisen 1fa11735d0 Make use of bitfields to reduce the number of conditional branches inside critical
visibility loops, and give each player their own explored status for each tile. 
(One of these days we should send exploration status over the network, too.)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9520 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:49 +01:00
Guangcong Luo 627fe71e8a Fix a bug (caused by a hilarious off-by-one error) letting players see oil resources when allied with an AI.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9519 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:49 +01:00
Giel van Schijndel 84dffec0b1 Commit Trac mini plugins (which we use):
* TracPhpBBCookieAuth
  - Considers users that are logged in on PhpBB to be logged in on Trac as well (resuing the PhpBB cookie)
 * TracHttpOnlyAuthCookie
  - Sets the HttpOnly flag on Trac's auth cookie (prevents clientside, e.g. javascript, scripting access to the cookie)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9516 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:49 +01:00
Per Inge Mathisen 42a023a592 On advice from Zarel, make AI build scorption body hover trucks instead of cobra.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9515 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:49 +01:00
Christian Ohm 539d03f370 Update translations.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9510 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:49 +01:00
Christian Ohm 97bc6918b1 Updated Estonian translation by Erlando.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9509 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:48 +01:00
Christian Ohm 07934754da Updated Spanish translation by Saberuneko.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9508 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:47 +01:00
Christian Ohm 0cd52a643b Mark a research string as no-c-format for translations.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9507 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:47 +01:00
Per Inge Mathisen 7d210588c3 Do some more precalculation of alliances and redefine aiCheckAlliances() as a macro. This achieves
approximately 8% speedup on some large games.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9503 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:47 +01:00
Per Inge Mathisen 3a783743a4 In certain corner cases, buildings could end up not being seen by sensors in true fog of war.
This makes sure that all tiles on which we have buildings are properly seen by sensors.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9501 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:47 +01:00
Per Inge Mathisen 1aae810a22 Make AI build cobra hover trucks when it is able to, instead of the ordinary starting trucks. This
allows the AI to access areas of certain maps that are blocked by water. On these maps, this makes
a great deal of difference. This breaks skirmish saves, so do not backport.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9499 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:46 +01:00
Per Inge Mathisen eed1904333 Change script function isStructureAvailable() to also check structure limits. This closes ticket:773
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9498 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:46 +01:00
Per Inge Mathisen 3156a4d9b4 If any player in fixed teams mode got sat uplink, all players got to see entire map. Fixed.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9497 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:46 +01:00
dak180 8a97aa2393 Clean up the fetch scripts.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9495 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:46 +01:00
Guangcong Luo dbd9be9a5a 46 warnings from Xcode on the wall, 46 warnings from Xcode... take several down, make a few variables signed and cast some other "%d"s to (int), 6 warnings from Xcode on the wall!
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9493 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:45 +01:00
Guangcong Luo 56295f9360 150 warnings from Warzone in Xcode, 150 warnings in Xcode... Take several down, cast a whole bunch of things passed as "%i" to (int), 46 warnings from Warzone in Xcode!
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9488 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:45 +01:00
Guangcong Luo ccef0c4b47 Fix crash updating DORDER_PATROL.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9487 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:45 +01:00
Guangcong Luo bac704a7cf 152 warnings from Warzone in Xcode, 152 warnings in Xcode... Take one down, fix an unsigned/signed comparison warning in mapgrid.cpp, 150 warnings from Warzone in Xcode!
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9486 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:45 +01:00
Christian Ohm 4072a3cac0 Add key mapping to toggle the trap cursor setting.
Alt-t by default, won't be active until the keymap is reset.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9480 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:44 +01:00
Cyp f1e0c95dd3 Remove accruePower(){return false;} function, which is no longer used.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9478 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:44 +01:00
Christian Ohm 5d3cdc66dd Update translations.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9475 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:44 +01:00
Christian Ohm 36acdc554b Add Croatian translation by 13KukYNexus666.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9474 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:43 +01:00
Cyp 826f3fde0c Make VTOLs roll more when turning, and smoothly.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9473 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:43 +01:00
Cyp f9e3b1eb85 Fix VTOLs flying at strange angles. Patch by Safety0ff.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9472 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:42 +01:00
Christian Ohm 8fc2196f14 Updated Polish translation by Emdek.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9469 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:42 +01:00
Christian Ohm 0b54babb5a Updated Spanish translation by Saberuneko.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9468 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:42 +01:00
Per Inge Mathisen bae4d0a056 Sometimes psDroid->pName is not set for some reason when loading templates. Hack it to use aName instead to avoid a crash.
Seems to happen during campaign changes.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9467 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:42 +01:00
Cyp e0ba7eb4ff Fix progress bars, reenable sound test, move variable, remove magic number, comments and spelling. Patch by Safety0ff.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9466 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:41 +01:00
Per Inge Mathisen f29597696a Forgot to remove a log error message in previous commit
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9465 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:41 +01:00
Per Inge Mathisen daceec3fd9 New script function bool getPlayerStartPosition(index, ref x, ref y) that finds the start position of any player.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9464 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:41 +01:00
Per Inge Mathisen cb3c9bcf88 Style, indent and dead code cleanup.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9463 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:41 +01:00
Guangcong Luo 255506d4b6 Correctly calculate frameTimeFraction2 - fix bug #482, among many other bugs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9461 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:41 +01:00