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!
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.
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
Added damage override parameter to the explosion functions. Updated the documentation as well.
(cherry picked from commit 59f802c2d3f269d54c12489ac9659ee3ca57a857)
Conflicts:
planet/System.ocg/Explode.c
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)
* 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
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.
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.