mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Fix sound for ennemies on trap
This commit is contained in:
parent
df94bc86e4
commit
77c0a6ee3b
@ -197,10 +197,10 @@ CDecor::BlupiDelete (Point cel, Sint32 perso)
|
|||||||
// Supprime un blupi existant.
|
// Supprime un blupi existant.
|
||||||
|
|
||||||
void
|
void
|
||||||
CDecor::BlupiDelete (Sint32 rank)
|
CDecor::BlupiDelete (Sint32 rank, SDL_bool haveSound)
|
||||||
{
|
{
|
||||||
m_blupi[rank].bExist = false;
|
m_blupi[rank].bExist = false;
|
||||||
this->m_pSound->StopSound (false, rank);
|
this->m_pSound->StopSound (!haveSound, rank);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!m_bBuild && // phase de jeu ?
|
!m_bBuild && // phase de jeu ?
|
||||||
@ -2847,9 +2847,10 @@ CDecor::BlupiNextGoal (Sint32 rank)
|
|||||||
}
|
}
|
||||||
if (channel == CHOBJECT && icon == 93) // piège ?
|
if (channel == CHOBJECT && icon == 93) // piège ?
|
||||||
{
|
{
|
||||||
|
this->m_pSound->StopSound (true, rank);
|
||||||
BlupiSound (rank, SOUND_TRAP, pos);
|
BlupiSound (rank, SOUND_TRAP, pos);
|
||||||
PutObject (cel, CHOBJECT, 96); // araignée piégée
|
PutObject (cel, CHOBJECT, 96); // araignée piégée
|
||||||
BlupiDelete (rank); // supprime araignée
|
BlupiDelete (rank, SDL_TRUE); // supprime araignée
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2944,9 +2945,10 @@ CDecor::BlupiNextGoal (Sint32 rank)
|
|||||||
}
|
}
|
||||||
if (icon == 93) // piège ?
|
if (icon == 93) // piège ?
|
||||||
{
|
{
|
||||||
|
this->m_pSound->StopSound (true, rank);
|
||||||
BlupiSound (rank, SOUND_TRAP, pos);
|
BlupiSound (rank, SOUND_TRAP, pos);
|
||||||
PutObject (cel, CHOBJECT, 97); // tracks piégé
|
PutObject (cel, CHOBJECT, 97); // tracks piégé
|
||||||
BlupiDelete (rank); // supprime tracks
|
BlupiDelete (rank, SDL_TRUE); // supprime tracks
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3024,9 +3026,10 @@ CDecor::BlupiNextGoal (Sint32 rank)
|
|||||||
}
|
}
|
||||||
if (icon == 93) // piège ?
|
if (icon == 93) // piège ?
|
||||||
{
|
{
|
||||||
|
this->m_pSound->StopSound (true, rank);
|
||||||
BlupiSound (rank, SOUND_TRAP, pos);
|
BlupiSound (rank, SOUND_TRAP, pos);
|
||||||
PutObject (cel, CHOBJECT, 98); // robot piégé
|
PutObject (cel, CHOBJECT, 98); // robot piégé
|
||||||
BlupiDelete (rank); // supprime robot
|
BlupiDelete (rank, SDL_TRUE); // supprime robot
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3070,9 +3073,10 @@ CDecor::BlupiNextGoal (Sint32 rank)
|
|||||||
GetObject (cel, channel, icon);
|
GetObject (cel, channel, icon);
|
||||||
if (channel == CHOBJECT && icon == 93) // piège ?
|
if (channel == CHOBJECT && icon == 93) // piège ?
|
||||||
{
|
{
|
||||||
|
this->m_pSound->StopSound (true, rank);
|
||||||
BlupiSound (rank, SOUND_TRAP, pos);
|
BlupiSound (rank, SOUND_TRAP, pos);
|
||||||
PutObject (cel, CHOBJECT, 114); // bombe piégée
|
PutObject (cel, CHOBJECT, 114); // bombe piégée
|
||||||
BlupiDelete (rank); // supprime bombe
|
BlupiDelete (rank, SDL_TRUE); // supprime bombe
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3114,9 +3118,10 @@ CDecor::BlupiNextGoal (Sint32 rank)
|
|||||||
GetObject (cel, channel, icon);
|
GetObject (cel, channel, icon);
|
||||||
if (channel == CHOBJECT && icon == 93) // piège ?
|
if (channel == CHOBJECT && icon == 93) // piège ?
|
||||||
{
|
{
|
||||||
|
this->m_pSound->StopSound (true, rank);
|
||||||
BlupiSound (rank, SOUND_TRAP, pos);
|
BlupiSound (rank, SOUND_TRAP, pos);
|
||||||
PutObject (cel, CHOBJECT, 19); // électro piégée
|
PutObject (cel, CHOBJECT, 19); // électro piégée
|
||||||
BlupiDelete (rank); // supprime électro
|
BlupiDelete (rank, SDL_TRUE); // supprime électro
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,7 @@ public:
|
|||||||
Sint32 BlupiCreate (
|
Sint32 BlupiCreate (
|
||||||
Point cel, Sint32 action, Sint32 direct, Sint32 perso, Sint32 energy);
|
Point cel, Sint32 action, Sint32 direct, Sint32 perso, Sint32 energy);
|
||||||
bool BlupiDelete (Point cel, Sint32 perso = -1);
|
bool BlupiDelete (Point cel, Sint32 perso = -1);
|
||||||
void BlupiDelete (Sint32 rank);
|
void BlupiDelete (Sint32 rank, SDL_bool haveSound = SDL_FALSE);
|
||||||
void BlupiKill (Sint32 exRank, Point cel, Sint32 type);
|
void BlupiKill (Sint32 exRank, Point cel, Sint32 type);
|
||||||
bool BlupiIfExist (Sint32 rank);
|
bool BlupiIfExist (Sint32 rank);
|
||||||
void BlupiCheat (Sint32 cheat);
|
void BlupiCheat (Sint32 cheat);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user