mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 16:45:33 +00:00
[Server] Fix invalid pointers when using ActorFunctions::GetActorCell()
This commit is contained in:
parent
a71dbc7d09
commit
328b4fb763
1 changed files with 4 additions and 1 deletions
|
@ -15,6 +15,8 @@ BaseActorList scriptActorList;
|
|||
BaseActor tempActor;
|
||||
const BaseActor emptyActor = {};
|
||||
|
||||
static std::string tempCellDescription;
|
||||
|
||||
void ActorFunctions::InitScriptActorList(unsigned short pid) noexcept
|
||||
{
|
||||
Player *player;
|
||||
|
@ -37,7 +39,8 @@ unsigned char ActorFunctions::GetLastActorListAction() noexcept
|
|||
|
||||
const char *ActorFunctions::GetActorCell(unsigned int i) noexcept
|
||||
{
|
||||
return mwmp::Networking::getPtr()->getLastActorList()->baseActors.at(i).cell.getDescription().c_str();
|
||||
tempCellDescription = mwmp::Networking::getPtr()->getLastActorList()->baseActors.at(i).cell.getDescription();
|
||||
return tempCellDescription.c_str();
|
||||
}
|
||||
|
||||
const char *ActorFunctions::GetActorRefId(unsigned int i) noexcept
|
||||
|
|
Loading…
Reference in a new issue