MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / takeControlOver

Method takeControlOver

src/engine/World.cpp:1090–1095  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1088}
1089
1090void WorldInstance::takeControlOver(Handle::EntityHandle entityHandle)
1091{
1092 VobTypes::NpcVobInformation newPlayer = VobTypes::asNpcVob(*this, entityHandle);
1093 getScriptEngine().setPlayerEntity(entityHandle);
1094 getScriptEngine().setInstanceNPC("hero", VobTypes::getScriptHandle(newPlayer));
1095}
1096
1097Handle::EntityHandle WorldInstance::importVobAndTakeControl(const json& j)
1098{

Callers 1

startNewGameMethod · 0.80

Calls 2

setPlayerEntityMethod · 0.80
setInstanceNPCMethod · 0.80

Tested by

no test coverage detected