Vectors out of range fixes...

This commit is contained in:
Nou 2015-05-15 23:34:23 -07:00
parent df30588d74
commit b6e4df0f09
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ namespace ace {
int as_uint32(uint32_t _index) const { return (uint32_t)atoi(_args[_index].c_str()); }
ace::vector3<float> as_vector(uint32_t _index) const {
std::vector<std::string> t = ace::split(_args[_index], ';');
return ace::vector3<float>(to_float(t[0]), to_float(t[1]), to_float(t[3]));
return ace::vector3<float>(to_float(t[0]), to_float(t[1]), to_float(t[2]));
}
const std::string & get() const {

View File

@ -111,7 +111,7 @@ namespace ace {
if (ace::model_collection::get().load_model(model_str)) {
std::shared_ptr<ace::simulation::object> _object = std::make_shared<ace::simulation::object>(model_collection::get().models[model_str].model, (static_cast<int>(_args[2]) != 0 ? true : false));
vehicle_p _vehicle = std::make_shared<vehicle>(static_cast<uint32_t>(_args[1]), _object, false, _args[2]);
vehicle_p _vehicle = std::make_shared<vehicle>(static_cast<uint32_t>(_args[1]), _object, false, _args[3]);
vehicles[static_cast<uint32_t>(_args[1])] = _vehicle;
// For results on a valid vehicle registration, we return its animation names for that given vehicle