Commit Graph

6563 Commits

Author SHA1 Message Date
631fa4b376 Remove unused old code for triggers in atlas.
Actually implementing atlas support for triggers will most likely
require a different interface, so no use keeping it.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D418
This was SVN commit r19531.
2017-05-08 02:40:22 +00:00
7d00501a90 Make 81c57e8a28 compatible with wxWidgets 2.8, patch by vladislavbelov.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D427
This was SVN commit r19525.
2017-05-07 15:49:55 +00:00
a857ee441e Enable other languages than English in the Windows installer, patch by vladislavbelov.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D314
This was SVN commit r19524.
2017-05-07 14:38:29 +00:00
ee5bb1fd61 RangeVisualization component and use it to visualize Aura ranges.
Differential Revision: https://code.wildfiregames.com/D238
Fixes #4349
Patch By: Sandarac
This was SVN commit r19519.
2017-05-06 00:47:21 +00:00
76bc9b579a Clientside Lobby support for muted players (visitor role).
Displays a chat message and a notification in the player details to
everyone if someone was muted and
hides the chat input to visitors.

Differential Revision: https://code.wildfiregames.com/D339
Reviewed By: user1
This was SVN commit r19514.
2017-05-05 01:13:12 +00:00
329f9e0957 Remove broken atlas error reporting code.
This has been disabled for nearly 10 years (44f5288a1d), so remove it.

Reviewed By: fatherbushido, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D423
This was SVN commit r19511.
2017-05-04 09:29:24 +00:00
f794a14610 Declare variable when actually initialized.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D417
This was SVN commit r19508.
2017-05-04 06:53:21 +00:00
4a5f302ce1 Optional FPS Limiter for running games too, use the Slider GUI object in the config to specify custom limits.
Make it way more accurate by excluding the SDL_Wait time and microsecond
precision.

Differential Revision: https://code.wildfiregames.com/D109
Refs #2882
Reviewed By: Vladislav
This was SVN commit r19507.
2017-05-03 23:44:13 +00:00
09e974e1cb Bump year number of files changed this year in the license headers.
This was SVN commit r19503.
2017-05-01 14:28:22 +00:00
6ee830068a Print the name of OpenGL errors when they occur.
Patch by vladislavbelov
Differential Revision: https://code.wildfiregames.com/D313
This was SVN commit r19496.
2017-05-01 07:19:39 +00:00
37da3b008a Translate the Out-Of-Sync error message and send it to the JS GUI for convenience and future extension.
Add a hint that multiplayer games with AI are currently not supported.

Differential Revision: https://code.wildfiregames.com/D105
Reviewed By: leper
Refs #3858

This was SVN commit r19491.
2017-05-01 04:55:56 +00:00
7d6bfe27ab Clean up FromJSProperty a little. Patch by Vladislav.
Differential Revision: https://code.wildfiregames.com/D399
This was SVN commit r19489.
2017-05-01 00:58:35 +00:00
234aa36b25 Update the documentation on how to write simulation components.
Mention how to handle const methods (be1a205f91, D75).
Note that parameters are passed as const references (1a66f510d0).
Also remove mention of jsval (which is deprecated).

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D374
This was SVN commit r19484.
2017-04-30 23:48:54 +00:00
ecaa8434b1 Cinematic path node moving tool for Atlas. Patch by Vladislav.
Differential Revision: https://code.wildfiregames.com/D369
This was SVN commit r19483.
2017-04-30 23:47:16 +00:00
c016a74309 Add sliders to the GUI. Use them for the sound/music volume controls.
Patch by vladislavbelov, based on a patch by dpiquet.

Fixes #4039.
Differential Revision: https://code.wildfiregames.com/D325
This was SVN commit r19479.
2017-04-30 16:51:18 +00:00
5a4cbc9261 Move CinemaManager includes forgotton in 5d49e6c456 to the right place, thus fixing the build without precompiled headers.
Refs https://code.wildfiregames.com/D385
Reported by: leper
Fix proposed by: Vladislav
This was SVN commit r19473.
2017-04-29 18:08:06 +00:00
41d4649c6d Remove unused, deprecated SendGetGameList from the lobby.
Differential Revision: https://code.wildfiregames.com/D389
Reviewed By: scythetwirler
Refs D207

This was SVN commit r19467.
2017-04-28 23:22:41 +00:00
e6a0c7ae77 Remove SendGetRatingList lobby function which is deprecated and ignored serverside since 1a15131d2d because it caused performance issues and therefore shouldn't be used anymore.
Fixes #4151
Patch by: sbirmi
This was SVN commit r19463.
2017-04-27 11:42:51 +00:00
f399e68654 Fix the lobby bot following the entity class rename in ad17e320be
Differential Revision: https://code.wildfiregames.com/D383
Patch By: user1
Refs #4536 D244

This was SVN commit r19457.
2017-04-25 16:53:42 +00:00
8f36ca47a1 Replace input.js doubleclick hack and ease doubleclicking on moving units.
Differential Revision: https://code.wildfiregames.com/D326
Patch By: causative
Refs #4414

This was SVN commit r19444.
2017-04-22 01:24:03 +00:00
234513ae51 Use per 100 meters spread values. Fix a bit the related help. Change and use simpler template values. Units will be a bit more accurate. Reviewed by wraitii.
Differential Revision: https://code.wildfiregames.com/D361
This was SVN commit r19438.
2017-04-20 17:01:47 +00:00
81c57e8a28 List, add and delete cinematic paths in Atlas.
Doesn't provide a way to add/delete nodes of paths yet.

Differential Revision: https://code.wildfiregames.com/D348
Patch By: Vladislav
This was SVN commit r19427.
2017-04-18 03:30:16 +00:00
1db8562d05 Revert and fix 4523c50850: fix water disappearing in Atlas when clicking on the object tab.
Reviewed by wraitii.
Differential Revision: https://code.wildfiregames.com/D329
This was SVN commit r19425.
2017-04-17 08:59:12 +00:00
1ec41f6dd0 Fix crash in dynamic subscriptions when components unsubscribe during deletion.
Discussed with Philip.
Reviewed by fatherbushido
Differential Revision: https://code.wildfiregames.com/D264
This was SVN commit r19424.
2017-04-17 08:00:41 +00:00
de9e76cbf1 Add a test to the component manager to show a crash in dynamic subscriptions when components unsubscribe during deletion. Reviewed by wraitii.
Differential Revision: https://code.wildfiregames.com/D346
This was SVN commit r19423.
2017-04-17 07:55:44 +00:00
adf60c7c49 Support cinematic path creation from trigger scripts.
Differential Revision: https://code.wildfiregames.com/D317
Patch By: Vladislav
Refs #3814

This was SVN commit r19422.
2017-04-17 01:42:11 +00:00
ce5c10c7bb Add FromJSProperty helper function that gets the property of a JS object, thus reducing duplicate checks when getting many properties.
Differential Revision: https://code.wildfiregames.com/D338
Patch By: Vladislav
Refs: https://code.wildfiregames.com/D317

This was SVN commit r19421.
2017-04-16 23:59:20 +00:00
b856ec5ea4 Update the Minimap texture if the waterheight has changed.
Differential Revision: https://code.wildfiregames.com/D344
Patch By: Sandarac
Reviewed By: Vladislav
Refs https://code.wildfiregames.com/D229

This was SVN commit r19420.
2017-04-16 22:13:32 +00:00
5462f26aba Move CinemaPath class to the simulation helper directory, because it contains predominantly simulation data that is already serialized.
The remaining graphics code should be moved or removed.

Differential Revision: https://code.wildfiregames.com/D324
Patch By: Vladislav
This was SVN commit r19414.
2017-04-14 23:20:49 +00:00
16afbf32c8 Fix CChart scaling edgecases (constant value and infinity)
Reviewed by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D167
This was SVN commit r19408.
2017-04-11 12:27:21 +00:00
2e37e6a8d9 Remove redundant path name argument from the CinemaManager AddPath function.
Differential Revision: https://code.wildfiregames.com/D310
Patch By: Vladislav
This was SVN commit r19406.
2017-04-11 01:37:00 +00:00
65cbf12b7e Don't throw NetServer FSM errors if a client presses not-ready just before the host launches the game.
Differential Revision: https://code.wildfiregames.com/D290
Reviewed By: Imarok
Refs #3199

This was SVN commit r19404.
2017-04-10 16:52:52 +00:00
ee987d3b0d Add some consts to ShaderProgram functions
Reviewed by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D315
This was SVN commit r19403.
2017-04-10 15:44:33 +00:00
e4b4126293 Fix Units demo map following the addition of the special filter templates in D215 / d093f714d7.
Expose the FindAllPlaceableTemplates function to the simulation to
remove the hardcoded directory checks as suggested by fatherbushido.
Add the new special template directory from D176 / cd6c31e76e.
Move the code from XML to JS.

Differential Revision: https://code.wildfiregames.com/D277
Reviewed By: Vladislav
This was SVN commit r19399.
2017-04-09 23:46:31 +00:00
af4466bc99 Update ready state immediately when receiving the message.
Differential Revision: https://code.wildfiregames.com/D304
Reviewed By: Vladislav
Refs #2447

This was SVN commit r19396.
2017-04-09 22:59:04 +00:00
2f02fb4535 Move OpenGL CinemaPath rendering code to the CinemaManager, so that the remaining simulation data can be moved to the simulation directory.
Add height indicator so that we can actually estimate the location of
the paths in atlas.

Differential Revision: https://code.wildfiregames.com/D306
Patch By: Vladislav
This was SVN commit r19394.
2017-04-09 17:21:01 +00:00
290e67dc32 Add cinematic page to the atlas editor with one option to enable rendering of existing paths.
Differential Revision: https://code.wildfiregames.com/D301
Patch By: Vladislav
This was SVN commit r19391.
2017-04-09 02:12:20 +00:00
32c0dc773e Fix memory leak in CCmpPathfinder, patch by Sandarac.
The terrain grid can be renewed without proper deallocation, which
happens at least at the start of a game when MT_TerrainChanged is sent.

Reviewers: wraitii, Itms

Differential Revision: https://code.wildfiregames.com/D247
This was SVN commit r19388.
2017-04-08 15:58:10 +00:00
7f07237bba Serialize the queue of cinematic paths playing and resume upon deserialization. Thereby fix an OOS on rejoin when a cinematic path is playing.
Move path de/serialization to private helper functions.

Differential Revision: https://code.wildfiregames.com/D299
Patch By: Vladislav
Refs #3814

This was SVN commit r19382.
2017-04-08 00:10:02 +00:00
ffea346abb Atlas camera controls should be disabled too if a cinematic path is paused.
Reviewed By: Vladislav
This was SVN commit r19376.
2017-04-05 04:00:19 +00:00
5d49e6c456 Move most cinematic path simulation data and control from the graphics class to the simulation component and solve the hash mimatch in non-visual replay.
Move graphics code to smaller helper functions UpdateSessionVisibility,
UpdateSilhouettesVisibility and DrawPaths.
Remove the hotkey TODO code which should be implemented differently.
Mark voids as const.

Differential Revision: https://code.wildfiregames.com/D271
Patch By: Vladislav
This was SVN commit r19375.
2017-04-05 03:59:20 +00:00
c0708da215 Fix the Mustang template. Add tests for the UnitMotionFlying component.
Patch by bb.
Reviewers: Itms

Differential Revision: https://code.wildfiregames.com/D139
This was SVN commit r19373.
2017-04-03 09:58:01 +00:00
1e07787e76 Revert 64bit number conversions added in c0ca70efd2, don't add the previous long and unsigned long conversions back and use double in the Replay menu.
64bit conversions (including the long ones) are not safe, because not
every number can be converted to the 2^53 JS numbers and pretending to
do so is asking for bugs.
Explicitly use the double type in the Replay menu, because std::time_t
is unspecified and some platforms like Ubuntu yakkety:i386 fail to
build, looking for long.
Double should work for the next 285 million years, becomes consistent
with SavedGame.cpp, is tested by test_ScriptConversions.cpp and doesn't
pretend to cover all 64bit numbers.

Patch By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D205
Refs #3848 D84 D112

This was SVN commit r19367.
2017-04-01 21:06:55 +00:00
dbd56403b9 Allow hiding of list columns via XML or JS.
Differential Revision: https://code.wildfiregames.com/D228
Reviewed By: Vladislav
This was SVN commit r19353.
2017-03-28 00:25:17 +00:00
4523c50850 Fix a vertex shader data pielup in the actor editor. It was reloading the shaders far too often.
Patch by Echotangoecho.
Differential Revision: https://code.wildfiregames.com/D93
This was SVN commit r19346.
2017-03-25 07:44:31 +00:00
35377c51a7 Capture The Relic gamemode.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D152
This was SVN commit r19345.
2017-03-25 07:01:07 +00:00
27f37ccd21 Cleanup the rest of the mess introduced with the NonGaiaEntities functions in 8c7b6dceaa.
Add a test for the GetNonGaiaEntities function of the RangeManager
broken by that commit that was fixed by f3e4e619bc.
Don't call one script function from another, but directly call into the
Selection helper like the others.
Don't make a loop around that RangeManager function for all players but
call the function once for all players.
The pointless virtual keywords were removed by 8827db201a.

Differential Revision: https://code.wildfiregames.com/D166
Reviewed By: leper
This was SVN commit r19344.
2017-03-25 02:42:51 +00:00
b9441a6a8d Ensure m_Territory in cmpTerriotryManager.IsTerritoryBlinking. Fixes #4466.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D261
This was SVN commit r19343.
2017-03-25 01:43:14 +00:00
e69e10ef5f Small RangeManager cleanup.
Use std::set's logarithmic find instead of a linear loop.
Early return and some whitespace for getParabolicRangeForm.

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D260
This was SVN commit r19342.
2017-03-25 00:11:08 +00:00
9e6571c461 Some cinema path cleanup.
Could possibly fix a compilation failure with some compilers in
36330732fa.

Patch By: Vladislav
Differential Revision: https://code.wildfiregames.com/D250
This was SVN commit r19341.
2017-03-24 22:49:06 +00:00
9f50bf3f1e Only dereference cmpWaterManager if it is non-null.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D259
This was SVN commit r19340.
2017-03-24 21:32:49 +00:00
3648ba448d Some const for scriptinterface.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D155
This was SVN commit r19339.
2017-03-24 18:47:03 +00:00
9cf84c6800 Fix documentation of non system component.
Summary: -

Test Plan: -

Reviewers: Itms, leper

Reviewed By: leper
Subscribers: Vulcan, O1 C++ Simulation

Differential Revision: https://code.wildfiregames.com/D221
This was SVN commit r19337.
2017-03-24 07:09:28 +00:00
ff452de1f7 Mark GetAnimationName as const
Differential Revision: https://code.wildfiregames.com/D248
Reviewed By: leper
This was SVN commit r19325.
2017-03-22 23:07:01 +00:00
fdda57565b Display which clients are still in the loading screen
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D120
Fixes #4375

This was SVN commit r19320.
2017-03-21 18:50:29 +00:00
36330732fa Allow Cinematic Path nodes that only specify a camera position or direction and group them by deltatime.
Remove the support of saving the rotation of camera position nodes,
because that should be rewritten to use a custom spline.

Patch By: Vladislav
Differential Revision: https://code.wildfiregames.com/D124
Refs #3814

This was SVN commit r19317.
2017-03-20 15:26:34 +00:00
208b5b6dd8 Use a minimum height of at least one space character of the current font size when drawing list rows.
Use the maximum height of all cells of the current row.
Lobby games with empty servernames are not rendered weirdly anymore.

Patch By: Vladislav
Fixes #4402

This was SVN commit r19306.
2017-03-17 01:10:49 +00:00
d093f714d7 Use XML files instead of hardcoded C++ code in the template manager to universally change template properties at load time.
Patch By: leper
Differential Revision: https://code.wildfiregames.com/D215
Fixes #2951

This was SVN commit r19302.
2017-03-16 19:56:12 +00:00
c288a91c6d Add a GetAnimationName getter function for the VisualActor component, so that the simulation can not only set an animation but also find out which one is currently being played.
Differential Revision: https://code.wildfiregames.com/D219
Reviewed By: bb
This was SVN commit r19299.
2017-03-15 14:27:51 +00:00
17068bbf82 Update Lobby Bot README.
Reviewers: Itms

Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D79
This was SVN commit r19264.
2017-03-02 19:19:45 +00:00
39fcd1d031 Implement clientside kick/ban support for the lobby.
Displays a chat notification for all lobby clients if a client is kicked
or banned, pop up a message box for the affected one, including the kick
reason.
Clean the player- and gamelist upon disconnect and disable the control
elements.

Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D116
This was SVN commit r19250.
2017-02-28 11:16:46 +00:00
f3e4e619bc RangeManager returns Gaia entities in GetNonGaiaEntities
refs #4495
Reviewed By: leper, elexis
Differential Revision: https://code.wildfiregames.com/D164
This was SVN commit r19245.
2017-02-26 10:26:35 +00:00
360ba27865 Cleanup of CCmprangeManager
Summary: Following discussions in https://code.wildfiregames.com/D60 the
use of u8 to store each boolean has been cleanup up. Now only one u8 is
used, thus reducing the size of the struct.

Reviewed By: leper
Differential Revision: https://code.wildfiregames.com/D101
refs #3834

This was SVN commit r19242.
2017-02-24 19:15:54 +00:00
a0a0895a12 Pass some strings and a vector as const refs.
Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D160
This was SVN commit r19240.
2017-02-24 17:02:10 +00:00
5e5b5be656 Improve component cache lookup performance slightly.
We do not need iteration order, and this makes this explicit.

Reviewed By: echotangoecho
Differential Revision: https://code.wildfiregames.com/D82
This was SVN commit r19235.
2017-02-22 19:27:58 +00:00
e1e4ef0370 Add UpdateAutoScroll calls to some events where they were missing. For example when deleting, cutting, pasting, autocompleting or doubleclicking text. Patch by Vladislav, fixes #4401.
This was SVN commit r19234.
2017-02-22 15:28:09 +00:00
e0f7578fbe Ensure unique client GUIDs. Patch by sbirmi, fixes #3949.
Two clients chosing the same GUID is highly unlikely, yet possible.
A malicious client chosing an existing GUID would have resulted in
unassigning the player with that GUID.

This was SVN commit r19225.
2017-02-14 16:54:34 +00:00
5f8f7bae20 Stay ready button
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D49
Fixes #4369.

This was SVN commit r19216.
2017-02-10 16:09:10 +00:00
0e2d2610c9 Display a nice error message when trying to register too many lobby accounts
(This is a workaround that will be removed when gloox has fixed the
issue.)

Reviewed by: elexis
Refs #3771
Differential Revision: https://code.wildfiregames.com/D87
This was SVN commit r19205.
2017-02-07 15:05:26 +00:00
5130bb69d3 Use std::time_t in the replay menu (as 64bit integer conversion are implemented now) and remove the unused filemoddate fallback.
Differential Revision: https://code.wildfiregames.com/D112
Reviewed By: echotangoecho
This was SVN commit r19200.
2017-02-05 02:18:33 +00:00
c0ca70efd2 Fix 64-bit integer script conversions by removing the discrepancy between Windows and Linux.
Patch by echotangoecho, fixes #3848.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D84
This was SVN commit r19189.
2017-01-30 10:21:08 +00:00
584ccd690e Remove lib/pointer_typedefs.h. Patch by echotangoecho.
Reviewed By: Itms, leper
Differential Revision: https://code.wildfiregames.com/D83
This was SVN commit r19184.
2017-01-29 00:06:28 +00:00
6ae2db53db Employ some variadic macros to make some of the C++ -> JS function calling code nicer.
Template-ize CallFunctionVoid.
Changes CallFunction parameter order to make template parameter
deduction with
variadic parameters work nicely.

Reviewed By: Itms, wraitii, Yves
Differential Revision: https://code.wildfiregames.com/D77
This was SVN commit r19183.
2017-01-28 23:37:15 +00:00
fd5bd8e301 Fix 9964bee5bb.
Differential Revision: https://code.wildfiregames.com/D100
Reviewed By: Imarok
This was SVN commit r19182.
2017-01-28 20:47:26 +00:00
a74fcdcb35 Durations over 1 hour aren't displayed correctly
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D44
refs #4418, #3350

This was SVN commit r19180.
2017-01-28 10:59:53 +00:00
c2d0327af9 Implement shared vision at the entity level
Summary:
To fix tickets like #3335, having a shared vision at the entity level is
needed. This patch implements that in CCmpRangeManager, interfaced with
a new JS component VisionSharing to manage the shared entities visions.
As an example of use case (in addition to garrisoning in allied
structure without the sharedLos tech), we can think of bribing enemy
units: there is a part about it in the patch, but this one is very wip
and not intended to be committed but rather for test purposes of the
feature.
So when garrisoning a unit in another player's building, the vision of
the garrisonHolder is shared (part intended for review). In addition,
for tests of the feature, when clicking on the new bribe icon in the
diplomacy window, a random unit of the chosen player is bribed and share
its vision during 15 s.

Test Plan: Garrison a unit in an allied structure without the sharedLos
tech, or test the wip bribe feature from the diplomacy window.

Reviewers: Itms

Reviewed By: Itms
Subscribers: Stan, leper, O11 Templates, wraitii, elexis, fatherbushido,
Itms, Vulcan, O1 C++ Simulation

Differential Revision: https://code.wildfiregames.com/D60
This was SVN commit r19175.
2017-01-26 21:10:46 +00:00
9964bee5bb Change the NetServer Broadcast function to send the given message to clients that are in one of the states specified by the caller.
Thus remove the peculiarity to broadcast to clients that are in the
gamesetup, loading screen or ingame, but not rejoining ones.

Fix "unknown player" errors in the GUI by broadcasting player
assignments to rejoining players too. Fixes #4036.

Differential Revision: D17
Reviewed By: Imarok
This was SVN commit r19171.
2017-01-25 19:04:17 +00:00
4f01db4831 Split TurnManager classes into individual files per class. Patch by echotangoecho, fixes #4095.
Remove the "Net" prefix from the non-networked classes.
Use variadic macros and mark the client turnmanager as NONCOPYABLE.

Differential Revision: D16
Reviewed By: leper
This was SVN commit r19165.
2017-01-24 02:04:50 +00:00
8fec942e8a Fix Atlas under macOS Sierra.
We were polling SDL messages from two different threads (by mistake),
and Sierra now refuses to do that.
Tested by Stan, Itms, Fatherbushido, and discussed with Philip for the
code change itself.
Fixes #4408.
Differential Revision: https://code.wildfiregames.com/D42
This was SVN commit r19160.
2017-01-21 09:54:08 +00:00
be1a205f91 Add support for const methods in components and make those that can be const const.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D75
This was SVN commit r19156.
2017-01-20 02:25:19 +00:00
678e082230 Remove the "quit" simulation command and restrict the "set-shading-color" simulation command to AIs,
since they are only useful for AI debugging and counterproductive in
multiplayer mode, refs #3551.

Instead, enable AI developers to exit the game from a new AI API
command,
allowing to batch simulate matches. Refs #2755.

Differential Revision: D65
Reviewed By: leper
Consulted: mimo

This was SVN commit r19155.
2017-01-19 14:45:32 +00:00
b3b47c1718 Avoid recreating the dirtiness grid every turn by swapping. Significantly reduces the number of allocations, and slight speedup (particularly on larger maps). Reviewed by Leper.
Differential Revision: https://code.wildfiregames.com/D70
This was SVN commit r19149.
2017-01-17 07:24:41 +00:00
0a6a42321d Improve cache efficiency of CcmpPathfinder::UpdateGrid substantially. On very large maps, this can be a very substantial improvement (I have measured up to 30ms)
This was SVN commit r19146.
2017-01-16 10:41:35 +00:00
ad76352cef Prevent the AI manager from copying the pathfindinder dirtiness grid every turn.
Review by Itms

Differential Revision: https://code.wildfiregames.com/D25
This was SVN commit r19145.
2017-01-16 08:38:31 +00:00
3a85d0b3fa Remove unused parameter from template loading code
Templates should be the same for all players, techs can be used to
provide
different lists of templates if that is needed.

Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D25
This was SVN commit r19142.
2017-01-15 18:41:53 +00:00
103a59ec1e Fix a space tab inconsistency detected by python3.
This was SVN commit r19139.
2017-01-13 08:40:54 +00:00
b5991e188b TemplateLoader cleanup.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D26
This was SVN commit r19119.
2017-01-07 17:52:32 +00:00
2bae30c454 Fix [19027] by using generic code for conversions and fixing a few other issues. Refs #3403. Reviewed by leper.
Also fix some of the warnings that jenkins showed.

Differential Revision: https://code.wildfiregames.com/D24
This was SVN commit r19115.
2017-01-06 11:14:03 +00:00
3c8fc4f263 Return "local" from GetPlayerGUID to avoid duplicate checks and allow AIs to send private messages to the single player. Refs #4431.
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D38
This was SVN commit r19112.
2017-01-05 10:22:39 +00:00
4068f2e14a Fix warning with GCC in our lowlevel PNG texture code.
Ensure a variable is not clobbered by libpng's use of longjmp. Make code
more consistent.

Differential Revision: https://code.wildfiregames.com/D35
This was SVN commit r19111.
2017-01-04 21:05:08 +00:00
81eb74163e Happy New Year *cough*(Years)*cough*!
Also fix some whitespace.

This was SVN commit r19110.
2017-01-04 21:00:16 +00:00
11ce52f8c5 Fix a few mistakes in the lobby readme.
Differential Revision: https://code.wildfiregames.com/D27
This was SVN commit r19087.
2016-12-31 00:11:30 +00:00
fd8df9143b Remove some semicolons at end of line in a python script.
This was SVN commit r19073.
2016-12-27 09:42:02 +00:00
55e9fee616 Add ptol civ and hero class to template analyzer tool.
This was SVN commit r19067.
2016-12-26 20:31:01 +00:00
490a3a27f6 Fix the cache directory appearing during tests.
Summary: Refs #4419.

Test Plan: When running tests, make sure nothing is created.

Reviewers: leper

Reviewed By: leper
Subscribers: leper, Vulcan

Differential Revision: https://code.wildfiregames.com/D1
This was SVN commit r19062.
2016-12-25 22:03:30 +00:00
40fd373c83 Revert [19043]
This was SVN commit r19054.
2016-12-21 12:36:41 +00:00
a4c68b664b Add the executable flag to the translation maintenance script
This was SVN commit r19047.
2016-12-18 17:36:40 +00:00
8e8da9aee4 Fix a bug introduced by a fix of a bug introduced by a fix of a bug (x100) in the vertex pathfinder. Revealed by automated tests on another branch of mine. Revert back to pre-new pathfinder behavior of not returning paths in some cases, since that is most likely less broken than now - but probably still a little broken.
This was SVN commit r19043.
2016-12-18 10:02:36 +00:00
9288837472 Fix misleading indentation warning on gcc, introduced by [19024]. Reported by elexis. Fixes #3785
This was SVN commit r19041.
2016-12-13 13:34:31 +00:00
e7eeb6927d Remove deprecated water parameters. Patch by paulobezerr. Partial review by FeXoR. Fixes #4292.
This was SVN commit r19040.
2016-12-12 23:46:46 +00:00
507ecff2ed Scroll to the top when switching between tabs in the credits. Patch by vladislavbelov
This was SVN commit r19036.
2016-12-11 21:15:50 +00:00
06333708f8 Fix animation syncronisation between actor props. Fixes #2324 one more time. Refs [18568] and [18265]. Reported by
wowgetoffyourcellphone

This was SVN commit r19031.
2016-12-08 23:16:54 +00:00
78bc56f33e Display the updated batch size immediately when using the batch-train/barter hotkey, instead of waiting for the next turn. Patch by elexis. Fixes #3194
This was SVN commit r19028.
2016-12-07 19:18:57 +00:00
977a5c7ca2 Add C++ GUI code for drawing charts. Patch by vladislavbelov. JS will come later. Refs #3403
This was SVN commit r19027.
2016-12-07 19:03:54 +00:00
e7e5631135 Better fix to #3785. Fixes #3785
This was SVN commit r19024.
2016-12-06 23:25:26 +00:00
fe77783145 Change color of disabled labels and dropdowns, patch by vladislavbelov, fixes #4350
This was SVN commit r19020.
2016-12-05 17:21:51 +00:00
6ae374dbee Fix the update of shared dirty visibility masks when changing diplomacy.
The previous code worked in case new mutual allies were added, but, when
some were removed, it was suboptimal in terms of performance and it made
some units visible in the FoW.

Fixes #4266

This was SVN commit r18994.
2016-11-24 14:57:09 +00:00
a27dc31b0e Remove some obsolete backref logic from the deserializer. It was introduced in earlier versions of the SpiderMonkey API.
Name some variables more logically in one test.

Fixes #4244

This was SVN commit r18993.
2016-11-24 14:47:49 +00:00
808dd347b6 Play cinematic paths on arbitrary cameras to prepare previews of the camera frustum in atlas. Patch by Vladislav, refs #3814.
This was SVN commit r18992.
2016-11-23 14:50:47 +00:00
417c84870c Actually remove trailing tabs from source/.
This was SVN commit r18991.
2016-11-23 14:09:58 +00:00
c49c665edb Disable SDL text input events before actually focusing a text input element. Patch by echotangoecho, refs #3870.
Thus don't add a "t" to the chat input after opening it with the hotkey
on unix.
The bug still occurs on Windows due to an SDL bug reported upstream by
echotangoecho.

This was SVN commit r18990.
2016-11-23 13:29:47 +00:00
6149dd3841 Actually remove trailing whitespace for non-header files as well.
This was SVN commit r18989.
2016-11-23 13:02:58 +00:00
944ba16eb4 End source files with a newline.
This was SVN commit r18988.
2016-11-23 11:27:54 +00:00
b18f74da44 Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/.
This was SVN commit r18987.
2016-11-23 11:18:37 +00:00
aa7e2fce49 Don't subtract the scrollbar size from GUI dropdowns when there is no scrollbar. Patch by Imarok, reviewed by mimo, refs #3571.
Remove unused button_width.

This was SVN commit r18984.
2016-11-22 13:05:56 +00:00
7ff7fcd240 Support hardcoded translation comments when extracting strings from JSON files.
Correct the function description of extractFromFile introduced in
ae10d34d99.

This was SVN commit r18963.
2016-11-19 14:16:50 +00:00
a3c3ca79cf Save the config file even it does not exist, patch by Vladislav Belov, fixes #4146
This was SVN commit r18960.
2016-11-18 18:06:01 +00:00
aa26863d5c Fix an OOS on rejoin caused by ParamNode.cpp using an invalid node cache. Patch by leper, fixes #4316.
Reuse the temple of vesta inheritance from 06bf79b7e8 which was affected
by this bug.

This was SVN commit r18942.
2016-11-15 14:01:15 +00:00
3008533c8e Add a template manager test that reveals an inheritance error in ParamNode.cpp which can trigger an OOS on rejoin. Patch by leper, refs #4316.
This was SVN commit r18941.
2016-11-15 13:51:29 +00:00
2bf1dbfd13 An awesome Rejoin-test tool by wraitii and Itms, fixes #4242, refs #3460.
Contrary to the serializationtest, initializes the secondary simstate
only once
before progressively applying updates.
Thus reproducing actual multiplayer rejoining, enabling developers to
analyze OOS reports solely from the replay file of the rejoined and a
non-rejoined client.

This was SVN commit r18940.
2016-11-15 13:26:58 +00:00
f3ab043c91 Rename isReplay to isNonVisualReplay becuase it is false for visual replays.
This was SVN commit r18937.
2016-11-14 17:19:53 +00:00
948d2a4635 Clear particle emitters when ending a game so they don't leak into new games. Patch by Vladislav, fixes #4111.
This was SVN commit r18936.
2016-11-14 17:16:59 +00:00
3f5648767d Scroll to the selected element after the selection changes. Fixes #4254, refs #3742.
This was SVN commit r18935.
2016-11-14 15:28:49 +00:00
34ce0f865d Reset the cursor when opening new GUI pages. Patch by danger89, refs #539.
Remove duplicate cursor image and duplicate hardcoded default paths.

This was SVN commit r18933.
2016-11-14 13:23:07 +00:00
2ec3f3ebaa Add parenthesis suggested by gcc 5.4 following 3e59ac76ee, refs #4278.
This was SVN commit r18924.
2016-11-12 16:07:23 +00:00
3e59ac76ee fix UnitMotion when inside the obstruction, refs #4278
This was SVN commit r18921.
2016-11-11 13:14:30 +00:00
e55ee5048e Bump version number to Alpha 22.
Remove "new" keyword from Alpha 21 maps.
Remove "new pathfinder" hint from Alpha 19, as reported by fcxSanya.
Show chat timestmaps by default.

This was SVN commit r18919.
2016-11-11 01:46:12 +00:00
12ad190a51 Allow .Deleted to work on directories. Fixes #2641. Patch by leper.
This was SVN commit r18916.
2016-11-10 22:52:39 +00:00
aba2e53714 Update the list of bundled languages for A21.
This was SVN commit r18900.
2016-11-01 16:33:33 +00:00
4898e94c81 Remove unneeded braces and whitespace in empty lines.
This was SVN commit r18882.
2016-10-28 16:11:59 +00:00
5a384f4eaf Fix an OOS on rejoin when a ptolemian lighthouse revealing the shoreline was built prior. Patch by Itms and wraitii, fixes #4277.
Serialize the mapsize in the pathfinder and the reveal shoreline flag in
the range manager.
Reload the rangemanager data after other components have been
deserialized.
Use the SerializeCommon pattern in the pathfinder to avoid code
duplication.
Move the shoreline logic from the Vision component to the range manager.
Remove unused interface mocks from the rangemanager test following
b05879e151.

This was SVN commit r18879.
2016-10-28 15:34:24 +00:00
44f0929ea6 Don't throw FSM update errors (type=16 state=6) when kicking clients while others haven't finished the authentication, loading screen or synchronization yet, refs #3241.
This was SVN commit r18859.
2016-10-23 15:44:02 +00:00
20399b72f1 Fix a bug where the networked game would never start if a client would disconnect while synchronizing, fixes #4289.
This was SVN commit r18858.
2016-10-23 15:13:16 +00:00
7f8f820e35 Fix an oversight in d8c11434a8/18823, fixes #4270 .
This was SVN commit r18835.
2016-10-16 20:17:31 +00:00
0991c22026 Take vision range techs into account on ownership change (capturing or defeat). Solves an OOS, reviewed by wraitii, fixes #4279, refs #3989.
This was SVN commit r18833.
2016-10-15 18:22:10 +00:00
9c2404e40e Some tweaks in order to fix the non-graphical test modes (serialization test, etc.), and possible future non-visual players like headless game servers.
The internal data of the component, which is serialized, should not
depend on the presence of a visual Unit.

Also remove a misleading comment about a simple initialization code.

Refs #4270

This was SVN commit r18824.
2016-10-10 10:56:13 +00:00
ef7486c5d3 Fix a number of things in cmpVisualActor:
* Rewrite the Update function, add more details and information in
comments, and properly serialize everything that function needs.
* Fix the broken deserialization code by using a sane helper function.
* Fix the `SelectMovementAnimation` function.

Fixes #4270.

This was SVN commit r18823.
2016-10-10 10:49:49 +00:00
d8c11434a8 Save the animation sync offset, for consistency's sake.
Refs #4270

This was SVN commit r18822.
2016-10-10 10:41:36 +00:00
79b37bd4dc Improve style and whitespace in CCmpVisualActor.
Refs #4270

This was SVN commit r18821.
2016-10-10 10:37:58 +00:00
0030f6ad2b In CCmpVisualActor, m_Unit is not initialized when running without graphics, so we must check that pointer everytime. Also make one call consistent with the rest of the file.
Fixes #4238, refs #3952

This was SVN commit r18812.
2016-10-08 08:49:35 +00:00
636da605bb Following e757fb84d5: also regenerate the JS values for AI maps upon deserialization.
Fixes #4247, refs #4191

This was SVN commit r18797.
2016-10-01 12:29:44 +00:00
58704fa140 Remove a function relying on systems that are not optimized at all. This function is not actually used by Petra.
If it is needed at some point, this map should be handled and updated
the same way as the passability map and territory map are.

Refs #4191

This was SVN commit r18760.
2016-09-24 15:21:20 +00:00
e757fb84d5 More clever map updates for the AI.
This patch fixes frequent memory issues by removing several dummy
allocations and a lot of memory footwork.

Fixes #4191

This was SVN commit r18759.
2016-09-24 15:16:55 +00:00
172c222e9b Fix a possible source of segmentation fault in our custom version of ObjectIdCache.
Patch by echotangoecho, refs #4053

This was SVN commit r18757.
2016-09-24 13:48:11 +00:00
caef42084d Add missing JSAutoRequest calls. (hopefully all of them have been spotted now)
Patch by echotangoecho, refs #4053

This was SVN commit r18730.
2016-09-18 09:34:45 +00:00
c92e74138a Use the local timezone when localizing UTC timestamps. Patch by Imarok, fixes #3350, refs #2938.
Thus show the correct time in the lobby, savegame and replay menu.

This was SVN commit r18725.
2016-09-15 13:16:48 +00:00
24a488bacc Increase the maximum observer limit to 32 for the upcoming release, refs #4210.
This was SVN commit r18719.
2016-09-11 22:46:00 +00:00
e0c30745f9 Template manager cleanup. Patch by leper, refs #2951.
Move an early return to the top of the function.
Add an early return in case an error was determined.
Remove unneeded variables ok and templatePath.
Replace includeSubdirectories boolean with a flags int to merge
duplicate vfs::ForEachFile calls.

This was SVN commit r18696.
2016-09-04 15:28:36 +00:00
c2078bd0c6 Supress an error warning that isn't valid for unsortable ordered lists and hide sorting sprites if sorting is disabled. Based on patch by Imarok, refs #3905.
This was SVN commit r18694.
2016-09-03 22:22:11 +00:00
8284cc4302 SpiderMonkey 38 upgrade: 35/35
Some comments for the next SpiderMonkey upgrade. That's all folks, fixes
#3708

This was SVN commit r18689.
2016-09-02 16:55:13 +00:00