r65 - trunk/src
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Oct 2 10:56:42 EDT 2004
Author: jonas
Date: 2004-10-02 10:56:41 -0400 (Sat, 02 Oct 2004)
New Revision: 65
Modified:
trunk/src/players_common.cpp
trunk/src/players_common.h
Log:
play error sound if an item couldn't be used
Modified: trunk/src/players_common.cpp
===================================================================
--- trunk/src/players_common.cpp 2004-10-01 21:56:11 UTC (rev 64)
+++ trunk/src/players_common.cpp 2004-10-02 14:56:41 UTC (rev 65)
@@ -34,6 +34,7 @@
im_land_right=animation;
au_land=sndcache->loadWAV("dizzy.wav");
au_act=sndcache->loadWAV("button.wav");
+ au_useerror=sndcache->loadWAV("useerror.wav");
au_newitem=sndcache->loadWAV("pickup.wav");
au_hit=sndcache->loadWAV("vikhit.wav");
au_elec=sndcache->loadWAV("elecdth.wav");
@@ -186,7 +187,9 @@
void Player::in_use(Sint16 dt) {
if (dt < 0) return;
input->unsetState(INPUT_USE);
- if (items[currentitem]) items[currentitem]->act(this);
+ if (items[currentitem]) {
+ if (!(items[currentitem]->act(this))) sfxeng->playWAV(au_useerror);
+ }
}
void Player::in_right(Sint16 dt) {
Modified: trunk/src/players_common.h
===================================================================
--- trunk/src/players_common.h 2004-10-01 21:56:11 UTC (rev 64)
+++ trunk/src/players_common.h 2004-10-02 14:56:41 UTC (rev 65)
@@ -121,6 +121,7 @@
Mix_Chunk* au_hit;
Mix_Chunk* au_land;
Mix_Chunk* au_act;
+ Mix_Chunk* au_useerror;
Mix_Chunk* au_newitem;
Mix_Chunk* au_die;
Mix_Chunk* au_elec;
More information about the lostpenguins-commits
mailing list