Commit Graph

11259 Commits (master)
 

Author SHA1 Message Date
gitMarky 4a2048575f Refactor movement code (#87)
Improve readability by adding appropriate parentheses and braces, and fixing misleading/confusing whitespace. Extract SolidMask removal to a function since it's used in several places.
2019-03-05 21:15:39 +01:00
David Dormagen 765d9a24e9
Merge pull request #86 from fohly/master
better confetti for Boomshire
2019-03-02 10:19:55 +01:00
Philip Holzmann a844b6fe5b better confetti for Boomshire 2019-03-02 09:29:30 +01:00
Lukas Werling c9ee2c3eab Fix "no matching sound" error spam
Previously, the error message was only silenced for openclonk-server,
but appeared for openclonk if compiled without sounds.

Possible side effect: no local sounds will play if the global Sound.ocg
cannot be loaded. I don't think this is something we should support.
2019-02-20 09:36:35 +01:00
Lukas Werling 319dc87eea Remove #undef new/delete before Qt includes
This has not been necessary anymore since a1885006 ("Remove MS CRT
memory management debugging").
2019-02-19 15:35:00 +01:00
Lukas Werling 60841c1d96 Write text files with unix file endings
The old LineFeed constant caused problems with Qt. Using \n directly is
easier and I don't think there's a reason left to use \r\n anyways.
We've always converted the files in the repository. Nowadays, even
notepad.exe works with unix file endings.
2019-02-19 15:28:12 +01:00
isilkor a00566ca9e
Merge pull request #85 from isilkor/better-warning-pragma-parsing
Better warning pragma parsing
2019-02-17 14:04:00 +01:00
Nicolas Hake a0c9bfd931 Aul: Correctly check for enable/disable keywords in warning pragma
The parser was only checking that the passed setting matched the
beginning of the expected keyword, instead of checking for the full
length. This way, users could write "#warning e" instead of the
expected "#warning enable" and still have it work.
2019-02-17 11:58:03 +01:00
Nicolas Hake c8d22e321b Aul: Throw correct exception on parameter-less warning pragma
When no parameter followed the "#warning" pragma, because the end
iterator would be located before the begin iterator, basic_string's
constructor would throw std::length_error. Check for this case
beforehand so we can throw the expected C4ParseError instead.
2019-02-17 11:58:03 +01:00
Lukas Werling 918c4139e8 Add Flintbrawl by Zapper 2019-02-03 19:14:53 +01:00
Lukas Werling ee35d256aa Add basic character classes to WildcardMatch() 2019-02-03 19:14:53 +01:00
Lukas Werling 75d4ac2512 Fix team count inconsistency with random teams (#2051)
Switching to random teams would remove all teams but the first two on
the host, but not on the clients. With this fix, the extra teams are
removed on the clients as well. This fixes a desync when using
GetTeamCount() in a sync-relevant way.
2019-02-02 00:27:36 +01:00
Lukas Werling f6fba582f3 Fix star placement on full map screenshots (#1454) 2019-01-30 22:50:23 +01:00
Linus Heckemann c7550bd43c openclonk-server: install 2019-01-20 12:49:39 +01:00
Linus Heckemann 69fd50bee1 nix expression: fix build
Now that openclonk gets installed to bin, we don't need to (and
can't!) create the symlink anymore.
2019-01-20 12:38:54 +01:00
isilkor ad2eddcd63
Merge pull request #80 from isilkor/check-setlength-parameter-for-nil
Script: Test SetLength parameter 0 for nil (GH #79)
2019-01-05 19:47:38 +01:00
Nicolas Hake 486619b653 Script: Test SetLength parameter 0 for nil (GH #79)
SetLength didn't check whether its first parameter was valid, and
attempted to dereference a NULL pointer when passed nil.
2019-01-05 19:25:35 +01:00
Lukas Werling 3a59c15250 Add openclonk:// protocol handler (#1657) 2019-01-02 17:16:09 +01:00
Nicolas Hake d7ea9acfea C4Property: Don't use operator void* in tests anymore either 2019-01-01 22:20:04 +01:00
Nicolas Hake 5cf852d8ab C4Property: Add missing template<> specifier
MSVC doesn't care, apparently.
2019-01-01 21:55:42 +01:00
Nicolas Hake 0a81206b7e C4Property: Remove raw operator void*
operator void* is a quick and dirty workaround for the lack of
explicit operator bool in old C++ standards. Since we can use
explicit operator bool now, we don't need the operator void*
anymore.

Incidentally, that operator also allowed C4Set to equality compare
C4Property entries, which is unintuitive. Replace it with an
explicit specialization of C4Set::Equals.
2019-01-01 21:35:08 +01:00
Nicolas Hake 31c7805f10 C4Set: Replace elements with zero-initialized ones on clear
C4Set used to set its removed elements to nullptr. This requires
some special handling from non-pointer entries like C4Property.
Overwriting the element with a zero-initialized one removes this
requirement, leading to improved type safety on the part of
C4Property.
2019-01-01 21:35:08 +01:00
Nicolas Hake 15ad4fb690 MSVC: Disable incremental linking
LTCG doesn't work with incremental linking, but unless we explicitly
disable incremental linking, CMake tells the linker to attempt it.
2019-01-01 21:26:30 +01:00
Nicolas Hake 3a8830af6e C4Effect: Remove obsolete fire effect constants
These constants aren't used anywhere inside the engine anymore and
should therefore be removed.
2019-01-01 20:52:38 +01:00
Nicolas Hake 1b2f2889ad Old CMake: Correctly handle try_compile with language standard flags
CMake before 3.7 didn't properly pass the standard selection flags
to try_compile. Wrap try_compile on old CMake versions so that the
flag gets passed.
2018-12-31 17:34:34 +01:00
Nicolas Hake bc88820d57 Travis: Use CMake 3 on Ubuntu Trusty 2018-12-31 14:53:07 +01:00
Nicolas Hake 3edc6d9ead Fix misleading indentation on several controlled statements
The C++ standard doesn't require us to stuff multiple statements
onto the same line, so we should avoid this for readability reasons.
This is especially true if one of the statements is controlled and
others aren't.
2018-12-31 14:27:14 +01:00
Nicolas Hake dca6d2caaf C4Landscape: Correct really badly misleading indentation
Some code here was indented like it still belonged to the loop
above, but never did, and was never intended to. This is an
excellent argument for why braces are good, especially for
statements which span more than one line.
2018-12-31 14:17:23 +01:00
Nicolas Hake 7cd79b1eaa CMake: Use native Qt5 config instead of bad reimplementation
Qt5 already ships CMake configuration files with proper dependencies
so there's no need to build our own broken test for it.
2018-12-31 12:48:19 +01:00
Nicolas Hake 3b0891ba89 CMake: Remove #define for standard C++ features
We don't need to have a macro that just tells us that we're in fact
using standard C++. Especially if it isn't used anywhere.
2018-12-31 12:37:34 +01:00
Nicolas Hake b012189af4 CMake: Remove <stdint.h>, <inttypes.h> tests
<stdint.h> and <inttypes.h> are part of the C standard and available
on every platform with a conforming compiler.
2018-12-31 12:33:49 +01:00
Nicolas Hake c638647227 CMake: Remove <locale.h> test
We're not using the <locale.h> header anywhere besides including it
for no purpose, so we can drop the test (and the inclusion).
Additionally, the header is part of standard C++.
2018-12-31 12:30:06 +01:00
Nicolas Hake 8298813a90 CMake: Remove <direct.h> test
We're not using the <direct.h> header anywhere besides including it
for no purpose, so we can drop the test (and the inclusion).
2018-12-31 12:20:39 +01:00
Nicolas Hake 15f4a06cd4 CMake: Require C++14 support
CMake now supports compiler features (including language level), so
we can directly require C++14 instead of testing for compiler-
specific flags.
2018-12-31 12:15:49 +01:00
Nicolas Hake b702f1583c CMake: Update requirements to 3.5.1
CMake 3.5.1 is the version that ships with Ubuntu 16.04 LTS. Ubuntu
14.04 LTS was already unsupported by our build, so we don't need to
worry about that.
2018-12-31 11:51:21 +01:00
Nicolas Hake 606ad23e02 CMake: Deprecate CMAKE_ADDITIONAL_DEPS_PATH
The variable completely duplicates a different one and also intrudes
on CMake's own namespace. It should therefore be removed when
possible.
2018-12-31 11:34:18 +01:00
Mark a29d6f005c Added method for getting the connected object 2018-12-28 00:34:57 +01:00
Mark cd38671f61 Pipe control: Begin integrating limits into the library
Not sure about air pipes yet, those should theoretically be either
source or drain, instead of a separate connection category?

See also:
https://bugs.openclonk.org/view.php?id=1871
2018-12-28 00:14:54 +01:00
Mark 2a045a097b Renamed folder 2018-12-27 21:33:45 +01:00
Mark a8c475d212 Renamed pipe control internals 2018-12-27 21:31:36 +01:00
Mark 00b1b37787 Renamed Library_Tank to Library_PipeControl
The library did not depend on the Library_LiquidContainer script at all,
removed that include and added it to the previous includers.
Removed the IsLiquidTank() identifier, because it was unused.
2018-12-27 21:21:53 +01:00
Mark 94e200f201 Fix smoke and gravity issue
Smoke used to fly higher with gravity 40 than with gravity 10. Fixed
this by using a start value. At default gravity, light smoke will fly
rise a little higher now, and heavy smoke behaves the same.
With higher gravity the smoke may fall to the ground now.
2018-12-27 20:30:58 +01:00
Mark d0756e3b1c Producer: Allow overloading where the producer takes components from 2018-12-27 19:51:19 +01:00
Mark 68bb07f162 Allow more options for customization in the resource selection icons 2018-12-27 17:45:32 +01:00
Mark 3f2ee5080d Limit liquid input to the maximum available amount 2018-12-25 16:53:47 +01:00
Mark 1c9164b4be Collect cut pipes to Clonk inventory, if possible 2018-12-25 15:53:51 +01:00
Mark f5b1279cce Formatted code 2018-12-25 15:16:38 +01:00
Mark 431456d1fa Use new library in pump 2018-12-25 11:13:01 +01:00
Mark 8a26454f3c Library: Resource selection
The resource/material selection from the pump was practical, maybe even
applicable for cable cars and the like. Extracted a separate library for
that.
2018-12-25 11:11:44 +01:00
Mark bab1b7ee90 Extracted actual producer logic||Certain external projects have different systems and want to just use the logic on their own, without copy & paste of the file contents. 2018-12-21 21:29:45 +01:00