Lukas Werling
880981ad31
Fix build on systems with non-long regex index types
2016-09-18 19:40:32 +02:00
Maikel de Vries
823b13d764
add simple string to integer conversion function
...
Just a basic one in C4Script for now.
2016-09-18 11:30:35 +02:00
Lukas Werling
fbb8ad5d87
Add RegexSplit()
2016-09-18 11:10:19 +02:00
Lukas Werling
219f81f004
Regex: Fix off-by-one error
2016-09-18 10:49:06 +02:00
Lukas Werling
619ad27a91
Regex: Fix infinite loop with zero-length matches
2016-09-18 01:16:06 +02:00
Lukas Werling
db12ed7c99
Remove FindSubstring as it's really really slow
...
Use RegexSearch() instead, which is 100 times faster for large strings
(see benchmark results below).
Example benchmark:
global func TestFindSubstring(int iterations)
{
var result;
for (var i = 0; i < iterations; i++)
{
result = FindSubstring(hamlet, "and");
}
return result;
}
global func TestRegexSearch(int iterations)
{
var result;
for (var i = 0; i < iterations; i++)
{
result = RegexSearch(hamlet, "and");
}
return result;
}
global func RunBenchmark(int iterations)
{
StartScriptProfiler();
Log("FindSubstring: %d iterations", iterations);
var substr = TestFindSubstring(iterations);
Log("RegexSearch: %d iterations", iterations);
var regex = TestRegexSearch(iterations);
StopScriptProfiler();
if (!DeepEqual(regex, substr))
Log("Results differ: %v vs %v", substr, regex);
}
Results:
FindSubstring: 100 iterations
RegexSearch: 100 iterations
Profiler statistics:
==============================
48903ms Global.FindSubstring
48903ms Global.TestFindSubstring
47979ms Global.TakeString
00504ms Global.TestRegexSearch
00016ms Global.PushBack
==============================
2016-09-17 20:08:43 +02:00
Lukas Werling
b614209593
SDL: Use OpenGL 3.1 if 3.2 is not available (like WGL)
2016-09-17 12:32:18 +02:00
Nicolas Hake
6a6f4520d3
Merge pull request GH #25 from Mailaender/appdata
...
Added a Linux AppData file
2016-09-17 11:55:43 +02:00
Nicolas Hake
59173dbd12
Merge pull request GH #27 from lheckemann/master
...
Require Qt 5.4+ for editor — needs QOpenGLWidget
2016-09-17 11:03:00 +02:00
Linus Heckemann
355b6fe070
Require Qt 5.4+ for editor — needs QOpenGLWidget
2016-09-17 08:23:07 +01:00
Lukas Werling
d7cd224a4f
Add functions RegexReplace, RegexSearch and RegexMatch
2016-09-16 23:46:03 +02:00
Maikel de Vries
4b54b86d30
add function to find substrings
2016-09-16 17:25:22 +02:00
Mark
ae1de739b0
Wooden Bridge: Return other bridge in CombineWith()
...
Apparently the return value is not used anywhere; the change allows chaining multiple bridges in a comfortable call.
2016-09-15 19:25:16 +02:00
Mark
58d42b8fd8
Library Lamp: Extracted functions.
...
Did this change a long time ago, probably for re-using functions in a derived object.
2016-09-15 19:17:17 +02:00
Sven Eberhardt
0cdad64934
Fix goal and rule displays ( #1811 )
2016-09-14 21:46:16 -04:00
Sven Eberhardt
22af9f0e8c
Fix landscape placement functions ( #1820 , #1821 )
2016-09-14 21:30:57 -04:00
Sven Eberhardt
61b1ab08ad
Editor: More shortcuts; show helper shortcuts in tools menu
2016-09-10 01:17:40 -04:00
Sven Eberhardt
d3d7256fec
Fix missing achievement in Krakatoa's Krach ( #1819 )
2016-09-10 01:17:39 -04:00
Lukas Werling
8d9657a800
Change default puncher address to netpuncher.openclonk.org
2016-09-09 18:31:39 +02:00
Sven Eberhardt
2490ef4584
Editor: Add more shortcut keys
2016-09-09 00:56:16 -04:00
Sven Eberhardt
e67e429fef
Editor: Improve default layout and raise proper dialogues on tool change
2016-09-09 00:56:15 -04:00
Lukas Werling
c41f93a2f6
Fix c4script and mape build
2016-09-08 21:45:30 +02:00
Lukas Werling
f7376169b9
Fix crash when starting a game in fullscreen mode
2016-09-08 21:26:59 +02:00
Lukas Werling
7177c261b3
Bring back and fix the netpuncher
...
As carrier-grade NATs are becoming common, many players cannot host
Clonk games at all. The simple STUN-like netpuncher from Clonk Rage
which was removed three years ago is already effective against some
DS-Lite NATs.
With some extensions, we should be able to make it work with more
restrictive NATs as well.
This reverts commit 72002cc366
.
2016-09-08 21:10:06 +02:00
Sven Eberhardt
53b365a6d2
Editor: Add shortcuts, menu items, tooltips
2016-09-08 01:56:01 -04:00
Sven Eberhardt
0e02bad837
Editor: Disable reinit scenario button if no scenario is loaded
2016-09-08 00:25:17 -04:00
Sven Eberhardt
b95d1387a4
Editor: Add "reset to saved scenario" command
2016-09-07 01:53:54 -04:00
Sven Eberhardt
856730aabd
Fix some signed/unsigned warnings
2016-09-07 01:53:54 -04:00
Sven Eberhardt
2c20204021
Add C4SECT_ReinitScenario flag for LoadScenarioSection
...
This also resets the script engine and does player init callbacks. Useful to restart the scenario in the editor.
2016-09-07 01:53:53 -04:00
Lukas Werling
3d5f2f012a
Fix openclonk-server build
2016-09-06 22:12:06 +02:00
Maikel de Vries
f76e056cea
add new items to knowledge in worlds
2016-09-06 17:06:05 +02:00
Maikel de Vries
17f98bd235
add helper functions chars
2016-09-06 17:06:05 +02:00
Sven Eberhardt
a882a6e64b
Fix black editor screen due to GL object creation and removal in wrong context
2016-09-06 02:45:17 -04:00
Sven Eberhardt
5523e685fb
Fix script engine assertion on game clear
2016-09-06 01:13:53 -04:00
Sven Eberhardt
dee6086e1d
Fix access violation in proplist-to-static conversion
2016-09-06 01:09:29 -04:00
Sven Eberhardt
282a561462
Add editor props and user actions for boiling lava and acid
...
Also optimize the timer
2016-09-06 00:06:37 -04:00
Sven Eberhardt
6aeeff0545
Add Library_Stackable editor props
2016-09-05 20:19:25 -04:00
Sven Eberhardt
db986e3dd7
Allow repeated ejection of infinite material stack counts in bucket and barrel
2016-09-05 20:08:30 -04:00
Sven Eberhardt
3330c592e3
Improve PlayerStart initial material setting to allow specification of weapon ammo, stackable stack count and liquid contents
2016-09-05 20:01:47 -04:00
Sven Eberhardt
ba371db0e6
Editor property enum delegate: Improve grouping when an item is also a group
2016-09-05 19:19:33 -04:00
Sven Eberhardt
d70506ee2e
Improve GetDefinitionGroupPath script function
...
* Now works on _this instead of parameter
* Now works before editor window opened
2016-09-05 18:30:04 -04:00
Sven Eberhardt
41dde5e7d0
Add script function GetDefinitionGroupPath
2016-09-05 02:00:01 -04:00
Sven Eberhardt
34058e13f9
Fix default assignment of selected object in user action filtered object evaluators
2016-09-05 02:00:00 -04:00
Sven Eberhardt
117ddac8b4
Auto-unstick animals and objects on ground in saved scenarios
2016-09-05 01:59:59 -04:00
Sven Eberhardt
31ead2507a
Add Unstick() script function
...
Also add a position parameter to Stuck() script function.
2016-09-05 01:59:58 -04:00
Nicolas Hake
2e4afb70a9
OS X: Make bundling of libraries recursion-safe ( #1818 )
...
Bash variables are global by default. Therefore, recursing into sub-
dependencies was breaking ID updates in the dependency parent.
Mark variables that are local to each recursion step as local so that
their original value gets restored when the recursion returns.
2016-09-04 14:11:51 +02:00
Sven Eberhardt
6a78a9facb
Fix scenario saving of some animal and plant properties
2016-09-04 02:52:03 -04:00
Sven Eberhardt
ebfebca87b
Sequence: "Start Game" trigger uses first player as triggering player
2016-09-04 02:15:09 -04:00
Sven Eberhardt
3669f28b75
Fix array property delegate default value to write a copy instead of a reference when it's a static prop list
2016-09-04 02:14:30 -04:00
Sven Eberhardt
dc77020586
Add user actions: Invincibility and invisibility
2016-09-03 22:07:10 -04:00