Force all old decal instances to be cleared from the engine when the game is reset. This addresses a very random Linux crash that was occurring enough to be a problem when quitting the game. Release Build 11570.
This commit is contained in:
parent
ca46f0b92e
commit
57cc852033
@ -4187,6 +4187,7 @@ void AiL::ResetGame(bool changeToMainMenu){
|
|||||||
Tutorial::Initialize();
|
Tutorial::Initialize();
|
||||||
minimap.SetMinimapMode(MinimapMode::SMALL);
|
minimap.SetMinimapMode(MinimapMode::SMALL);
|
||||||
minimap.EraseChunkData();
|
minimap.EraseChunkData();
|
||||||
|
ClearDecalInstances();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AiL::OnRequestCompleted(const std::string_view receivedData)const{
|
void AiL::OnRequestCompleted(const std::string_view receivedData)const{
|
||||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 0
|
||||||
#define VERSION_BUILD 11566
|
#define VERSION_BUILD 11570
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
@ -1210,6 +1210,8 @@ namespace olc
|
|||||||
const uint8_t GetMosaicEffect()const;
|
const uint8_t GetMosaicEffect()const;
|
||||||
void SetMosaicEffect(uint8_t effectLevel);
|
void SetMosaicEffect(uint8_t effectLevel);
|
||||||
|
|
||||||
|
void ClearDecalInstances();
|
||||||
|
|
||||||
HWButton*const GetKeyboardState(uint8_t key);
|
HWButton*const GetKeyboardState(uint8_t key);
|
||||||
public:
|
public:
|
||||||
static std::map<char,Pixel> charToColor;
|
static std::map<char,Pixel> charToColor;
|
||||||
@ -2142,6 +2144,12 @@ namespace olc
|
|||||||
return std::string(originalText);
|
return std::string(originalText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PixelGameEngine::ClearDecalInstances(){
|
||||||
|
for(LayerDesc&layer:GetLayers()){
|
||||||
|
layer.vecDecalInstance.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::u32string PixelGameEngine::stripLeadingCol(std::u32string_view originalText){
|
std::u32string PixelGameEngine::stripLeadingCol(std::u32string_view originalText){
|
||||||
if(originalText.length()>0&&originalText[0]=='#')return std::u32string(originalText.substr(7));
|
if(originalText.length()>0&&originalText[0]=='#')return std::u32string(originalText.substr(7));
|
||||||
return std::u32string(originalText);
|
return std::u32string(originalText);
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user