TITANIC: Fixes for sending via the Bilge SuccUBus

This commit is contained in:
Paul Gilbert 2017-01-22 16:32:48 -05:00
parent fac26795b6
commit 4847fd49a9
3 changed files with 13 additions and 10 deletions

View File

@ -119,8 +119,8 @@ bool CBilgeSuccUBus::PETDeliverMsg(CPETDeliverMsg *msg) {
_sendLost = false;
_mailP = mailObject;
uint roomFlags = _roomFlags;
if (!pet->isSuccUBusDest(roomFlags) || pet->getMailDestClass(roomFlags) < getPassengerClass()) {
uint roomFlags = _destRoomFlags;
if (!pet->isSuccUBusDest(roomFlags) || getPassengerClass() > pet->getMailDestClass(roomFlags)) {
roomFlags = pet->getSpecialRoomFlags("BilgeRoom");
_sendLost = true;
}
@ -208,15 +208,15 @@ bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
} else if (msg->_endFrame == _sendEndFrame) {
switch (_sendAction) {
case 1:
stopSound(_soundHandle);
_soundHandle = playSound("z#3.wav");
case SA_EATEN:
stopSound(_soundHandle, 1);
_soundHandle = playSound("z#3.wav", 1);
break;
case 2:
case SA_BILGE_FEATHERS:
stopSound(_soundHandle);
_soundHandle = playSound("z#12.wav");
break;
case 3:
case SA_BILGE_SENT:
if (_isChicken) {
startTalking(this, 230018);
_isChicken = false;
@ -224,7 +224,7 @@ bool CBilgeSuccUBus::MovieEndMsg(CMovieEndMsg *msg) {
startTalking(this, 230013);
}
break;
case 4:
case SA_BILGE_EATEN:
startTalking(this, 230017);
break;
default:

View File

@ -530,7 +530,7 @@ public:
* Returns whether the given room flags specify a location with a SuccUBus
*/
bool isSuccUBusDest(uint roomFlags) {
return CRoomFlags(roomFlags).not5();
return CRoomFlags(roomFlags).isSuccUBusDest();
}
/**

View File

@ -223,7 +223,10 @@ public:
*/
static PassengerClass whatPassengerClass(int floorNum);
bool not5() const { return getConditionally() != 5; }
/**
* Returns true if it's a location with a SuccUBus terminal
*/
bool isSuccUBusDest() const { return getConditionally() != 5; }
/**
* Returns true if the player is in their 1st class stateroom