| 1585 | } |
| 1586 | |
| 1587 | Handle::EntityHandle PlayerController::importPlayerController(World::WorldInstance& world, const json& j) |
| 1588 | { |
| 1589 | unsigned int instanceSymbol = j["scriptObj"]["instanceSymbol"]; |
| 1590 | |
| 1591 | // Create npc |
| 1592 | Handle::EntityHandle e = VobTypes::Wld_InsertNpc(world, instanceSymbol); |
| 1593 | |
| 1594 | if (!e.isValid()) |
| 1595 | return Handle::EntityHandle::makeInvalidHandle(); |
| 1596 | |
| 1597 | VobTypes::NpcVobInformation npc = VobTypes::asNpcVob(world, e); |
| 1598 | |
| 1599 | // Load controller-values |
| 1600 | npc.playerController->importObject(j); |
| 1601 | |
| 1602 | return e; |
| 1603 | } |
| 1604 | |
| 1605 | void PlayerController::die(Handle::EntityHandle attackingNPC) |
| 1606 | { |
nothing calls this directly
no test coverage detected