diff --git a/server/gameserver/commands.cc b/server/gameserver/commands.cc index d7fe76c6..44d43162 100644 --- a/server/gameserver/commands.cc +++ b/server/gameserver/commands.cc @@ -307,6 +307,25 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg) 666 ); } + } else if (cmd == "create_car") { + const mt::Equip* equip_meta = mt::Equip::GetById(30503); + if (equip_meta) { + int car_uniid = room->AllocUniid(); + glm::vec3 pos = GetPos().ToGlmVec3(); + Car* c = room->CreateCar(nullptr, + car_uniid, + equip_meta, + pos, + 0); + if (c) { + #if 0 + CarObject car; + car.car_id = equip_meta->id(); + car.pos = c->GetPos().ToGlmVec3(); + room->car_hash_[c->GetUniId()] = car; + #endif + } + } } #ifdef DEBUG a8::XPrintf("exec_cmd:%s\n", {cmd});