mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Vectors out of range fixes...
This commit is contained in:
parent
df30588d74
commit
b6e4df0f09
@ -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 {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user