Issue595

Title All obstacles created with IS_SMASHABLE flag will only ever use DROIDBLAST blast
Priority minor Status resolved
Assigned To MichaelSM Keywords
Linked issues Tux unarmed strike sounds like a lightsaber
View: 537
Watchers MichaelSM

Submitted on 2012-05-03 07h58 by MichaelSM, last changed by matthiaskrgr.

Messages
Author: MichaelSM Date: 2012-05-03   07h58
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.
Author: MichaelSM Date: 2012-05-03   19h26
Proposed fix : http://rb.freedroid.org/r/1804/
Author: matthiaskrgr Date: 2012-05-14   19h20
Fixed in 046e57c3907f05143b2fe563bfa42cdadf648f33. Thanks!
History
Date User Action Args
2012-05-14 19:20:00matthiaskrgrsetstatus: open -> resolved
messages: + msg2280
2012-05-03 19:26:05MichaelSMsetmessages: + msg2252
2012-05-03 08:02:37MichaelSMlinkissue537 linked
2012-05-03 07:58:42MichaelSMcreate