mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
fixed object types playing sounds
This commit is contained in:
parent
c3a4f15eda
commit
e4fce8fc8f
@ -1516,16 +1516,16 @@ void CPlayerInterface::centerView (int3 pos, int focusTime)
|
|||||||
void CPlayerInterface::objectRemoved( const CGObjectInstance *obj )
|
void CPlayerInterface::objectRemoved( const CGObjectInstance *obj )
|
||||||
{
|
{
|
||||||
EVENT_HANDLER_CALLED_BY_CLIENT;
|
EVENT_HANDLER_CALLED_BY_CLIENT;
|
||||||
|
if (LOCPLINT->cb->getCurrentPlayer() == playerID) {
|
||||||
std::string handlerName = VLC->objtypeh->getObjectHandlerName(obj->ID);
|
std::string handlerName = VLC->objtypeh->getObjectHandlerName(obj->ID);
|
||||||
if (handlerName == "pickable") {
|
if ((handlerName == "pickable") || (handlerName == "scholar") || (handlerName== "artifact") || (handlerName == "pandora") {
|
||||||
waitWhileDialog();
|
waitWhileDialog();
|
||||||
CCS->soundh->playSoundFromSet(CCS->soundh->pickupSounds);
|
CCS->soundh->playSoundFromSet(CCS->soundh->pickupSounds);
|
||||||
} else if ((handlerName == "monster") || (handlerName == "hero")) {
|
} else if ((handlerName == "monster") || (handlerName == "hero")) {
|
||||||
waitWhileDialog();
|
waitWhileDialog();
|
||||||
CCS->soundh->playSound(soundBase::KillFade);
|
CCS->soundh->playSound(soundBase::KillFade);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(obj->ID == Obj::HERO && obj->tempOwner == playerID)
|
if(obj->ID == Obj::HERO && obj->tempOwner == playerID)
|
||||||
{
|
{
|
||||||
const CGHeroInstance *h = static_cast<const CGHeroInstance*>(obj);
|
const CGHeroInstance *h = static_cast<const CGHeroInstance*>(obj);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user