*Implemented sound play when a transporter arrive.

--HG--
branch : trunk
This commit is contained in:
Blaymoira
2008-12-09 16:22:52 +01:00
parent 357557a12f
commit 94dbaee049
2 changed files with 25 additions and 1 deletions
+23
View File
@@ -400,6 +400,9 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
// sLog.outString("T: %d, x: %f, y: %f, z: %f, t:%d", t, pos.x, pos.y, pos.z, teleport); // sLog.outString("T: %d, x: %f, y: %f, z: %f, t:%d", t, pos.x, pos.y, pos.z, teleport);
if(keyFrames[i+1].delay > 5)
pos.delayed = true;
//if (teleport) //if (teleport)
m_WayPoints[t] = pos; m_WayPoints[t] = pos;
@@ -504,6 +507,26 @@ void Transport::Update(uint32 /*p_time*/)
Relocate(m_curr->second.x, m_curr->second.y, m_curr->second.z); Relocate(m_curr->second.x, m_curr->second.y, m_curr->second.z);
} }
if(m_curr->second.delayed)
{
switch (GetEntry())
{
case 176495:
case 164871:
case 175080:
SendPlaySound(11804, false); break; // ZeppelinDocked
case 20808:
case 181646:
case 176231:
case 176244:
case 176310:
case 177233:
SendPlaySound(5154, false); break; // ShipDocked
default:
SendPlaySound(5495, false);break; // BoatDockingWarning
}
}
/* /*
for(PlayerSet::iterator itr = m_passengers.begin(); itr != m_passengers.end();) for(PlayerSet::iterator itr = m_passengers.begin(); itr != m_passengers.end();)
{ {
+2 -1
View File
@@ -88,12 +88,13 @@ class Transport : private GameObject
{ {
WayPoint() : mapid(0), x(0), y(0), z(0), teleport(false) {} WayPoint() : mapid(0), x(0), y(0), z(0), teleport(false) {}
WayPoint(uint32 _mapid, float _x, float _y, float _z, bool _teleport) : WayPoint(uint32 _mapid, float _x, float _y, float _z, bool _teleport) :
mapid(_mapid), x(_x), y(_y), z(_z), teleport(_teleport) {} mapid(_mapid), x(_x), y(_y), z(_z), teleport(_teleport), delayed(false) {}
uint32 mapid; uint32 mapid;
float x; float x;
float y; float y;
float z; float z;
bool teleport; bool teleport;
bool delayed;
}; };
typedef std::map<uint32, WayPoint> WayPointMap; typedef std::map<uint32, WayPoint> WayPointMap;