Commit Graph

63 Commits (4c5dfac952ece858c8e8ff0769069216c541dd57)

Author SHA1 Message Date
Nicolas Hake 4c5dfac952 Remove or use unused variables in Objects, System 2018-07-24 14:19:26 +02:00
Maikel de Vries c00a8cf3c3 fix a bunch of suspicious assignment warnings 2018-04-09 11:53:55 +02:00
Maikel de Vries 92aba45914 fix diving animation prediction for clonk
And no! randomly multiplying by 2 is not a solution...
2018-01-19 14:37:21 +01:00
Mark c7bb0785b6 For testing: Dive Jump 2017-11-27 21:57:17 +01:00
Clonkonaut e144bfd91f Clonk walk animations: smoother blending.
This was a very old script todo. I don't really know if I made it better (but I think so).
2017-11-26 14:28:04 +01:00
Mark 06cd643d15 Clonk: Adjust mesh position while diving
This matches the vertex position better
2017-11-23 21:16:12 +01:00
Mark f8f9a38ee3 Clonk: Constants for SetMeshTransformation layers 2017-11-23 20:38:11 +01:00
Mark 3e5de9eea9 For testing: More fluid hangling motion
Removed the dead stop between hangling strokes/swings. Instead, the
Clonk keeps moving with half speed.
2017-11-21 20:56:35 +01:00
Mark fd7eeecf2c For testing: Hangling with immediate stop
Instead of continuing to swing forward the Clonk stops immediately while
hangling. Additionally the hangle animation keeps on playing with a
short delay before it changes to the hanging animation, so that the
motion looks nice if you move a short distance only.
2017-11-21 20:49:41 +01:00
Mark f8e30e3a00 Animations: Parameter for rolling
Certain packs/objects may want to restrict your ability to roll. The
parameter that distinguishes between rolling from a fall and rolling
while running is helpful here.
2017-07-28 22:08:19 +02:00
Mark 16c2fd80d5 Animations: Rolling when hitting the landscape as a separate function
The logic for rolling can now be overloaded. Runtime overload is not intended yet.
2017-06-09 21:43:35 +02:00
Sven Eberhardt 1ee26ae0a6 Fix variable shadowing in Clonk::SetScaleRotation 2017-02-20 22:25:27 -05:00
Sven Eberhardt 342916a1ed Fix some implicit for loop declaration errors 2016-10-24 21:02:02 -04:00
Clonkonaut 825c0653e5 Added a slight helper for corner scaling when just pressing up (#1770, #1630).
The problem occurred as soon as the clonk's leg vertices passed the edge. It seems the engine does not really align the bottom vertex to the material. However, the bottom vertex does have CNAT_Bottom & _Left & _Right, in theory it should be properly attached. Maybe this is a little bit broken engine-wise or maybe assigning both left and right to a vertex isn't supported?
Because the lower vertex (foot vertex) isn't attached, the clonk falls down onto its leg vertex and gets stuck in an endless loop of Scale, Jump, Walk, Scale, ...
When pressing left/right, this is no problem as the clonk will be pushed towards the edge when walking and soon touch it with its foot vertex (I assume at this point regular engine behaviour kicks in).

I added a little helper in the scale effect that sets COMD_UpLeft / UpRight whenever this situation is detected and only Up is pressed. 2 frames (1 is not enough) after the effect ended, the ComDir will reset to COMD_Up. It is then possible to climb an edge and stand still on top of it.

Maybe not a perfect solution (a perfect solution would probably be to fix attachment in the engine but I couldn't pinpoint the exact problem) but it works for now.
2016-08-10 01:19:11 +02:00
Clonkonaut 3637e1f072 Fix the clonk sometimes stuck in infinite jump animation when actually scaling with one vertex. 2016-06-18 19:47:39 +02:00
Nicolas Hake 8e18a3fc96 Change (int)0 to nil where deprecated 2016-05-13 17:13:34 +02:00
Maikel de Vries 978b236596 clean up shovel script 2016-02-07 10:24:36 +01:00
Sven Eberhardt 1bb78ecd4f Remove some unnecessery animation weights.
These overwrite the animations in their slots while there are no other references to existing animations in the slot.
2016-01-28 23:47:53 -05:00
Sven Eberhardt c8a76ce450 Use less annoying swim sounds when swimming on the surface.
The "splash" sounded more like the clonk was jumping into the water.
2016-01-14 22:32:54 -05:00
Sven Eberhardt 27f5cdc461 Fix black waves when swim timer is executed in same frame as clonk leaves the water. 2016-01-14 21:51:30 -05:00
Günther Brammer 9911a894df Fix FxRollingTimer parameter type for effect from int to effect 2016-01-03 00:22:36 +01:00
Clonkonaut e31b866e7f Fix animation error when scaling at unfavourably shaped walls (#1317).
The error rarely happened when the clonk was attached to a wall solely with its head vertex. CheckScaleTop (Animations.ocd/Script.c) only checked the shoulders and hip vertices.
I also made sure that this.dist (FxIntScaleTimer, line 616) cannot exceed the animation length of "ScaleTop" although that shouldn't have posed a problem.
2016-01-02 03:58:45 +01:00
David Dormagen d7b2ef9f75 prevent clonk idle animation when in dialogs and reduced frequency of idle sound (#1506)
This doesn't work for intros, though, because they use simple messages. We should unify the systems to only have one dialogue system that uses new-style-menus and implement required features in those menus..
2015-12-20 19:17:34 +01:00
David Dormagen 7f4f5fee58 added new vocals for three skins (by ala)
They are played e.g. when being hit by stuff, catching fire, killing teammates, idling, trying to put a shovel into the pump, and much more!
2015-12-16 23:01:29 +01:00
David Dormagen dcfb986e34 moved sounds into subfolders
This completes http://forum.openclonk.org/topic_show.pl?tid=3215
2015-12-13 22:14:55 +01:00
David Dormagen 0fc114c075 prevent rolling against movement direction
Previously, you would roll on landing when you had a movement key pressed. However, you would roll into your current direction even if you had the opposite movement key held down. This was one of the remaining possibilities of rolling into the void and being frustrated afterwards because the controls sucked.
2015-11-22 11:13:18 +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
David Dormagen 0a9b3ebd70 do not force ComDir when rolling (#1395)
Rolling works via SetXDir anyway, so the ComDir change is not necessary. It would just lead to issues because the ComDir would never be reset and the Clonk would keep on walking until the next key press.
2015-10-21 09:39:10 +02:00
Clonkonaut b083c6454e Adjusted footstep sound to running speed (#1124). 2015-10-13 15:11:11 +02:00
Clonkonaut 1178d8f0ce Prevent dead clonks from sitting upright (#1358).
Also added convenient constants defining the animation slots to use for clonk animation.
2015-10-11 14:08:14 +02:00
Sven Eberhardt dbe132e808 Fix clonk dig speed locking to animation.
Note this slows down dig speed. But you can optimize by using  animation canceling.
2015-09-08 18:23:34 -04:00
David Dormagen a27888a623 the Clonk now performs a roll when pressing [down] (even when walking)
People have complained that the implicit roll (if you don't know how it worked) could lead to death and severe injury. The roll is now explicit. Always and everywhere.
It doesn't have any other effect though; todo: reduce hit area and/or squash vertices of Clonk during roll
2015-08-07 16:12:41 +02:00
David Dormagen 36544bd56c Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Foundry.ocd/Script.c
	planet/Objects.ocd/Vegetation.ocd/Branch.ocd/Script.c
	planet/Objects.ocd/Vegetation.ocd/Trunk.ocd/Script.c
	planet/System.ocg/FindLocation.c
2015-08-02 19:24:04 +02:00
Maikel de Vries 213de4b40b fix updating clonk's vertices after swimming (#1354) 2015-07-14 19:14:27 +02:00
David Dormagen 196f528201 Merge branch 'master' into Controls
Conflicts:
	planet/Objects.ocd/HUD.ocd/FancyGridMenu.ocd/DefCore.txt
	planet/Objects.ocd/HUD.ocd/GridMenu.ocd/DefCore.txt
	planet/Objects.ocd/Helpers.ocd/Dummy.ocd/Graphics.png
	planet/Objects.ocd/Items.ocd/Tools.ocd/WindBag.ocd/Script.c
	planet/Objects.ocd/Items.ocd/Weapons.ocd/Javelin.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/ConstructionMenu.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Constructor.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Flag.ocd/Marker.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/Producer.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Flagpole.ocd/Script.c
	planet/Objects.ocd/Structures.ocd/Pump.ocd/Script.c
	src/game/C4Game.cpp
	src/gamescript/C4GameScript.cpp
	src/gui/C4GameMessage.cpp
	src/landscape/C4Landscape.cpp
2015-06-03 22:32:36 +02:00
Maikel de Vries 9c60cf0949 fix vertex changing when swimming (#1176) 2015-03-26 19:52:25 +01:00
Sven Eberhardt 445d759a72 Change == and != to do pointer comparison on arrays and proplists (formerly === and !==). Remove === and !=== and introduce function DeepEqual for contents comparison.
There have been some bugs and crashes related to unwanted deep comparison (e.g. in the maze scenario). Scripters very rarely need deep comparison, so it should not be the default for the most commonly used operator.

This also changes behaviour of GetIndexOf to do pointer comparison.

This change has Guenther's seal of approval.
2014-04-19 22:33:31 +02:00
Günther Brammer f8226e3675 Use === to check whether proplists were already replaced 2014-04-19 19:02:22 +02:00
David Dormagen 06ac00ace8 Merge branch 'master' into Controls
Conflicts:
	CMakeLists.txt
	Makefile.am
	planet/Objects.ocd/HUD.ocd/Controller.ocd/Script.c
	planet/Objects.ocd/Items.ocd/Weapons.ocd/Club.ocd/Script.c
	planet/Objects.ocd/Libraries.ocd/ClonkControl.ocd/Script.c
	src/control/C4Control.cpp
	src/control/C4Control.h
	src/gamescript/C4GameScript.cpp
2014-02-15 14:44:57 +01:00
David Dormagen a10c9316ef renamed DynamicParticles* to Particles* and CreateParticleEx to CreateParticle 2013-12-17 22:32:01 +01:00
David Dormagen 9f8190064c removed usage of non-existant "Splash" particle 2013-11-26 21:25:00 +01:00
David Dormagen c3c48b1456 adapted Wave particle and usages to new particle system 2013-11-26 21:25:00 +01:00
David Dormagen a4d27cd9a9 replaced Dust and Dust2 usages with new particle system 2013-11-26 21:24:56 +01:00
Maikel de Vries 7afc7f7266 Fixed throwing during wall jump (#986) 2013-11-03 15:32:30 +01:00
Maikel de Vries 9e8dd57dbb Disabled scaling and hangling under water, fixed vertices for swimming clonk
Please note that the dive animation is putting the clonk to low compared to its center this should be fixed by one of the OC modelers.
2013-10-06 14:55:48 +02:00
Nicolas Hake db9ee644eb Fix walking animation with xdir=0 (#887)
When trying to get the sign of the horizontal velocity, a calculation
erroneously assumed that it could never be 0. When it did, a #DE was
raised. This changeset replaces the calculation with the Sign() function
from Math.c, which handles a zero argument correctly.
2012-12-17 02:11:03 +01:00
David Dormagen 94c85d8609 hopefully fixed a script error related to animation replacements
the shield replaced the animation "Walk" with an array of two animations. Then when GetWalkAnimationPosition was queried from FxIntWalkTimer:476 it threw an error at GetAnimationLength
2012-10-14 19:39:40 +02:00
Günther Brammer f41590d71f Merge branch 'movement' 2012-07-13 23:27:14 +02:00
Sven Eberhardt fec75aa79d Fix subsisting com dir if hangle animation is aborted (#418) 2012-07-13 22:55:44 +02:00
Günther Brammer 944ca60910 Tweak the "corner scale" behaviour
Instead of teleporting from sticking with the left/rightmost vertex to the
want to standing on the lowest one at the same position, the Clonk can now
climb using the lowest vertex alone. That means the teleport only needs to
cover only one pixel each in x and y direction to go from sticking to the
side of the landscape pixel to sticking on top of the same pixel.

Also remove some unnecessary x/ydir resets and make comdir in the direction
of the wall the Clonk is scaling keep the up/down direction instead of only
going up.
2012-06-08 16:17:42 +02:00