Commit Graph

5693 Commits (stable-5.4)
 

Author SHA1 Message Date
Sven Eberhardt 50a6ccf009 Fix SolidMasks in editor mode when no viewport is opened. Do not re-put SolidMasks every frame on movable but non-moving objects.
Selecting a GL context during SolidMask initialization is not a very good solution. But as long as SolidMasks are stored in graphics surface we have no choice.

A better solution would be to generate a dedicated (non-OpengL) surface for SolidMask data on object loading. But then objects that have SolidMasks would need to be tagged somehow.
2014-01-03 15:13:09 +01:00
Sven Eberhardt 5865042849 Scoreboard library: Add functions to remove rows and columns. 2014-01-03 12:44:36 +01:00
Sven Eberhardt 616945d220 Remove superfluous TODO comment.
I checked it. It does work :-)
2014-01-03 12:43:58 +01:00
Sven Eberhardt f12fe2a24a Call MaxContentsCount using this->MaxContentsCount() to allow runtime overload 2013-12-30 13:46:34 +01:00
Sven Eberhardt 21c132d2cb Fix StaticSaveVar saving to save string, not object pointer. 2013-12-30 12:24:41 +01:00
Sven Eberhardt faeb4efd53 MovingBrick: Ensure only one movement effect is active at a time. 2013-12-30 03:09:44 +01:00
Sven Eberhardt 0db19586c8 Save StaticSaveVar as property in Objects.c
Otherwise, you'd have to re-set it every time you edit objects files in the editor.
2013-12-30 03:09:13 +01:00
Sven Eberhardt 56f985a017 Fix some failsafeties in HUD when controlling non-Clonk crew objects 2013-12-30 02:11:48 +01:00
Sven Eberhardt e157b1b673 Docs: Renamed GetPlrColor to GetPlayerColor. 2013-12-29 22:34:11 +01:00
Sven Eberhardt 74243429c0 Fix Wait-command. 2013-12-29 21:57:26 +01:00
Sven Eberhardt 2f0ea1ec09 Always save direction of Clonks when saving scenarios.
Direction is randomized at creation and there's no good way to find out if the user wanted that specific direction. So just always save it, because that's what scenario designer usually wants.
2013-12-29 17:54:36 +01:00
Sven Eberhardt 4e656912f1 Fix loading of Objects.c when returning to main section from another scenario section 2013-12-29 17:46:45 +01:00
Sven Eberhardt 49b2c75475 Added helper function Particles_Colored - creates a colored version of a base particle. 2013-12-29 15:08:52 +01:00
Sven Eberhardt 649e06039f Fix null pointer in power helper object when power plant is destructed.
The power system isn't written in a very failsafe way when it comes to object destruction. Why are "helper objects" needed now that we have proplists to store such things?
2013-12-29 14:44:14 +01:00
Sven Eberhardt 33d85a145e Fix particle-related crash.
ClearAllParticles deleted the particle lists but never bothered to clear any pointers to them.
2013-12-28 21:30:45 +01:00
Sven Eberhardt a385102c36 Changed GetDefBottom to use bottom vertex to determine object bottom.
Since this is the method also used by CreateObject, GetDefBottom can be used to recreate objects at their proper position.
2013-12-27 17:11:02 +01:00
Sven Eberhardt 5094cc5c1b Reworked "Save as scenario" option in editor to write a script file instead of Game.txt. 2013-12-27 17:10:09 +01:00
Nicolas Hake 70ab95021f Remove autotools files
Building OpenClonk with GNU autotools has been broken since early August
at least (9ceb692). Since nobody complained so far, I'm assuming nobody
has used it recently, and opted to remove the broken code.
2013-12-25 22:29:37 +01:00
Nicolas Hake adc50f3b23 Replace ancient README files with a not quite as ancient one
I merged most of the three separate README files into a single one. I
also assumed that people trying to build OpenClonk from source have a
rough idea of how their build system works, so I removed the tutorial
from there. People who are completely new to this should consult the
wiki or ask on IRC.
2013-12-25 22:18:43 +01:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
David Dormagen 921f21e9a6 allocate particle lists for C4Objects lazily
This should fix an error with incorrect particle lists after loading. This is also a cleaner way overall, since only a fraction of all objects will ever have particles attached to them
2013-12-22 18:51:05 +01:00
David Dormagen aeb057a4b1 made C4ParticleChunk uncopyable to prevent double-deletion of OpenGL buffers leading to a crash 2013-12-22 17:23:47 +01:00
David Dormagen b70b195e24 particles: use OpenGL buffer-objects and vertex-arrays-objects for particle drawing
Even though the whole data is (still) transmitted every frame, I get a pretty high (2x) performance increase on my system. I suspect that the graphics card has to allocate less memory every frame.
2013-12-21 14:07:14 +01:00
Martin Plicht a616a1a6cd script: And I forgot to copy-paste a ‘!’, yay 2013-12-21 13:28:36 +01:00
Martin Plicht d699ba80a5 script: Fix some minor nil/0/parameter passing issues, fix some <variable> = <variable> noop issue and convert some while loop into a for loop 2013-12-21 13:23:51 +01:00
Tobias Zwick ac4ac04558 Merge branch 'master' of ssh://git.openclonk.org/openclonk 2013-12-18 12:48:14 +07:00
Tobias Zwick db6a31cc7a add localized error for each player that could not be loaded (#693) 2013-12-18 12:47:08 +07:00
David Dormagen 078899d0a0 added safety check for when calling CreateParticleAtBone without object context 2013-12-17 22:32:02 +01:00
David Dormagen a10c9316ef renamed DynamicParticles* to Particles* and CreateParticleEx to CreateParticle 2013-12-17 22:32:01 +01:00
David Dormagen 02f54ba1eb removed the legacy particle system from the engine and docs 2013-12-17 22:32:01 +01:00
Tobias Zwick 325053410f rename script callback UpdateTransferZone to OnSynchronized (#220) 2013-12-17 23:16:11 +07:00
Tobias Zwick 3587c34e39 fix documentation (#848) 2013-12-17 22:20:26 +07:00
David Dormagen e42450ef5b different optimizations to particle creation
This patch might speed up particle creation by around 25%. See crucible review https://crucible.openclonk.org/cru/ENGINE-15
2013-12-16 17:34:15 +01:00
Armin Burgmeier 2cf11a1d6a Pre-compute Z values before face ordering (#984)
Pre-computed floating point numbers can be safely used in the comparison
function, whereas recomputation every time the sort function is called might
lead to a crash when the computed number is slightly differently every time,
because the sort function would return different results for the same faces.
2013-12-16 11:55:29 +01:00
Armin Burgmeier eddbbe3857 Make sure we never create mesh instances with 0 faces 2013-12-16 08:13:59 +01:00
Sven Eberhardt 09b46130a1 Fix mape build 2013-12-15 15:59:26 +01:00
Sven Eberhardt 25ddb14dca Rework prop list renumbering on section load (again).
Turns out changing prop list numbers while they are still indexed by number in the hash map was a bad idea. Existing prop lists are now de-numbered, pushed to an external shelve and re-numbered when added after section load.
2013-12-15 15:46:18 +01:00
Sven Eberhardt 1cca6fd1ad Rework section load again.
Now clears numbers of all existing proplists and renumbers them after loading. Fixes some assertions and duplicate numbers during loading.
2013-12-15 14:06:21 +01:00
Sven Eberhardt 4af3203840 Fix runtime error if arrow is removed in ProjectileHit. 2013-12-14 22:02:53 +01:00
Sven Eberhardt 29d1b4846a Fix scenario sections
Inactive objects got removed and calling section load from global effects caused a crash.
2013-12-14 18:16:39 +01:00
Sven Eberhardt a9a2470ace Fix accelerator hotkeys.
They were broken since keys aren't passed as VK-codes but as scancodes now. Tested under Windows only.
2013-12-14 12:24:07 +01:00
Sven Eberhardt 8d1fbd1401 Fix engine internal smoke.
Smoke() used to create a Smoke particle directly, but the particle definitions changed. Now it just calls the global script function to create smoke.
2013-12-14 12:09:31 +01:00
Tobias Zwick dd3de2f0c9 Merge branch 'issue-251' 2013-12-09 21:45:54 +07:00
Tobias Zwick 33f99bd361 buildfix for linux 2013-12-09 21:21:41 +07:00
Tobias Zwick a3c641b6fc fix error on negative timeouts in the scheduler for linux 2013-12-09 00:50:02 +07:00
Tobias Zwick 74087e2fc2 remove superfluous IsScheduledExecution
use C4TimeMilliseconds::PositiveInfinity instead to denote that the next tick should not be executed.
2013-12-09 00:50:01 +07:00
Tobias Zwick b97d250aef adapt C4TimeMilliseconds usage in C4AppGTKImpl to the infinity-usage 2013-12-09 00:49:59 +07:00
Tobias Zwick 5bcd762206 C4TimeMilliseconds returns a StdCopyStrBuf to avoid memory errors 2013-12-09 00:49:58 +07:00
Tobias Zwick e9eea97864 make rest of the code not use C4TimeMilliseconds-pointers but instead use the infinity field. 2013-12-09 00:49:57 +07:00
Nicolas Hake 71dbd5bcfb Use std::numeric_limits<> instead of INT32_MIN/INT32_MAX
We're implementing parts of <stdint.h> ourselves for old compilers, and
these macros aren't part of our compatibility interface.

Additionally, [C99 §7.18.2] (unfortunately, MSVC ignores this):
"226) C++ implementations should define these macros only when
__STDC_LIMIT_MACROS is defined before <stdint.h> is included.", which it
wasn't, so it wasn't portable in the first place.
2013-12-08 14:13:15 +01:00