Commit Graph

6685 Commits (alternate-lights)
 

Author SHA1 Message Date
Nicolas Hake df7d19c7c5 Improve C4Landscape const correctness 2015-01-15 19:13:36 +01:00
Nicolas Hake f943866d36 Remove unused and unimplemented C4Landscape::FindMatPathPull
The function has been stubbed since we imported the code from CR.
2015-01-15 19:13:33 +01:00
Maikel de Vries e993b0725e lorry ejects contents on destuction from explosion 2015-01-15 18:34:35 +01:00
Maikel de Vries 75cb5ce800 more tests for exploding containers 2015-01-15 18:31:23 +01:00
Maikel de Vries 91cd68d641 improve explosions propagating inside containers
This fixes the double damage done to containers and iterates through all parent containers until one is found which contains the blast
2015-01-15 17:46:54 +01:00
Maikel de Vries a0faaf9082 add Test scenario for explosions in containers 2015-01-15 17:46:54 +01:00
Maikel de Vries 615b26b453 RemoveObject(true) first tries to put contents into parent container before exiting them 2015-01-15 17:46:54 +01:00
Maikel de Vries 4ea0cb0ca6 make ContainBlast a property instead of DefCore entry 2015-01-15 17:46:53 +01:00
Nicolas Hake aa6b1384a7 Fix build with C4NET2IO_DUMP_LEVEL > 1
Instead of using the preprocessor to filter out debugging code, we might
want to make more use of the optimizer's DCE. That way, renaming and
moving a function or variable won't immediately break a rarely tested
configuration.
2015-01-15 16:33:20 +01:00
Nicolas Hake f351e903ee Don't reset gamma with uninitialized graphics
When OC fails while in startup code, resetting the gamma ramp was trying
to use an uninitialized C4Draw, which would result in writes to invalid
memory.
2015-01-15 16:00:01 +01:00
Peter Wortmann 1aa8585fa1 Cosmetic light improvements
- Increase light fade-in/fade-out quite a bit (4 times stronger)
- Fixed normal jump when multiple lights intersect (will make things a
  little less nice with only one light, but this takes priority)
- Don't draw objects without light in light-debug mode
2015-01-15 12:30:50 +01:00
Nicolas Hake 8a729b4c6f Crash handler: Use PRIdPTR format where available
Printing pointers from the crash handler has been broken starting
with an update to MinGW at some point in the past, when they stopped
using printf from MSVCRT, instead replacing it with a private
implementation. Fix this by checking for inttypes.h availability, and
using it (and its format macro) when possible.
2015-01-15 10:18:37 +01:00
Armin Burgmeier f2830311a6 Fix crash on scenario section change (#1221) 2015-01-14 12:03:05 -05:00
Peter Wortmann e8bf04840f Fix some refactoring bugs (#1227)
The "b" value returned by the new find_cross function had basically
nothing to do with what the old version did (it was for the other
pair of coordinates *and* sign-switched). This is not cosmetical - the
algorithm depends quite a bit on this being consistent.

Additionally, most of the list modifications in CalculateTriangles were
wrong (didn't reprocess last triangle for ascend shadowing, and the descend
case was removing the wrong triangle). I admit the old code was probably a
bit too tricky with how it handled "i", so I attempted to refactor it to
make it less easy to screw up in future.
2015-01-14 14:23:26 +01:00
Sven Eberhardt b2501ed0e5 SetPlrKnowledge(nil, ...) sets/removes knowledge for all players (#1236)
Useful e.g. for ingame scripting when you want to grant extra construction plans. Additionally, this kind of behavior is known from some other functions with per-player parameters like e.g. Sound().
2015-01-14 00:36:44 +01:00
Mark deadfcf099 Initialize newzoom variable (#1217)
Fixes a problem with zoom in debug mode.
2015-01-13 21:29:01 +01:00
Mark f9369f9eb4 Different implementation of CreateObject() (#1214)
CreateObject() now does not reposition an object after it has been created, but rather grows it around the center of said object.
To that end a new parameter has been added to DoCon() and SetCon() and the documentation has been updated.
2015-01-13 21:03:27 +01:00
Armin Burgmeier a5c2e762f7 Fix memory leak when a viewport is re-initialized 2015-01-13 07:48:43 -05:00
Sven Eberhardt 92ce539b69 DarkCastle: Add FireArrow, BombArrow, GrenadeLauncher and Torch to construction plans.
Also removed a bogus line from DarkCastle scenario script.
2015-01-13 00:07:57 +01:00
Armin Burgmeier 57878a0604 Fix crash when viewing record with more than 2 players (#1228) 2015-01-12 16:37:51 -05:00
Armin Burgmeier ae5f56594a Fix openclonk build with GTK3 2015-01-12 16:25:00 -05:00
Sven Eberhardt ebd55cabe8 Improve enemy AI behavior when dropping out of guard range.
When taking damage, clonks will now search and attack enemies even if outside their dedicated guard range. This should help for clonks that fell down from their guarding post.
2015-01-11 23:10:04 +01:00
Mark d7a88eea62 Use CreateObject() in scripts (#1214)
Objects with id Rule_*, Goal_*, and Environment_* are created with CreateObject() now.
2015-01-11 19:04:42 +01:00
Mark 850bf1b9d4 CreateObject/CreateObjectAbove (#1214)
Renamed CreateObject() to CreateObjectAbove() and replaced all occurrences in script files.
Added CreateObject(), the function may need a rewrite though, see comment in code.
Updated documentation
2015-01-11 19:02:03 +01:00
Sven Eberhardt 1c994ad3c7 Windows: Do not deselect GL context when losing focus (#1208).
Fixes engine intialization when tabbing out.
2015-01-11 17:01:27 +01:00
Maikel de Vries d977d913ce fixed interaction image for coconut tree 2015-01-11 09:17:14 +01:00
Maikel de Vries 79e2d8d822 add relaunches option to Dark Mine 2015-01-10 10:04:55 +01:00
Maikel de Vries e9513218bf add relaunch count to relaunch callback in last man standing goal 2015-01-10 10:04:26 +01:00
Maikel de Vries afed995e37 added missing Folder.txt documentation (#1187) 2015-01-10 08:44:02 +01:00
Maikel de Vries 3cc644f6fc reduced fire and explosive arrow strength 2015-01-09 23:37:04 +01:00
Maikel de Vries 9c0263faef add title image to Acid Rift 2015-01-09 20:00:41 +01:00
Maikel de Vries 14123b0325 Use fixed array manipulation in Dark Mine again 2015-01-09 19:49:36 +01:00
Julius Michaelis 8e7001ba0f Fix self-overwrite in C4ValueArray::SetSlice (#1212: Array manipulation goes wrong ) 2015-01-09 15:09:36 +09:00
Sven Eberhardt 1213a2eef5 Torch knowledge for Golden Mountain. 2015-01-09 00:03:28 +01:00
Mark 43c924d00e Restructuring of StdMeshSkeleton::MirrorAnimation
Mirroring the name happens in MirrorAnimation now, no double checks anymore, no double copying of buffers.
2015-01-07 22:48:04 +01:00
Maikel de Vries 85bbf5c595 improved Dark Mine vegetation and item locations 2015-01-07 21:55:15 +01:00
Maikel de Vries 872a64ff89 add Place() functionality to Trunk 2015-01-07 21:55:15 +01:00
Nicolas Hake 804bf41c92 Fix UPnP auto-detection
Auto-detecting UPnP might fail when CMake was invoked multiple times.
This would result in a broken build because the compiler would not find
<natupnp.h>.
2015-01-07 21:15:53 +01:00
Maikel de Vries 0ecd30ad9e dynamite after fusing not collectible, but can be put into containers 2015-01-07 20:05:25 +01:00
Armin Burgmeier e1d1d540c7 Allow independent viewport and light regions in C4FoWRegion (#1211)
With this change, an additional rectangle is stored in C4FoWRegion that
represents the area covered by the viewport in fractional floating point
coordinates. This allows the light texture to be created for an arbitrary
portion of the landscape, and the coordinate transformations for the
shaders will still work.

Also, since the additional rectangle uses floating point precision, the
computed coordinate transformations do now give the exact same result as for
the landscape pixel-by-pixel, and there should not be any offsets left.

I also hope that this change improves or fixes the single-pixel-lines of sky
that are sometimes seen at the edges of the viewport.
2015-01-07 19:44:31 +01:00
Armin Burgmeier 31c8c14e73 Fix viewport window size in light coordinate calculations (#1211)
The light rect is made larger than the viewport is by one pixel in
C4Viewport::Draw(), so correct for this.
2015-01-07 14:10:26 +01:00
Armin Burgmeier b8fa1dd191 Fix the mape build 2015-01-07 12:28:10 +01:00
Armin Burgmeier 434eb1c77b Fix Y offset when transforming fragment to light texture coordinates (#1211) 2015-01-07 12:28:10 +01:00
Julius Michaelis 8ff7d7c520 Torches for settlement tutorial 2015-01-07 12:14:58 +09:00
Maikel de Vries 36b29fd32e adapt scenarios to rank->branch change 2015-01-07 00:04:44 +01:00
Maikel de Vries 6ae4e71e6e Rank -> Branch, rename and Place() functionality 2015-01-07 00:04:44 +01:00
Maikel de Vries 2d741dfb70 fixed mixed up variables in Loc_Wall() 2015-01-07 00:04:44 +01:00
Maikel de Vries 6f3518d733 fixed lights in Rock Bottom 2015-01-07 00:04:44 +01:00
Maikel de Vries a3bb831b33 add torch to basic knowledge for all worlds 2015-01-07 00:04:44 +01:00
Armin Burgmeier 9580c46056 Fix assertion failure when definition to append/include does not exist 2015-01-06 19:33:33 +01:00