From bullet.c :
/**
* This function starts a blast (i.e. an explosion) at the given location
* in the usual map coordinates of course. The type of blast must also
* be specified, where possible values are defined in defs.h as follows:
*
* BULLETBLAST = 0 , (explosion of a small bullet hitting the wall)
* DROIDBLAST, (explosion of a dying droid)
* OWNBLAST (not implemented)
*
*/
void StartBlast(float x, float y, int level, int type, int dmg, int faction)
From map.c
// Now that the obstacle is removed AND ONLY NOW that the obstacle is
// removed, we may start a blast at this position. Otherwise we would
// run into trouble, see the warning further above.
StartBlast(blast_start_pos.x, blast_start_pos.y, level, DROIDBLAST, 0.0,
FACTION_SELF);
-- In the above no matter what the obstacle is that we are blasting, we will
always use the DROIDBLAST as defined below.
From blast_specs.lua :
-- This blast needs to be at the second position in the file.
-- It's used for tux and obstacle explosions.
blast {
name = "iso_blast_droid",
phases = 20,
animation_time = 1.0,
do_damage = 1,
sound_file = "Blast_Sound_0.ogg"
}
From obstacle_specs.lua :
obstacle {
image_filenames = "iso_obstacle_0042.png",
borders = borders(0.50, 0.50),
flags = { IS_SMASHABLE, GROUND_LEVEL },
transparency = NO_TRANSPARENCY,
}
-- We can create smashable obstacles, but we never define a field for the type
of blast an obstacle would emit/endure, so they are always DROIDBLASTs hence why
we hear/see explosions instead of hearing/seeing glass shattering.
|