Commit Graph

52 Commits (4f43da9999fe1650a7af24d13c409a6feca40846)

Author SHA1 Message Date
Maikel de Vries 653b135919 Move contents ejection on death after Death Call
This allows the scripter to access the contents in OnClonkDeath and similar callbacks preventing solutions using effects or static variables.
2014-04-22 20:15:26 +02:00
Günther Brammer 22016e075f Replace some usages of C4ID with C4Def*
In particular those that made the c4script shell depend on C4Id.cpp.
2014-04-19 19:02:22 +02:00
Sven Eberhardt 57463b61c4 Rework SolidMasks to be defined in a separate SolidMask.png graphics file instead of the main definition graphics. 2014-01-08 01:55:33 +01:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
David Dormagen 921f21e9a6 allocate particle lists for C4Objects lazily
This should fix an error with incorrect particle lists after loading. This is also a cleaner way overall, since only a fraction of all objects will ever have particles attached to them
2013-12-22 18:51:05 +01:00
David Dormagen a10c9316ef renamed DynamicParticles* to Particles* and CreateParticleEx to CreateParticle 2013-12-17 22:32:01 +01:00
David Dormagen 02f54ba1eb removed the legacy particle system from the engine and docs 2013-12-17 22:32:01 +01:00
Tobias Zwick 325053410f rename script callback UpdateTransferZone to OnSynchronized (#220) 2013-12-17 23:16:11 +07:00
David Dormagen e7e9190fb9 objects now also instantiate their dynamic particle structures when loading from a savegame (fixes crash) 2013-11-26 22:00:03 +01:00
Nicolas Hake 7ffa636540 C4Object: Don't do any drawing calcs when headless
There's no point in calculating render positions or audio source
locations when we're not rendering any audio or graphics. Skip it when
headless to save CPU cycles.
2013-10-18 22:30:01 +02:00
Sven Eberhardt bd103481e8 Fix crash when ATTACHed object detaches in Enter/Exit call. 2013-10-12 23:36:42 +02:00
David Dormagen fc3aaab835 dynamic particles: more code cleanup and fixes 2013-10-09 01:29:12 +02:00
David Dormagen 2e2c40db07 dynamic particles: added phase property; added parameters to PV_Step; objects now draw their particles correctly; fixed PV_Random 2013-10-07 20:56:51 +02:00
David Dormagen 8025e7c2b0 the dynamic particle system now runs the calculations in a different thread
added PV_KeyFrames
2013-10-07 20:56:49 +02:00
David Dormagen 40b66d1c76 added (early demo of) new particle system which should both be faster and more flexible than the old one 2013-10-07 20:56:49 +02:00
Maikel de Vries c05875da06 Make COMD_* work more intuitive for DFA_FLOAT
Changing from COMD_UpRight to COMD_Up now makes you go upwards instead of continuing in the diagonal direction.
This does not seem to break anything, although the C4Command.cpp code is hard to verify due to lacking comments. If this is broken I will fix it. In any case no one is using it anyways.
2013-10-07 19:15:46 +02: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 58a39e972f Improve C4Object const correctness 2013-08-31 23:23:35 +02:00
Sven Eberhardt ba84fc7c4b Fix internal marker for FindObject searches and CrossCheck using shapes.
Before, the marker would be reset in every frame, but object markers and main counter weren't reset consistently at the same time. This could cause some objects to be not found if their markers were set after the object marker reset but before the main marker counter reset.
2013-08-10 23:21:26 +02:00
Martin Plicht 405453aed3 Merge branch 'debugrecoption' 2013-05-31 14:39:16 +02:00
Armin Burgmeier 90ee4d2380 Fix crash when an object whose mesh is attached to another mesh is removed 2013-05-27 15:55:18 +02:00
Martin Plicht eaf93d6a0e Also check for DebugRec flag in #ifdef DEBUGREC_* blocks 2013-05-25 23:01:41 +02:00
Martin Plicht 524fe879aa Make DEBUGREC define a commandline option 2013-05-25 22:51:32 +02:00
Günther Brammer 4e875f4495 Don't store object rotation twice
Rotation was still stored as an integer and as a fixed point number.
Compute the integer on demand from the fixed point instead, like the
position. Rewrite the movement code where the two variables were
temporarily out of sync.
2013-05-25 14:59:58 +02:00
Günther Brammer ecae81d985 Enlarge rotated shape only by the minimum necessary
Previously, a rotated object had a quadratic shape that could hold all
possible rotations.
2013-05-25 14:47:54 +02:00
Sven Eberhardt 4557d1638e Added property LineMaxDistance to let a line break when connected objects are too far apart. 2013-05-09 12:02:44 +02:00
Sven Eberhardt 2383a962af Only save Shape and Component data if it differs from the definition for scenarios using Game.txt.
Components and vertices of definitions are often changed for balancing reasons (e.g. trees giving more wood) or because of updated graphics. This saves us from having to update all Game.txt for such changes files in the future.
2013-03-30 15:59:15 +01:00
Günther Brammer df3fcd2b2b Document C4PropList internals a bit 2013-02-11 22:23:05 +01:00
Günther Brammer 019ea36ee9 Remove unused C4Object::GetActionByName 2013-01-20 17:25:02 +01:00
Günther Brammer 864c5c7ea8 copyright notices update 2012 2013-01-12 16:31:40 +01:00
Sven Eberhardt 86b20be644 Fix C4Command::Jump, i.e. jumping as part of pathfinder. 2012-12-09 18:44:22 +01:00
Sven Eberhardt 6a4e5b0615 Attached objects with SolidMask (slave elevator case) can carry objects 2012-12-06 20:30:35 +01:00
Tobias Zwick 348fb8c7a9 clean up mouse controls, reduced cursor graphics to the used ones 2012-11-16 17:29:42 +01:00
Günther Brammer 4b096d71a0 Do not clip parallax objects (fix disappearing moon, #575) 2012-10-30 22:18:27 +01:00
Armin Burgmeier 977cf98f82 Always climb up when pressing the direction key against the wall 2012-10-13 18:03:20 +02:00
Günther Brammer 10dd29ee49 Do not scale or tumble while jumping upwards and hitting the feet
Theoretically, the Clonk shouldn't even hit the feet at the start of the
jump, but that's a quest for another time.
2012-10-13 17:14:13 +02:00
Nicolas Hake 9f83a613dc Always reset C4Action::t_attach when executing action (#808)
Not resetting t_attach leads to strange behavior in liquids since detaching from
the landscape usually happens via the Jump action which generally reverts to its
InLiquidAction before t_attach gets reset. By removing the shortcut return after
entering the InLiquidAction, we make sure t_attach gets reset correctly (as well
as immediately executing the correct action instead of doing so after a delay of
one frame).
2012-10-10 21:28:25 +02:00
Günther Brammer c9bcafba56 Simplify DoCon implementation
For example, the solidmask removal is done in
UpdateFace, and might have been needed in Clonk 4 or Clonk Planet, but the
current solidmask code is fine with the call from there.
2012-07-27 16:09:25 +02:00
Günther Brammer 6dac692bd5 DoCon holds the bottom-most vertex in place, not the bottom of the Shape
This makes trees not sink into the landscape when burning.
2012-07-27 17:44:59 +02:00
Günther Brammer 49a0ea7bd2 Support Decel for SCALE, HANGLE and FLIGHT, fall back to Accel
All procedures now use the Accel value if the Decel value is nil, and also
use the default Attach value if that is nil.
2012-07-15 21:47:50 +02:00
Günther Brammer 9f0556250f Clonks don't lose their speed when hitting a wall 2012-07-15 19:05:20 +02:00
Günther Brammer 692fb103f1 DrawVertex uses thinner lines for the cross 2012-06-08 16:19:36 +02:00
Günther Brammer 4985c519c6 Switch from SCALE to Walk on top of slopes
The precise rule is that only CNAT_Bottom vertices connect to the
landscape and connect at the bottom, too. It doesn't quite fit with
the other procedure-transitions because the movement code doesn't
consider the bottom vertex to touch the landscape in that situation,
but this is probably less weird than the old cornerscale teleportation.

Also don't transition from FLIGHT to Scale when the ComDir points
away from the wall. That tended to stop the Clonk in its tracks on
uneven ground.
2012-06-19 01:40:37 +02:00
Günther Brammer 24bfd6345d Use Action.Attach even when Action.Procedure is not nil
But default to the previously used value when Attach is not set. Use 0 to
override the default.
2012-06-16 03:01:47 +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
Günther Brammer 4e71af5489 Script: Add GetProperties function to get the keys of a proplist 2012-05-26 01:32:43 +02:00
Günther Brammer 0e6f972de4 Remove unused C4Object* parameter from C4AulExecError 2012-05-15 03:11:23 +02:00
Günther Brammer 099cd15e56 Script: Remove unused OnBlastIncinerationDamage callback
Scenarios that want to override the default behaviour of BlastObject should
overload the BlastObject function itself. Objects can simply use the Damage
callback and/or set BlastIncinerate to nil.
2012-05-06 15:37:43 +02:00
Günther Brammer 2510734ad3 Script: Damage callback changed to Damage(Change, Cause, CausedByPlr) 2012-05-06 14:45:35 +02:00
Maikel de Vries 6fcc0f6d2e Removed TimerCall in favour of AddTimer script implementation 2012-05-05 12:09:44 +02:00