Commit Graph

42 Commits (master)

Author SHA1 Message Date
Lukas Werling afa348ab21 Add comment next to all documented functions in System.ocg
Many functions in System.ocg have proper documentation, but not next to
the code. When changing these functions, it is easy to forget updating
the docs. Nobody likes outdated documentation!
2017-10-21 00:10:42 +02:00
Maikel de Vries 2b88e77254 adapt System.ocg headers to style guidelines and small clean ups 2017-06-02 17:15:08 +02:00
Maikel de Vries 92334f5f4c take into account container velocity in shockwaves
This ensures reliable flint jumping when using dynamite, ironbomb, powderkeg, etc.
2016-04-24 20:33:44 +02:00
Maikel de Vries 01dd5fcc27 fix explosion shockwave for vehicles which can be grabbed and pushed
This broke when DefCore Grab was replaced with property Touchable.
2015-12-19 10:42:30 +01:00
Sven Eberhardt 1deb7e8176 Add range parameter to ShakeViewport.
Controls the falloff distance, so you can create more localized (or more global) shakes.
2015-12-13 11:11:01 -05:00
Sven Eberhardt 1dca9cf1b5 FightForGidl: No friendly fire and some AI fixes. 2015-12-12 00:02:31 -05:00
David Dormagen 178a91f338 moved some functions that depend on Object.ocd from the global System.ocg to Objects.ocd/System.ocg (#1473)
The global System.ocg should not cause any errors even if Objects.ocd is not loaded. This means that any functions that depend on certain definitions (e.g. FindLocation) will just not be available.
2015-12-02 12:46:02 +01:00
Sven Eberhardt d136dc22c0 Implement landscape inflammation.
It used to create the non-existent FLAM objects from the engine. Use a script callback to a global function that creates Flame objects instead.
2015-10-09 16:24:16 -04:00
Sven Eberhardt ad6a1dfda6 Fix script error on explosion with size zero. 2015-09-26 17:19:24 -04: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
Mark 055196155f Explode: if-order
Merged the three if-blocks in DoExplosion() into one if-block. If there was no container in the first if, there should be no container in the following calls.

(cherry picked from commit d504b1109de115f507a09e9e895104bd9552ac53)
2015-09-13 13:01:20 +02:00
David Dormagen 0d102d2184 explosion: fix nil-pointer when object removes itself on death
After doing damage to an object, you cannot be sure that the object persists. It might have been blown to smithereens. So, catch that case.
2015-08-20 13:47:27 +02:00
Sven Eberhardt 9042450399 Fix DoExplosion from global context.
Avoid null pointer and do play sounds.
2015-07-09 01:03:34 -04:00
Sven Eberhardt fe46689d3e Make ExplosionEffect function overloadable. 2015-07-08 15:55:33 -04:00
Maikel de Vries a9cd57eae8 remove logging message in Explode() 2015-05-17 14:12:49 +02:00
Maikel de Vries 42a7f03788 kill tracing for incinerated dynamite (box) and iron bomb 2015-05-17 14:01:26 +02:00
Maikel de Vries 03b049b0ca add cause_plr to OnShockWaveHit callback
This can be used to damage and kill tracing for objects which die, receive damage or are destroyed on shockwaves.
2015-05-16 21:16:01 +02: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 4ea0cb0ca6 make ContainBlast a property instead of DefCore entry 2015-01-15 17:46:53 +01:00
Tobias Zwick 7e570c05b4 improve the smoke trail and fireworks with the new particle system a bit 2015-01-04 22:09:02 +01:00
Tobias Zwick 0993b3e2a2 change shake strength by distance calculation the same as for audibility 2015-01-03 23:25:28 +01:00
Tobias Zwick b64d379579 tweak fadeoff of the shake effect 2015-01-03 22:53:01 +01:00
Tobias Zwick 659a697cf2 fix ShakeViewport effect, especially for explosions
* The shake effect used to have a target object, which made it vanish as soon as it is removed (and on Explode, it is immediately). So, the shake was never visible. The shake effect is now global and manages all shakes currently on the landscape
* Additionally, if there are several explosions that cause a shake, they were not added up correctly
2015-01-03 22:53:01 +01:00
Sven Eberhardt 2b997b994a Add light effect to explosions.
Currently, all players see the light. In the future, we may want limit it to the controller of the explosion.
2014-12-31 13:36:22 +01:00
David Dormagen 425a221aff adjusted some particles (f.e. smoke slightly brighter, foundry more subtle)
see http://forum.openclonk.org/topic_show.pl?pid=25749#pid25749 for further information
2014-01-25 15: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 0b346d67ff made pretty fireworks (with new particle system) 2013-11-28 23:28:33 +01:00
David Dormagen f032dea85e adapted smoke-trail-effect to use the new particle system 2013-11-26 21:25:04 +01:00
David Dormagen 241ea62d0f added new explosion effect based on Matthi's explosion with the new particle system 2013-11-26 21:25:03 +01:00
Sven Eberhardt aeeedcd770 Fix script errors in scenarios that don't load Objects.ocd 2013-03-19 19:27:19 +01:00
Günther Brammer 35a0d7b6cd Script: Get/SetGravity use 1/100 px/tick^2 instead of 1/500
The old factor was chosen because the default gravity * 500 was exactly
100. But a lot of other engine interfaces use 1/100 px/tick or px/tick^2,
and that is a common scale for scripts to work in, too.
2012-07-15 22:42:17 +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
Julius Michaelis 0f12b3485e Find sounds with all extensions instead of only wav, so Sound() does no longer require .ogg extensions
Do not replace * with ? in sound name wildcards anymore, adjust scripts
2011-10-12 23:09:22 +02:00
Charles Spurrill 238cb6a0c2 Added Iron Bomb (grenade). Modified Explode.c to allow custom exlosion sounds 2011-10-06 06:02:36 -07:00
Charles Spurrill 69369aa59e Blast sounds different under water (or any liquid) 2011-10-01 09:23:44 -07:00
Tobias Zwick 9d67bf366e docs: documented FatalError 2011-09-18 18:16:49 +02:00
Tobias Zwick 638bf42cb7 object-context security check for Explode(int level) 2011-09-12 22:30:34 +02:00
Tobias Zwick 480ff384f8 refactored most effects to use meaningful names for their variables 2011-07-31 17:59:51 +02:00
Tobias Zwick 6278b91c83 BlastObjects - if cause_plr not specified, try calling object 2011-07-03 03:59:48 +02:00
Maikel de Vries 971b330288 Objects: Removed superfluous parameters in function calls
Caused a few warnings recently.
2011-05-12 17:01:54 +02:00
Armin Burgmeier 41a1b5867d Change .c4g extension to .ocg 2011-03-13 16:16:45 +01:00