Commit Graph

7735 Commits (8fc57b69c39d02f951ff36d0758766a74aecd836)
 

Author SHA1 Message Date
Nicolas Hake 8fc57b69c3 Don't ZeroMem non-POD types
Using memset to initialize non-POD types doesn't work. Or rather, it may
work right now, but will fail when somebody adds a member that relies on
its constructor doing something (like for example any STL container).
Either way it's undefined behavior and needs to go. Furthermore, using
it to reinitialize an object also prevents any dtors from doing their
work when needed.

A new helper function InplaceReconstruct will take an object of nothrow-
default-constructible type, and call the dtor to properly clean up
before placement-new reconstructing the object in the same location.
This is still bad design, but unfortunately removing the Default/Clear
functions from every object currently using them is a herculean task.
2015-11-14 16:43:19 +01:00
Nicolas Hake 1bc2d41368 C4Group: Remove unused time offset
Four years ago, we made c4group stop caring about time. Now it doesn't
need to carry a completely unused offset value around anymore.
2015-11-14 16:19:58 +01:00
Nicolas Hake 715d3f34dd Remove obsolete declaration of C4Group_SetOriginal
This function hasn't existed for five years. It's time for the
declaration to go away.
2015-11-14 16:19:58 +01:00
David Dormagen a63e53fcd5 zap: randomized pitch of sound 2015-11-14 15:36:27 +01:00
David Dormagen eb2b18457e roll: only roll while direction key is held down
This means that you start a roll currently with walking left/right and tapping [down]. OR falling a great height and just holding left/right when landing. When you let go of left/right, you will instantly walk again. This reduces the possibility of the players rolling into an abyss.
2015-11-14 14:58:02 +01:00
Armin Burgmeier 6af3e4e639 Fix one-pixel edge at bottom or right of landscape (#771)
The problem comes from the fact that the landscape texture can be larger
than the actual landscape, and that for the last row or column of pixels
drawn at the edge of the landscape, the shader might access a texel that's
beyond the landscape boundaries, at least as part of its interpolation
when accessing a texture.

This patch fixes this by always making the landscape surface the same size
as the landscape, and then GL_CLAMP_TO_EDGE behaviour will prevent access to
pixels beyond the edge of the landscape. Modern hardware should handle
NPOT textures just fine, and they are already used in other places in Clonk.

If this becomes a problem and needs to be reverted, we could instead upload
the "real" landscape size to the shader, and clamp the texture coordinates
there to make sure to not read beyond the actually filled landscape surface.
2015-11-13 15:05:26 -08:00
David Dormagen 8db90a341b moved Windmills.ocs from Arena.ocf into Missions.ocf
Being in "Arena" was a relic we had from 2009 where we only had arenas.
2015-11-13 18:54:11 +01:00
Armin Burgmeier 4d36f43025 gtk editor: keep scroll position when updating property dialog (#566)
This is still not quite optimal since we need to wait for line validation.
There does not seem to be a way to trigger immediate validation.
2015-11-12 16:04:28 -08:00
Peter Wortmann b2150234d0 Smoother material border calculation
Before, material normal bias was calculated only from a column/row of pixels right
next to the pixel in question. This sometimes led to "lines" appearing in edge cases.
The new code modified this approach to look at a whole rectangle instead, which
gives a *lot* smoother results and is only marginally more expensive.
2015-11-12 22:18:53 +00:00
David Dormagen 215c83c79b interaction: allow objects to be at a rect around the Clonk instead of just at the center
This allows to e.g. repair bridge segments on which you stand or interact with other objects that are shorter than half your height.
2015-11-12 10:18:45 +01:00
David Dormagen d82247d86e chippie: fixed German description 2015-11-12 10:17:17 +01:00
David Dormagen c93a8d5ec5 Crash.ocs: make starting the plane easier
This change increases newbie-friendlyness. I wonder if anyone will notice that the plane landed in another spot in the intro?
2015-11-11 23:34:03 +01:00
David Dormagen f701dfd703 UpdateOCF: also update OCF_Inflammable, which can be manipulated by scripts
Previously, changing the ContactIncinerate property in a script would trigger an assertion in a debug build.
2015-11-10 19:13:52 +01:00
David Dormagen a8f7dc6c5e moss: renamed dry moss to "Dry Moss" and fixed stacking dry and wet moss
This gives the player at least SOME feedback about why one can be used as fuel and the other can't.
2015-11-10 19:13:01 +01:00
David Dormagen e29028457e fixed count display of stackable objects
The count was displayed twice in certain situations: in the picture AND as a number.
Now the responsibility for displaying the count is solely on the menus' side. The objects only show an additional overlay when their count is infinite (to not display an arbitrary "50" there).
2015-11-10 17:32:38 +01:00
David Dormagen f88ccac0d4 Crash.ocs: added missing translation for goal message 2015-11-09 22:12:49 +01:00
David Dormagen 8af7897c52 fixed wrong mouse cursor offset in developers mode (#646)
Steps: open player menu (F), hover over entries -> mouse cursor was drawn at a wrong position.
2015-11-09 10:48:34 +01:00
Sven Eberhardt cf6f66469c Pass last dead clonk as parameter to global RelaunchPlayer callback. 2015-11-08 17:15:34 -05:00
Sven Eberhardt 81c74da576 Fix automatic stone door opening in FightForGidl. 2015-11-08 17:15:06 -05:00
Sven Eberhardt a43103a93f Fix airplane description.
It wasn't to its property.
2015-11-08 17:14:29 -05:00
Armin Burgmeier 236759b1db Don't update relights array while relighting (#1371)
Removing solidmasks temporarily as part of the relighting procedure caused
a landscape update which modified the list of to-be-relighted regions that
is currently being iterated over. This could cause relighting of a region in
which solidmasks have not been removed, leading to vehicle pixels in the
landscape surface used by the landscape shader, which show up pink on the
screen.

Fixed this by introducing C4Landscape::_SetPix2Tmp, which changes a pixel
without causing relighting (or material count updates), and use that when
temporarily removing or putting solidmasks. This should also avoid unnecessary
computations (relighting, material count updates) when updating the landscape
or moving objects with solidmasks.
2015-11-08 13:48:19 -08:00
Maikel de Vries 9a9486d0fe Do not XOR booleans (Time.ocd) 2015-11-08 22:34:09 +01:00
David Dormagen cb2b189ff9 removed Library_GoldSeller
Valuables are now solely sold by putting them into the flag. This is consistent with everything else now.
2015-11-07 22:56:57 +01:00
David Dormagen 5361e0fe87 loam: indicate remaining loam in inventory menus 2015-11-07 22:40:41 +01:00
David Dormagen be35518881 Crash.ocs: fixed typo in German dialogue 2015-11-07 22:33:16 +01:00
David Dormagen b9ba80aa28 Crash.ocs: added chest to construction plans 2015-11-07 21:56:16 +01:00
David Dormagen fcc5c32be1 Crash.ocs: fixed typo in German dialogue 2015-11-07 21:27:50 +01:00
David Dormagen ad69cd9293 enabled objects to provide a custom overlay for the inventory bar and the interaction menu
This can e.g. be used for the water barrel to show the fill-level. Or by an adventure scenario to highlight quest items.
Or by third-party packs to do other cool stuff.
2015-11-07 21:20:08 +01:00
David Dormagen 712912f670 sword: fixed freezing Clonk in place when deleted during usage
When the sword was deleted while striking (or on hit), the effect that would reset the Clonk's speed was also deleted. The Clonk responded with a general inability to walk.
2015-11-07 21:20:08 +01:00
Armin 65c2d2c0a0 Add basic title image overlay. 2015-11-07 11:24:55 +01:00
Armin 1b35755ce4 Fix blinking sky when using the time object. 2015-11-07 11:24:22 +01:00
Armin 31371bcc82 Docs: Fix mistake in map scripts. 'Op=checkerboard' was missing. 2015-11-07 11:22:52 +01:00
David Dormagen 0f42015a24 pickaxe: prevent dug-out objects from hitting the Clonk for 30 frames
This should make pickaxing less frustrating as you are not interrupted EVERY TIME you dig out something.
2015-11-07 11:19:57 +01:00
David Dormagen ac8d5934b2 buffed javelin damage a bit more
Due to request from ala. 15 means that "usually" 4 javelins kill. 18 means that now 3 should be enough in most situations.
2015-11-07 10:59:39 +01:00
David Dormagen a1cefd2681 reduced volume of default splashing sound
Which was much louder than other sounds and felt a bit weird.
2015-11-05 20:49:57 +01:00
David Dormagen d42d0edd33 Raid: oil barrel can not be filled with water or be used as a normal barrel at all
This might confuse players A LOT.
2015-11-05 20:41:30 +01:00
David Dormagen c1f183aa33 chippies: resist acid
As requested by ala because it might be beneficial to new scenario like Regeneration from CR.
2015-11-05 18:13:58 +01:00
David Dormagen d9e83d2c1e Raid: fixed typos in German dialogue 2015-11-04 21:15:54 +01:00
David Dormagen 89d8c41d22 sproutberry: increased mesh size to better match size when attached 2015-11-04 20:21:59 +01:00
WinExploder 7573df69c8 Added new sprout berry graphics, normals and material
squashed:
Fixed Sprout Berry Sprite
Added new sprout berry graphics, normals and material
2015-11-04 20:15:39 +01:00
David Dormagen 507d5a2fb7 sword: increased hitting range to better match visuals
In at least one Let's Play, the player found it weird that the sword has such a short range even though it was (visually) clearly hitting the enemy. I agree.
Also, this is a (major?) sword buff of course.
2015-11-03 21:19:08 +01:00
David Dormagen e4009a683c catapult: cannot shoot yourself into solid material anymore (#1139) 2015-11-03 20:54:11 +01:00
Clonkonaut fe4c320a6b New ashes texture by Matthi. 2015-11-03 16:28:30 +01:00
David Dormagen 17c355d2e3 Raid: fixed wording in German description
see https://youtu.be/dGn99IuzDPw?t=1722
2015-11-02 21:40:58 +01:00
Clonkonaut 2b904cc3c9 Enabled teams in Hot Ice. 2015-11-02 18:46:34 +01:00
Clonkonaut 27b19fe70e Fixed some scenario descriptions. 2015-11-02 18:41:09 +01:00
Clonkonaut 6560b282a0 Fixed map issues in Molten Monarch.
Removed granite at the lower right spawn point so clonk won't get stuck.
Because there was no background map, the moving platforms removed the material if earth pixels landed on them.
2015-11-02 18:27:30 +01:00
David Dormagen adb828c9fb fixed possible nil-access
This happened to me ingame. I don't know why and I don't know how to reproduce.
So this is a quick in-place fix instead of a solution to the underlying issue of "entries" not being there.
2015-11-01 18:29:26 +01:00
David Dormagen 73a817d1ae scaffold: use interaction menu instead of ControlLeft/Right/.. and allow extensions to both sides (#949) 2015-11-01 18:22:23 +01:00
David Dormagen 57b8b0a70b buffed javelin damage
The javelin was one of the hardest weapons to use and didn't even deal a lot of damage (only slightly higher than the arrow, if not less?).
It does a lot more damage now and three javelins should kill a Clonk. Test!
2015-11-01 16:42:06 +01:00