Commit Graph

18328 Commits

Author SHA1 Message Date
elexis d662ab5a0f Move getMapSize to the RandomMap object, refs #4964.
This was SVN commit r20997.
2018-01-24 04:28:30 +00:00
elexis 1242356f95 Move getMapCenter and getMapBounds to the RandomMap object, refs #4964.
The reference to the global should not be hidden behind a proxy function
and
object orientation is preferable over procedural code in general.

This was SVN commit r20996.
2018-01-24 04:21:22 +00:00
elexis b11563ddff Delete InitMap and ExportMap proxies and let the random map define the RandomMap object, refs #4804.
Eventually there should be no direct reference to g_Map in the library,
refs #4964.

This was SVN commit r20995.
2018-01-24 04:10:00 +00:00
elexis a97279b4df Use vectors for cornerHeight, getExactHeight, validH and rename the latter to to validHeight, refs #4992.
Use the height getter and setter rather than directly operating on the
prototype member, which also simplifies the code.

This was SVN commit r20994.
2018-01-24 04:04:33 +00:00
elexis b4820b3995 Use vectors for validT and rename it to validTile, refs #4992.
This was SVN commit r20993.
2018-01-24 01:34:47 +00:00
elexis 13bd540c45 Fix x/z typo in Schwarzwald in cbcbd19e0b and wrong forest density in Deep Forest in 2ac3d3119d.
This was SVN commit r20992.
2018-01-24 01:16:57 +00:00
elexis 19c9a2489a Sacrifice celtic ritual hack, refs 026dcf10eb / D204.
This was SVN commit r20991.
2018-01-24 00:24:08 +00:00
elexis 0f52c011d7 Add missing rmgen2 adaptation to Placers returning vectors in 2ac3d3119d. Reported by Grugnas.
This was SVN commit r20990.
2018-01-23 22:30:37 +00:00
elexis 5245e9983b Rename expectException from 1cdc8f1356 to TS_ASSERT_EXCEPTION.
Move it from the test of the testsetup to the setup of the tests, so it
can be reused by tests, refs #4759, D871.

This was SVN commit r20989.
2018-01-23 20:00:52 +00:00
elexis b3fa0aaf0f Use vectors for setTexture, refs #4992.
Simplify duplicate Caledonian Meadows and Wild Lake height-based texture
painting by using for-of loops, texture setter and vectors, refs #4845,
#4998.
Allow setTexture to write to impassable tiles as reported by FeXoR some
time ago, refs #4245.

This was SVN commit r20988.
2018-01-23 19:42:13 +00:00
mimo e7c9a2be50 remove a leftover comment in 4c2269135b
This was SVN commit r20987.
2018-01-23 18:57:51 +00:00
temple c4c7b08758 Reset bounding box overlay
Differential Revision: https://code.wildfiregames.com/D712
Comments by: bb
This was SVN commit r20986.
2018-01-23 18:48:13 +00:00
mimo 4c2269135b petra: improve a08606a9d9 so that it also works in naval maps
This was SVN commit r20985.
2018-01-23 18:46:53 +00:00
elexis 366db189e8 Fix consistent-return linting issue reported by mimo in 442c9848b8.
This was SVN commit r20984.
2018-01-23 17:59:59 +00:00
elexis c02db59c96 Use vectors for getHeight and remove the global proxy, refs #4992.
This was SVN commit r20983.
2018-01-23 17:54:30 +00:00
mimo 5025bcb1c5 fix loot warning from d8ed8b1462 reported by temple
This was SVN commit r20982.
2018-01-23 17:53:42 +00:00
elexis e9394e2f75 Fix missing change in Ardennes Forest in 2ac3d3119d and create the explorable Area correctly following 9272153ee7.
This was SVN commit r20981.
2018-01-23 17:49:04 +00:00
elexis a5de00b9c4 Use vectors in the Terrain prototype, refs #4992.
This was SVN commit r20980.
2018-01-23 16:52:01 +00:00
elexis 55a0d194b5 Use vectors for inMapBounds, refs #4992.
This was SVN commit r20979.
2018-01-23 15:52:58 +00:00
elexis 1b786af5ad Use vectors in Constraints, refs #4992.
This was SVN commit r20978.
2018-01-23 15:31:25 +00:00
elexis 2ac3d3119d Return vectors instead of objects with x and z property for all Placers and Painters, refs #4992, #4845.
Create the vectors sooner, so that the conditions can use them
eventually too and since the loops might be replaced with vector
getters.
Fix missing comma in Deep Forest de2f30c7b9.
No measurable performance decline was noticed.

This was SVN commit r20977.
2018-01-23 14:49:31 +00:00
elexis 5447a20318 Delete checkIfInClass proxy from 59ce8b3081.
This was SVN commit r20975.
2018-01-23 04:43:08 +00:00
elexis 6550d3a71c Pass vectors to the ChainPlacer instead of the components individually, refs #4992, #4845.
Support non-integer numbers.

This was SVN commit r20974.
2018-01-23 03:40:39 +00:00
elexis 23e0a6c888 Pass a vector to createStoneMineFormation, refs #4992.
On India,
remove another mysterious lake size area factor on India, refs #4958,
increase the lakesize on small maps and
simplify constraints.

This was SVN commit r20973.
2018-01-23 03:16:28 +00:00
elexis 948c0b1026 Revert ineffective Alpine Lakes code from a2477f9d40.
It is ineffective because the first action of createAreas is to
overwrite the carefully chosen location with a random location.
The code was evidently copied to Island Stronghold, Polar Sea and
African Plains, refs #4805.

This was SVN commit r20972.
2018-01-23 02:50:55 +00:00
elexis de2f30c7b9 Pass a vector to the ClumpPlacer instead of the vector components individually, refs #4992.
Support non-integer values and remove some unneeded floor / rounds.
Use more vector math in Caledonian Meadows, Oasis and Wild Lake, refs
#4845.

This was SVN commit r20971.
2018-01-23 00:25:39 +00:00
elexis 4dde7a4df5 Pass position vectors to the PathPlacer rather than each component individually, refs #4992.
Every PathPlacer constructor already has the two vectors in place, refs
#4845.
The code becomes shorter (operations not copied once per dimension) and
more readable (normalize, perpendicular).
Performance can improve even.

This was SVN commit r20970.
2018-01-22 23:01:34 +00:00
elexis 7fa7e0b596 Fix wrong PathPlacer failfraction computation in bc805bd357, refs #892.
It unintentionally used the dist variable of the inner loop, not the
dist variable reflecting the path length.
It was never noticeable since the few PathPlacers called with
Constraints either had failCount 0 or
exceeded the allowed failures by a factor of thousands.
All PathPlacer calls were intended to succeed or fail completely.
Hence set the default failFraction to 0.

This was SVN commit r20969.
2018-01-22 22:34:41 +00:00
bb ef459a7a0e Fix a tab button crash since the buttons are not initialized before the first tick in gamesetup
Reviewed By: elexis
Spotted By: ffffffff
Differential Revision: https://code.wildfiregames.com/D1244
This was SVN commit r20968.
2018-01-22 21:43:41 +00:00
bb 9571c56d7e Add civ settings in lobby for the selected game
Patch By: ffffffff
Differential Revision: https://code.wildfiregames.com/D1235
This was SVN commit r20967.
2018-01-22 20:37:49 +00:00
mimo a08606a9d9 petra: fix cases when the ai would stop an attack although the enemy had still some units, and some cleanup
This was SVN commit r20966.
2018-01-22 18:42:03 +00:00
mimo d8ed8b1462 Cleaning of GetEntityState part 2
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1227
This was SVN commit r20965.
2018-01-22 18:02:38 +00:00
Imarok dd12d3b8e1 Move Replays from Tools & Options submenu to the main menu
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D820
This was SVN commit r20964.
2018-01-22 15:26:13 +00:00
elexis 034124e8d8 Fix range overlay color after deserialization following 5fbb224dc0 / D555, refs #3915.
Since the component initialization order is the alphabetic filename
order and
since the RangeOverlayRenderer < Player < Selectable, the new file in
that commit introduced the issue.
Similar to 36b315ca32, refs #4632.

UpdateColor function taken from temple's D754

This was SVN commit r20963.
2018-01-22 06:50:35 +00:00
elexis 36fba76a74 Revert unintentional function rename in 40cc3aaa09.
Don't troll OOS-debugging developers with aura ranges rendered in an
invisible color, refs 5fbb224dc0 / D555.

This was SVN commit r20961.
2018-01-22 06:02:52 +00:00
elexis a43c654a98 Only initially focus the chat input in multiplayer gamesetup, so that the Tab hotkeys new in D1027 / D1176 are immediately available in singleplayer.
Also focus the chat after having clicked the Send button.

This was SVN commit r20960.
2018-01-22 05:15:51 +00:00
elexis 36821e0937 Use Tab and Shift+Tab as the default hotkey to switch tabs.
Patch By: fpre / ffffffff
Comments By: bb
Differential Revision: https://code.wildfiregames.com/D1176
Refs #4982

This was SVN commit r20959.
2018-01-22 05:06:52 +00:00
elexis 8aaff7fc62 Implement an auto-scroll setting for GUI lists.
Patch By: fpre / ffffffff
Fixes #4987, refs #4254

This allows the replay menu and lobby to focus the selected element if,
but only if it is expected by the user.
Replaces 3f5648767d which scrolled the selected player into view every
single time a new playerlist was received by the lobby server.

This was SVN commit r20958.
2018-01-22 04:45:27 +00:00
elexis 3d65bfe555 Randomize the river angle on Danubius, refs #4855.
This was SVN commit r20957.
2018-01-22 04:29:30 +00:00
temple 2b501c9fa6 Fix formation animation warning
Differential Revision: https://code.wildfiregames.com/D998
Reviewed by: wraitii
Fixes: #3239

This was SVN commit r20956.
2018-01-22 03:00:41 +00:00
temple 7214cfc991 Add a visibility check to FindNearbyResource and FindNearestDropsite
Differential Revision: https://code.wildfiregames.com/D1161
Reviewed by: s0600204
Comments by: bb
This was SVN commit r20955.
2018-01-22 02:49:57 +00:00
temple 340cda5d57 Use obstruction rather than footprint in dock placement
Differential Revision: https://code.wildfiregames.com/D1163
Reviewed by: wraitii
Comments by: mimo, s0600204
Fixes: #4843

This was SVN commit r20954.
2018-01-22 02:34:46 +00:00
elexis d5af005a00 Expose INVALID_PLAYER to the JS simulation and use it instead of -1 for consistency with the C++ counterpart.
This was SVN commit r20953.
2018-01-22 01:02:29 +00:00
elexis 1315d9beb6 Move domestic animal Cost to the trainable templates new in aec1ff5493 / D1071.
Fix lineendings of recent templates.

Discussed with: bb on irc

This was SVN commit r20952.
2018-01-21 23:40:59 +00:00
elexis 83d3e4f7a4 Fix undefined player color errorspam in Atlas after placing an entity, changing the civ and starting the simulation following 343ec21e75 / D623, refs #4643.
The commit had removed the fallback color as there is no traceable use
case.
Copy the Player color from the old to the new player entity in
ReplacePlayer before the ownership changes occur, so that it is always
initialized before read.

Refs 9329506e0d
Reported By: temple
This was SVN commit r20951.
2018-01-21 23:30:38 +00:00
temple dde855f7d5 Use correct distance for determining nearest dropsite
Use the distance to the nearest point on the dropsite's obstruction
rather than the center of the dropsite.

Differential Revision: https://code.wildfiregames.com/D1160
Reviewed by: wraitii
Comments by: bb, elexis
Fixes: #4592

This was SVN commit r20950.
2018-01-21 21:21:21 +00:00
temple 70290e8a22 Add a tile owner check in territory decay
Differential Revision: https://code.wildfiregames.com/D1225
Reviewed By: mimo
Comment By: elexis
Fixes: #4787
Refs: #4681, #4749

This was SVN commit r20949.
2018-01-21 20:01:12 +00:00
Stan 6458b04f1d Add missing template in a7d20b184e
This was SVN commit r20948.
2018-01-21 19:06:36 +00:00
Stan a7d20b184e Make the zebu trainable in the mauryan corral, as what was asked initally in #1992
Discussed with: Mimo, elexis
Funny Image: Itms

This was SVN commit r20947.
2018-01-21 18:39:38 +00:00
elexis d97542e9c6 Fix missing update to options.json in be06299e28 / D1128.
This was SVN commit r20946.
2018-01-21 17:09:07 +00:00