diff options
author | megamage <none@none> | 2009-06-14 09:57:57 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-14 09:57:57 -0500 |
commit | e192d8f39b85ef504762bcbbd5c13a9885510f6b (patch) | |
tree | b140f635725436e284f3522bc34c93283c175055 /src/game/Debugcmds.cpp | |
parent | c6d242c2b6478797fe19897d54308e7ed8228874 (diff) |
*Some work on vehicle.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Debugcmds.cpp')
-rw-r--r-- | src/game/Debugcmds.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/game/Debugcmds.cpp b/src/game/Debugcmds.cpp index 2e432ab1c0f..d8b94df4e10 100644 --- a/src/game/Debugcmds.cpp +++ b/src/game/Debugcmds.cpp @@ -763,10 +763,17 @@ bool ChatHandler::HandleDebugSpawnVehicle(const char* args) char* e = strtok((char*)args, " "); char* i = strtok(NULL, " "); - if (!e || !i) + if (!e) return false; uint32 entry = (uint32)atoi(e); + + float x, y, z, o = m_session->GetPlayer()->GetOrientation(); + m_session->GetPlayer()->GetClosePoint(x, y, z, m_session->GetPlayer()->GetObjectSize()); + + if(!i) + return m_session->GetPlayer()->SummonVehicle(entry, x, y, z, o); + uint32 id = (uint32)atoi(i); CreatureInfo const *ci = objmgr.GetCreatureTemplate(entry); @@ -781,8 +788,6 @@ bool ChatHandler::HandleDebugSpawnVehicle(const char* args) Vehicle *v = new Vehicle; Map *map = m_session->GetPlayer()->GetMap(); - float x, y, z, o = m_session->GetPlayer()->GetOrientation(); - m_session->GetPlayer()->GetClosePoint(x, y, z, m_session->GetPlayer()->GetObjectSize()); if(!v->Create(objmgr.GenerateLowGuid(HIGHGUID_VEHICLE), map, m_session->GetPlayer()->GetPhaseMask(), entry, id, m_session->GetPlayer()->GetTeam(), x, y, z, o)) { |