Commit Graph

9275 Commits (07e8c75bac387df28983d5d47196b7c5fd3c571c)
 

Author SHA1 Message Date
Lukas Werling 07e8c75bac Replace libupnp with miniupnpc
- The new code works with my router while libupnp didn't. :)

 - There are some unexplainable crashes in libupnp: #1640

 - Using miniupnpc seems to be less complex than libupnp.

 - Apparently, miniupnpc also works on Windows, so we may be able to use
   it for all platforms.

Disadvantage: UPnP queries aren't asynchronous anymore, but they seem to
be pretty fast (< 1 s).
2016-05-29 23:38:12 +02:00
David Dormagen acde7c923a fix possible crash on cleaning up particles
It could happen that the objects were cleared (after evaluation screen / on section change) but a particle list would remain that would still point to an object (and would then access it).
I am not exactly sure how that could happen, because objects should clear their particle lists on removal (and thus shouldn't really need a ClearPointers).
There is a tiny chance that this points to another bug somewhere in the object removal - that's just a random guess though.

Anyway, this should fix the infamous Knüppeln crash.
2016-05-28 23:22:33 +02:00
David Dormagen 2df2946016 OnInIncendiaryMaterial: check for object removal after energy loss 2016-05-27 22:19:41 +02:00
Günther Brammer 57a35bf01b Don't crash on functions declared inside other functions
Declaring a local variable inside any function works the same way as
declaring it in top-level scope, which gets a bit weird if done inside a
function inside a constant proplist, but is at least consistent.

Thanks to Flinti for reporting this.
2016-05-25 01:06:10 +02:00
Lukas Werling a71ca69f1d Make ingame mouse cursor size configurable
On High-DPI displays, the mouse cursor is very tiny. We'll probably want
some high-resolution cursor graphics at some point, but the current ones
scale good enough.
2016-05-23 21:14:03 +02:00
Lukas Werling 435fe98b71 SDL: Handle key repeats 2016-05-22 23:27:57 +02:00
Maikel de Vries fb60bf41b8 remove spurious comment in flagpole script 2016-05-21 13:34:35 +02:00
Maikel de Vries 3455fa24f9 add some variation to the maximum size of trees 2016-05-21 13:34:34 +02:00
Maikel de Vries 18f2b4831a add max size option to StartGrowth 2016-05-21 13:34:34 +02:00
Maikel de Vries e92e7a2e2c fix producer components call after liquid_container branch merge 2016-05-21 13:34:34 +02:00
Maikel de Vries 6c8c4c9c19 allow more components than def for Oversize objects 2016-05-21 13:34:34 +02:00
Maikel de Vries 2a731b2545 implement Components as a property lookup table 2016-05-21 13:34:34 +02:00
Maikel de Vries 62ad9eb53b reimplement components scaling with object completion 2016-05-21 13:34:34 +02:00
Maikel de Vries a81ccaab22 add function to make properties writable
Thanks to Guenther for the implementation details, documentation will follow when it is considered a stable solution.
2016-05-21 13:34:34 +02:00
Maikel de Vries 8291298af1 add script callback on completion change 2016-05-21 13:34:34 +02:00
Maikel de Vries 6794b3b630 remove object component functionality from the engine 2016-05-21 13:34:34 +02:00
Maikel de Vries 1df322b7ff adapt objects and scenarios to new component implementation 2016-05-21 13:34:34 +02:00
Maikel de Vries 4833f839d2 script implementation of GetComponent and SetComponent
This allows to remove the engine functionality and is based on the property Components = [[def1, amount1], [def2, amount2], ...]. Follow up commits will remove the engine functionality.
2016-05-21 13:34:33 +02:00
Maikel de Vries c40edd3fbd remove duplicate moss object in Experimental.ocd 2016-05-21 13:34:33 +02:00
Maikel de Vries accd897b91 rename NoComponentMass to NoMassFromContents
This had nothing to with components, and risk of backwards compatibility is minor.
2016-05-21 13:34:33 +02:00
Maikel de Vries 00d5a06ec0 remove option to display components in old style menus 2016-05-21 13:34:33 +02:00
Maikel de Vries dff30d60f5 removed undefined constants C4MN_Extra_MagicValue and C4MN_Extra_MagicValue from docs 2016-05-21 13:34:33 +02:00
Maikel de Vries fcd3678748 remove unused function ComponentAll 2016-05-21 13:34:33 +02:00
Maikel de Vries 183ab4c4a0 remove unused function ComposeContents 2016-05-21 13:34:33 +02:00
Maikel de Vries 5841b55f7e remove unused function GetNeededMatStr 2016-05-21 13:34:33 +02:00
David Dormagen c820dac7c3 classic menu style: only show count if applicable
Otherwise, it would show "0x" for stuff where the count did not matter.
2016-05-21 13:19:49 +02:00
Nicolas Hake 3fd1187833 Don't overload CompileNewFunc with rvalue reference parameters
We don't need to pass the C4ValueNumbers* as a rvalue reference, and
doing so needs const qualifiers on MSVC.
2016-05-21 12:56:57 +02:00
Günther Brammer 5941fdc391 docs: Update de.po with the current english texts 2016-05-16 18:50:32 +02:00
Günther Brammer d23ffde361 Merge script branch 2016-05-15 19:21:26 +02:00
Günther Brammer 6763f2b5c7 Silence complaints about missing functions in EffectCall (#1736)
All the other effect callbacks silently ignored missing functions, either
by using the Call variant that doesn't complain about it, or checking for
the missing function themselves.
2016-05-15 19:20:43 +02:00
Günther Brammer ef515cc3c7 Script: Prototypes for CreateEffect should inherit from Effect
This makes the special effect properties useable without the "this." prefix,
makes the various useful global functions available as well as
effect-specific functions.
2016-05-15 15:22:42 +02:00
Günther Brammer a12b5e5ad7 docs: Enable navigation to cells in a table 2016-05-15 15:20:08 +02:00
Günther Brammer a4680868d8 docs: Scroll to the desired position in the page when navigating 2016-05-15 15:20:08 +02:00
Günther Brammer 0559a93f88 Script: CreateEffect effects do not get their target in callbacks
They can use the Target property instead.
2016-05-15 15:20:08 +02:00
Günther Brammer 3aa6978c4e Script: Effects have their target as a property "Target" 2016-05-15 15:17:18 +02:00
Günther Brammer c0d32f8f4e Remove redundant target parameters from effect implementation 2016-05-15 15:17:17 +02:00
Günther Brammer 6aaf7cd2ef Store a pointer to the effect target in the effect itself 2016-05-15 15:17:17 +02:00
Günther Brammer 3e5d982475 Allow modifications to Scenario local vars from /script 2016-05-15 15:17:17 +02:00
Günther Brammer 408ac90cd7 Scenario effects: Use Scenario and not Scenario->GetPrototype() as this() 2016-05-15 15:17:17 +02:00
Günther Brammer f927717458 CreateEffect initializes the name of the new effect
Effects with prototypes were supposed to inherit their names from the
prototype, but the effect prototypes are also supposed to get their names
from ParentKeyName, which is not inherited. Maybe that'll change, but for
now this matches how old effects work.
2016-05-15 15:17:17 +02:00
Günther Brammer 5c6a805fd5 Add move constructor to C4Value 2016-05-15 15:17:17 +02:00
Günther Brammer c2edd9b6fd Add noexcept to the Std*Buf move constructors
Apparently this is recommended so that a std::vector actually uses the
move constructor. In any case, the second parameter wasn't used, so this is
a nice simplification as well.
2016-05-15 15:17:16 +02:00
Günther Brammer 9e8d644a26 StdAdaptors: Make mkParAdapt(mkPtrAdaptNoNull(), Par1, Par2) work
Employ variadic template arguments and more rvalue references for this.
Sadly, StdParameterAdapt itself is even more complicated, since it has to
store the parameters instead of just forwarding them, so the limit is still
two parameters. But that's twice as much as before in many cases.
2016-05-14 22:59:59 +02:00
Nicolas Hake 8e18a3fc96 Change (int)0 to nil where deprecated 2016-05-13 17:13:34 +02:00
Nicolas Hake 511e3bbb36 Aul: Deprecate implicit conversion from 0 to object/proplist/def/string
Instead of (int)0, nil should be used to signify "no object" etc.
2016-05-13 16:28:45 +02:00
Nicolas Hake 78e5f8528d C4PropList::GetParent: make const 2016-05-12 18:47:53 +02:00
Nicolas Hake be2fdaaae3 C4Particles: Fix build with MSVC memory tracing 2016-05-12 18:47:52 +02:00
David Dormagen 771bd802f0 particles: re-added missing intialization of ibo_size
Thanks to ck, who noticed. Apparently it got lost when reverting some changes back and forth for testing, because I had one revision where I didn't need it anymore but I reverted most of that.
2016-05-12 10:03:02 +02:00
Nicolas Hake 13e02bb418 C4Random: Fix build with MSVC memory tracing 2016-05-11 17:15:47 +02:00
Nicolas Hake 5872b5e8ae C4AulFunc::GetFullName: make const 2016-05-11 17:15:47 +02:00