| 1472 | } |
| 1473 | |
| 1474 | Entity* Entity::CreateObject(ParamArchive& ar) |
| 1475 | { |
| 1476 | RString type, shape; |
| 1477 | if (ar.Serialize("type", type, 1) != LSOK) |
| 1478 | { |
| 1479 | return nullptr; |
| 1480 | } |
| 1481 | if (ar.Serialize("shape", shape, 1) != LSOK) |
| 1482 | { |
| 1483 | return nullptr; |
| 1484 | } |
| 1485 | Entity* veh = NewNonAIVehicle(type, shape, false); |
| 1486 | if (veh && veh->Object::GetType() == Primary) |
| 1487 | { |
| 1488 | veh->SetType(TypeVehicle); |
| 1489 | } |
| 1490 | return veh; |
| 1491 | } |
| 1492 | |
| 1493 | NetworkId Entity::GetNetworkId() const |
| 1494 | { |
nothing calls this directly
no test coverage detected