mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
[Server] Fix invalid pointers when using ActorFunctions::GetActorCell()
This commit is contained in:
parent
a71dbc7d09
commit
328b4fb763
@ -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…
x
Reference in New Issue
Block a user