Commit Graph

7360 Commits (790219ac7eeb0be340c5063dff6944abcf520f7a)
 

Author SHA1 Message Date
Armin Burgmeier 790219ac7e Replace 3D texture in landscape shader by a 2D texture array
A texture array is conceptionally what should be used in this case. One
advantage of this is that we don't have to generate mipmaps ourselves but can
let the graphics driver take care of it. Same for selection of the mipmap
level. This would even allow to choose different mipmap levels for different
textures.

This is a somewhat experimental change since it makes OpenGL 3.0 a hard
requirement for OpenClonk. I expect that this is fine, but if this causes
failures during landscape creation on common hardware/drivers we should
revisit.
2015-09-16 21:45:30 -04:00
Armin Burgmeier 061305c0c7 Don't enable textures in C4ShaderCall::AllocTexUnit
This was only necessary with the fixed function pipeline, but not when
using shaders.
2015-09-16 21:45:30 -04:00
Sven Eberhardt 0bb693172d Lamp post offsets light source to lamp attachment position. 2015-09-16 21:14:09 -04:00
Sven Eberhardt b683e47499 Add LightOffset property to allow light sources to origin from locations other than the object center. 2015-09-16 21:14:08 -04:00
Armin 267737cab0 SetPlayerViewLock() for all players (#1194)
Signed-off-by: Maikel de Vries <mdt.maikel@gmail.com>
2015-09-16 22:51:36 +02:00
Sven Eberhardt 56ff5bbf27 Lantern: Fix attachment on CreateContents, fix scenario saving and remove lantern dummy.
RejectCollect is not called on CreateContents or other forced entry methods but should still cause the lantern to attach. So move any side-effects to Collection2 instead of direct RejectCollect.

The lantern dummy had Timer=1 and wasn't doing anything. Use a simple overlay instead.

Note that interaction menus still show the lantern always with off-material. But that's a bug in the interaction menu.
2015-09-15 22:41:30 -04:00
Sven Eberhardt 53a002c31f Lantern: Increase light range and color light.
The range wasn't any further than the clonk's natural light which made lamp usage a bit pointless.
2015-09-15 21:48:02 -04:00
Sven Eberhardt 5b539a5b34 Fix manipulation of multiple objects in editor.
It would only do work on the last (and possibly random objects because initialized memory was accessed).
2015-09-15 21:29:26 -04:00
Sven Eberhardt bf1596a229 Adjust interaction menu object ordering.
The clonk opening the menu should always have higher priority so the clonk is predictably selected on the left side even if standing behind e.g. a crate.

Other clonks should be behind because interaction with them is rare but having your fellow players stand in front of a building is very common. Allies also tend to run in front just when you opened that menu.
2015-09-15 21:13:53 -04:00
Sven Eberhardt 9ec3ca0304 Fix production menu entries in unowned producer buildings. 2015-09-15 20:50:50 -04:00
Sven Eberhardt aaf5693ecc Remove unnamed controls from control config dialogue. 2015-09-15 20:04:08 -04:00
Armin Burgmeier 3eb6b277e4 Buildfix 2015-09-15 18:25:13 -04:00
Clonkonaut ccccc952fe Make zaphive placement truly random. 2015-09-15 22:42:28 +02:00
Maikel de Vries 71c7cd0a5b add object to block areas from flag ownership
These objects also live in the flag list and for now have only rectangular shapes, more features may come in the future.
2015-09-15 22:25:52 +02:00
David Dormagen 35903e64d9 fixed possible nil-pointer access in interaction menu
I am still not 100% sure in which situation this occurs (see also old comment in line 168). I suspect it happens when an object is removed from the menu and the object check timer ticks just before the inventory timer.
It is possible that this should rather be resolved by removing the inventory check effects when the right conditions are met (aka the menu is removed). IF that is even the cause. Right now I don't think the current situation is too bad, because the check is very lightweight and superflous content check effects will be removed when a new menu is opened on either side anyway.
2015-09-15 21:27:26 +02:00
Sven Eberhardt cc0a139ff9 Fix landscape reinitialization on saved section load (#1379). 2015-09-15 00:13:45 -04:00
Sven Eberhardt 73a42fef92 Suppress warning messages for undefined fields when returning to main section in LoadScenarioSection. 2015-09-14 23:01:09 -04:00
Sven Eberhardt 84af4b4b57 DeepSeaMining: Free respawn 2015-09-14 22:47:35 -04:00
Sven Eberhardt 1ba28cd3f6 Sequence stores and restores breath of all clonks of watching players. 2015-09-14 22:43:03 -04:00
Sven Eberhardt d1862e0531 Incinerate returns false when effect could not be created.
Happens e.g. if object has a NonFlammable or Invincible effect.
2015-09-14 22:31:51 -04:00
Sven Eberhardt 188b79cd7a MakeInvincible includes MakeNonFlammable by default.
It was always either used in conjunction or forgotten. If someone wants invincibility while still allowing fire (e.g. an unkillable fire golem), there's now a parameter to allow it.
2015-09-14 22:25:27 -04:00
Sven Eberhardt 3096ff4f7a DeepSeaMining: Small adjustments for material, knowledge and intro.
Material: More dynamite
Knowledge: Add Chest
Intro: Hurt sound on plane drop and sky scroll stops
2015-09-14 21:59:12 -04:00
Sven Eberhardt 3ff1bbf5f6 Fix /todo fallback on write error. 2015-09-14 21:39:51 -04:00
Armin Burgmeier 9197acbb62 Generate mipmaps by default, and use them for mesh textures 2015-09-14 20:36:08 -04:00
Maikel de Vries 2dde6fd600 move flag coordinate in area check into flag's script
This allows also for using rectangular ownership shapes, which can be useful for blocking areas.
2015-09-14 20:58:13 +02:00
Clonkonaut c925351b15 Correct Z-sorting for trees. 2015-09-14 17:09:13 +02:00
Clonkonaut 1c41df401b Racical increase in brightness for the Ambient shader. 2015-09-14 17:08:50 +02:00
Armin Burgmeier f54067c819 DetachMesh: remove mesh from direct parent, not from top-level parent
This fixes a crash in calls to DetachMesh() on nested attached meshes.
2015-09-13 16:46:27 -04:00
Armin Burgmeier 77ad9c89b5 Fix parameter order when calling StdMeshInstance::AttachMesh in FnAttachMesh
I don't like default parameters.
2015-09-13 16:46:27 -04:00
Armin Burgmeier dc38e61139 Fix rendering of colorfade (non-bitmap) sky 2015-09-13 16:46:27 -04:00
Sven Eberhardt 94f278ce7f Fix bucket carry transform.
It was upside down.
2015-09-13 13:41:17 -04:00
Sven Eberhardt 4b29c83477 Pass coordinates to ControlThrow. 2015-09-13 13:09:28 -04:00
Sven Eberhardt 0e085e435b Add ControlThrow callback into objects that want to implement custom throwing or even non-throw actions on the throw key. 2015-09-13 13:04:18 -04:00
Sven Eberhardt 889a8dbdf9 Tutorial 00002: Respawn with contents.
Otherwise it's very easy to lose your shovel in the acid lake and fail.

(You can still fail by throwing it in though)
2015-09-13 12:53:06 -04:00
Sven Eberhardt eb9e640b67 Fix igniter picture in tutorial 0001. 2015-09-13 11:24:28 -04:00
Sven Eberhardt a687f35a7b Installer: Remove old Tutorial.ocf folder on installation. 2015-09-13 09:34:46 -04:00
Maikel de Vries dd0a01f3df fix oc_groups for cmake after tutorial folder change 2015-09-13 15:32:35 +02:00
Maikel de Vries 225f4b1559 add tutorial 2 2015-09-13 15:03:15 +02:00
Maikel de Vries 78f7b76b0e add playground scenario as reward for completing all tutorials 2015-09-13 13:38:56 +02:00
Maikel de Vries 80d5525ed9 add tutorial 1 2015-09-13 13:38:56 +02:00
Maikel de Vries ace8ad48d6 add wipf (placeholder) as clonk friend in tutorials 2015-09-13 13:38:55 +02:00
Maikel de Vries 395f0d3f15 add method to disable controls in tutorials 2015-09-13 13:38:55 +02:00
Maikel de Vries 7cdf3e6d1f add tutorial guide 2015-09-13 13:38:55 +02:00
Maikel de Vries d9cf76401a add tutorial goal 2015-09-13 13:38:55 +02:00
Maikel de Vries f4cd257df1 add tutorial arrow 2015-09-13 13:38:55 +02:00
Maikel de Vries 4c58ee2f5f add tutorial main folder 2015-09-13 13:38:55 +02:00
Maikel de Vries bb703d46c7 remove old tutorials 2015-09-13 13:38:55 +02:00
Maikel de Vries 89838bf63f add uniform sphere particle 2015-09-13 13:38:47 +02:00
Mark 722a5ad448 Explode: DoShockwave
Added the global function DoShockwave. Updated documentation. Changed the way explosions deal damage: Every object at the center of the explosion gets full damage. Every object inside the explosion radius gets half damage.

(cherry picked from commit 22298a6d1389b5344ebe7aea56f3c371b5ad845f)

Conflicts:
	planet/System.ocg/Explode.c
2015-09-13 13:01:28 +02:00
Mark 15056b823f Explode: Damage override
Added damage override parameter to the explosion functions. Updated the documentation as well.

(cherry picked from commit 59f802c2d3f269d54c12489ac9659ee3ca57a857)

Conflicts:
	planet/System.ocg/Explode.c
2015-09-13 13:01:24 +02:00