1
0
forked from 0ad/0ad
Commit Graph

15328 Commits

Author SHA1 Message Date
753936e7df SpiderMonkey 38 removes JS_Evaluate{,UC}Script, use JS::Evaluate.
https://bugzilla.mozilla.org/show_bug.cgi?id=1100579

This was SVN commit r17508.
2015-12-19 01:58:03 +00:00
56bf37a54e Simulation cleanup (Attack.js)
Use let instead of var.
Do not redeclare timeToTarget and cmpTimer.
Remove unused variable graphicalPosition.
Fix some whitespace issues.

This was SVN commit r17507.
2015-12-19 01:48:11 +00:00
2239fe338c The jschar typedef is removed in SpiderMonkey 38.
Since it already is char16_t in 31 replace it by that.
https://bugzilla.mozilla.org/show_bug.cgi?id=1063962

This was SVN commit r17506.
2015-12-19 01:29:55 +00:00
69ab2bae5b Some ctors were made explicit in SpiderMonkey 38, so call them where needed.
https://bugzilla.mozilla.org/show_bug.cgi?id=1013663

This was SVN commit r17505.
2015-12-19 01:13:56 +00:00
efda359acc Use new when calling the builtin typed array constructor.
The current code will be forbidden in ES6.

This was SVN commit r17504.
2015-12-19 01:10:13 +00:00
825a2fcc34 Summary screen cleanup. Based on patch by bb, fixes #3518.
This was SVN commit r17503.
2015-12-19 01:00:32 +00:00
a381334976 Gamesetup cleanup
Unify the gameattributes-update of checkboxes.

This was SVN commit r17502.
2015-12-18 22:40:56 +00:00
9cf9695d8d Graceful exit in case of trying to replay a directory. Fixes #3427.
Also remove unneeded variable ran_atlas.

This was SVN commit r17501.
2015-12-18 21:16:08 +00:00
abce6cb737 Pathfinder optimization, fixes #3541.
Simplify the math of Geometry::TestRayAASquare.

This was SVN commit r17500.
2015-12-18 15:05:33 +00:00
659606b83e Revert the removal of setting the defaults in updateGUIObjects in b1e754c9b1 (until a better solution is found).
Add comments for the unsuspecting.

This was SVN commit r17499.
2015-12-18 12:48:04 +00:00
2d34b198df Remove a wrong tag from two skirmish maps.
This was SVN commit r17497.
2015-12-17 21:10:20 +00:00
d31afada25 Gamesetup cleanup
Move assignments of dropdownlist functions from XML to JS, so they are
all defined in one place.
Rename a function.

This was SVN commit r17496.
2015-12-16 23:13:59 +00:00
dca32228b5 fix dead tree actor, patch by stanislas69, fixes #3705
This was SVN commit r17495.
2015-12-16 20:45:08 +00:00
3196df663f some petra cleanup
This was SVN commit r17494.
2015-12-16 17:57:39 +00:00
6c4598fe16 increase a bit the loot xp of fauna_hunt, refs #3701
This was SVN commit r17493.
2015-12-16 17:54:00 +00:00
58cf3cb266 Correct two wrong references to variables in 5ccee7ade1. Patch by bb, fixes #3703.
This was SVN commit r17492.
2015-12-16 17:15:16 +00:00
c1b97e4709 Improve indentation of 'case' statements updated after SDL1 removal (thanks leper).
Also update other 'case' statements in the same file for consistency.

This was SVN commit r17491.
2015-12-16 15:36:56 +00:00
7e9d105401 Toggle the session menu with the hotkey. Patch by Vladislav, fixes #3661.
This was SVN commit r17490.
2015-12-16 02:05:29 +00:00
1c6baed8e3 Gamesetup cleanup
Move creation of game-description to a separate function.

This was SVN commit r17489.
2015-12-16 01:37:43 +00:00
b1e754c9b1 Gamesetup cleanup
Remove all remaining variables referencing GUI objects in
updateGUIObjects.
Do more simple checks and insert new calls at more coherent places.

This was SVN commit r17488.
2015-12-16 00:42:26 +00:00
6873a5e5a9 Gamesetup cleanup
Unify switch-statement and remove unused variables.

This was SVN commit r17487.
2015-12-15 23:57:45 +00:00
f99de00779 Fix an operator precedence bug in the previous commit.
This was SVN commit r17486.
2015-12-15 23:19:01 +00:00
78cc57c16b Gamesetup cleanup (loadPersistMatchSettings, updateGUIObjects)
Move GUI updates from loadPersistMatchSettings to updateGUIObjects.
Simplify updateGUIObjects and use setGUIBoolean.
Move SetRankedGame from updateGUIObjects to handleGamesetupMessage.
Early return in handleGamesetupMessage.

This was SVN commit r17485.
2015-12-15 18:25:32 +00:00
df25d425dd Gamesetup cleanup (loadPersistMatchSettings)
Remove duplicate GUI updates which are done in initMapNameList and
updateGUIObjects.
Remove the g_IsInGuiUpdate line as the variable will be overwritten with
the next statement.

This was SVN commit r17484.
2015-12-15 17:16:35 +00:00
ffc70a2390 Gamesetup cleanup.
Don't copy the label from the dropdownlist, but create it from
g_MapFilters.
Move placeholder items to g_RandomMap and g_RandomCiv.

This was SVN commit r17483.
2015-12-15 15:40:34 +00:00
ab053fef3e Gamesetup cleanup
Remove 4 duplicate GUI updates in updateGUIObjects.
mapSelectionBox is updated in initMapNameList, the other three are done
80 lines below.
Inline finding of the selected map.

This was SVN commit r17482.
2015-12-15 14:57:06 +00:00
a960958379 Gamesetup cleanup.
Abort in case a client tries to update the gamesettings.

Rename onGameAttributesChange to updateGUIObjects.
Move a check to sendRegisterGameStanza().

This was SVN commit r17481.
2015-12-15 14:14:52 +00:00
8354adb74a Gamesetup cleanup
Deobfuscate mapfilter code. Remove unneeded, peculiar functions.
Construct g_MapFilters in-place and mark as const.

In initMapNameList, load "all" maps if no mapfilter is specified.

This was SVN commit r17480.
2015-12-15 12:23:39 +00:00
5a7c2ec2db Cleanup after SDL1 removal.
Remove the "sdl1" option from premake4.lua (thanks historic_bruno).
Improve isUnprintableChar indentation, resolve two defines, change SDL*
to SDL2 in premake (thanks leper).

This was SVN commit r17479.
2015-12-15 08:53:24 +00:00
931f5f752b Gamesetup cleanup.
Resolve if-statements in initMultiplayerSettings.

This was SVN commit r17478.
2015-12-15 00:21:27 +00:00
5a7a56da41 more cleanup on petra
This was SVN commit r17477.
2015-12-14 21:17:22 +00:00
0ed4a4c102 update the XP loot points of animals, fixes #3701, and remove the outdated and not used elephant template
This was SVN commit r17476.
2015-12-14 20:49:04 +00:00
636cc34a13 Gamesetup cleanup & translation fix
The caption of mapSelectionText (mapname-label visible to clients)
showed "random" instead of a translated "Random".
Move hardcoded "orange" color to a global const.

Simplify loadMapData.
Rename saveGameAttributes() to savePersistMatchSettings().

This was SVN commit r17475.
2015-12-14 18:47:41 +00:00
a8ac537ebc Limit the number of units spawned when using cheats to prevent freezing the game. Based on patch by Stan, fixes #3545.
This was SVN commit r17474.
2015-12-14 17:10:55 +00:00
da9ec4f325 Session cleanup.
Remove unused and useless ambientsound code. The ambient actually stops
with EndGame.

This was SVN commit r17473.
2015-12-14 16:47:45 +00:00
5df6a0182a Gamesetup cleanup.
Use hideControl for playerdropdowns.
Remove some superfluous checks and  comments.
Simplify using logical or, math and ternary operator.

This was SVN commit r17472.
2015-12-14 15:37:58 +00:00
acde954f8d Gamesetup cleanup.
Use let in function scope too.

Though spider monkey doesn't support let fully yet, it might be able to
detect some more reference errors in the code with later versions.
For example if a let variable is referenced before being defined
(temporal dead zone).
Besides, it is an easier rule to follow (let in functions, var for
globals) and makes the code more coherent.

This was SVN commit r17471.
2015-12-14 14:32:43 +00:00
9a2d0f803e Remove disabled by default SDL1 support.
Refs #2041.

This was SVN commit r17470.
2015-12-14 10:52:21 +00:00
7665a9ee31 Session cleanup.
The usual suspects:
Move all constants to the top.
Rename all globals to g_Foo.
Use let for all local variables (except in the for-each parts which will
be updated later).
Quote object keys.
Ternary operator.
Fat-arrow functions.
Whitespace issues.

This was SVN commit r17468.
2015-12-14 05:37:34 +00:00
25e6136786 Clear g_ChatTimers too in case the new /clear command is used from the session. Refs #3396.
This was SVN commit r17467.
2015-12-14 04:14:58 +00:00
4dbc9b8b1d Cleanup color.js
Move some shared color-code to color.js.
Remove shuffleArray() as it's unused since bbc325fb5a.
Add JSdoc comments and use let.

This was SVN commit r17466.
2015-12-14 03:53:48 +00:00
6e80288d30 Add a chat-command to clear all messages. Works for lobby, gamesetup and session. Patch by ruiRanger, fixes #3396.
This was SVN commit r17465.
2015-12-14 03:12:26 +00:00
f776e06044 Session messages/notification cleanup.
Rename globals, use const, let, JSdoc comments.
Rename host to guid for coherency.
Don't use for-each.

This was SVN commit r17464.
2015-12-14 03:08:53 +00:00
45c7d1681f petra cleanup, mainly renaming stuff for better readability
This was SVN commit r17463.
2015-12-13 22:04:09 +00:00
5864447d92 Don't resurrect dead units when trying to promoting them while they die. Patch by karamel, fixes #3544.
This was SVN commit r17461.
2015-12-13 18:09:56 +00:00
b87b3ff3dc Left some debug code in.
This was SVN commit r17460.
2015-12-13 17:39:19 +00:00
a7a6b3316c GUI cleanup.
Moves cropping of the mappreview image to a common function
setMapPreviewImage.
Also avoids magic numbers by using the actual formula.

This was SVN commit r17459.
2015-12-13 17:09:41 +00:00
1e504cd64c Fix the actoreditor menu bar on OSX. Patch by trompetin17. Fixes #1554.
This was SVN commit r17458.
2015-12-13 16:53:35 +00:00
909b8d4369 Allow multiple special sprites, to facilitate cases where we want to add an overlay to a sprite.
"color" can make use of the sprite's alpha texture, and the "add_color"
effect will now take the original image's alpha into account.
Remove the no longer needed "unaffordableMask" images on a variety of
panels.

Somewhat based on a patch by BoeseRaupe. Fixes #2421 and #3688.

This was SVN commit r17456.
2015-12-13 16:03:17 +00:00
88d6f35126 Summary screen cleanup.
Rename panelsData and teamMiscHelperData to g_Foo.
Use let instead of var everywhere except for globals.
Quote object keys, add some spaces.

This was SVN commit r17455.
2015-12-13 13:20:54 +00:00