1
This commit is contained in:
parent
41b9d646cd
commit
769cbe49c9
@ -307,6 +307,25 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg)
|
|||||||
666
|
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
|
#ifdef DEBUG
|
||||||
a8::XPrintf("exec_cmd:%s\n", {cmd});
|
a8::XPrintf("exec_cmd:%s\n", {cmd});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user