Fixes problems with windows:
- Changed cPlayer:OpenWindow to accept a ref, tolua adds a nil check - Close open lua window in destructor, to avoid dangling pointers
This commit is contained in:
@@ -297,7 +297,7 @@ bool cBeaconEntity::UsedBy(cPlayer * a_Player)
|
||||
// if (a_Player->GetWindow() != Window)
|
||||
// -> Because mojang doesn't send a 'close window' packet when you click the cancel button in the beacon inventory ...
|
||||
{
|
||||
a_Player->OpenWindow(Window);
|
||||
a_Player->OpenWindow(*Window);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user