mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-21 03:14:06 +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;
|
BaseActor tempActor;
|
||||||
const BaseActor emptyActor = {};
|
const BaseActor emptyActor = {};
|
||||||
|
|
||||||
|
static std::string tempCellDescription;
|
||||||
|
|
||||||
void ActorFunctions::InitScriptActorList(unsigned short pid) noexcept
|
void ActorFunctions::InitScriptActorList(unsigned short pid) noexcept
|
||||||
{
|
{
|
||||||
Player *player;
|
Player *player;
|
||||||
|
@ -37,7 +39,8 @@ unsigned char ActorFunctions::GetLastActorListAction() noexcept
|
||||||
|
|
||||||
const char *ActorFunctions::GetActorCell(unsigned int i) 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
|
const char *ActorFunctions::GetActorRefId(unsigned int i) noexcept
|
||||||
|
|
Loading…
Reference in a new issue