From 91d2f89b54d5e911cba8071efa6aae1fc86cbcd5 Mon Sep 17 00:00:00 2001 From: def Date: Mon, 21 Sep 2020 23:16:56 +0200 Subject: [PATCH 1/4] Version 15.0.5 --- other/ddnet.appdata.xml | 1 + src/game/version.h | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/other/ddnet.appdata.xml b/other/ddnet.appdata.xml index 2f91bbb8f..1daccfa43 100644 --- a/other/ddnet.appdata.xml +++ b/other/ddnet.appdata.xml @@ -37,6 +37,7 @@ intense + diff --git a/src/game/version.h b/src/game/version.h index 965f33730..5f2d47f5b 100644 --- a/src/game/version.h +++ b/src/game/version.h @@ -2,10 +2,10 @@ /* If you are missing that file, acquire a complete release at teeworlds.com. */ #ifndef GAME_VERSION_H #define GAME_VERSION_H -#define GAME_VERSION "0.6.4, 15.0.4" +#define GAME_VERSION "0.6.4, 15.0.5" #define GAME_NETVERSION "0.6 626fce9a778df4d4" #define GAME_NAME "DDNet" -#define GAME_RELEASE_VERSION "15.0.4" -#define CLIENT_VERSIONNR 15004 +#define GAME_RELEASE_VERSION "15.0.5" +#define CLIENT_VERSIONNR 15005 extern const char *GIT_SHORTREV_HASH; #endif From 7e436ff2b1366fda5eaadc53bf69f30e3448100a Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Tue, 22 Sep 2020 02:01:22 +0200 Subject: [PATCH 2/4] Don't rely on snapshot for ddnet gametype --- src/game/client/components/mapimages.cpp | 42 ++++++++++++------------ src/game/client/components/mapimages.h | 10 +++--- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/game/client/components/mapimages.cpp b/src/game/client/components/mapimages.cpp index b41895ab4..fe54f5acf 100644 --- a/src/game/client/components/mapimages.cpp +++ b/src/game/client/components/mapimages.cpp @@ -113,29 +113,29 @@ void CMapImages::LoadBackground(class CLayers *pLayers, class IMap *pMap) OnMapLoadImpl(pLayers, pMap); } -bool CMapImages::HasFrontLayer() +bool CMapImages::HasFrontLayer(EMapImageModType ModType) { - return GameClient()->m_GameInfo.m_EntitiesDDNet || GameClient()->m_GameInfo.m_EntitiesDDRace; + return ModType == MAP_IMAGE_MOD_TYPE_DDNET || ModType == MAP_IMAGE_MOD_TYPE_DDRACE; } -bool CMapImages::HasSpeedupLayer() +bool CMapImages::HasSpeedupLayer(EMapImageModType ModType) { - return GameClient()->m_GameInfo.m_EntitiesDDNet || GameClient()->m_GameInfo.m_EntitiesDDRace; + return ModType == MAP_IMAGE_MOD_TYPE_DDNET || ModType == MAP_IMAGE_MOD_TYPE_DDRACE; } -bool CMapImages::HasSwitchLayer() +bool CMapImages::HasSwitchLayer(EMapImageModType ModType) { - return GameClient()->m_GameInfo.m_EntitiesDDNet || GameClient()->m_GameInfo.m_EntitiesDDRace; + return ModType == MAP_IMAGE_MOD_TYPE_DDNET || ModType == MAP_IMAGE_MOD_TYPE_DDRACE; } -bool CMapImages::HasTeleLayer() +bool CMapImages::HasTeleLayer(EMapImageModType ModType) { - return GameClient()->m_GameInfo.m_EntitiesDDNet || GameClient()->m_GameInfo.m_EntitiesDDRace; + return ModType == MAP_IMAGE_MOD_TYPE_DDNET || ModType == MAP_IMAGE_MOD_TYPE_DDRACE; } -bool CMapImages::HasTuneLayer() +bool CMapImages::HasTuneLayer(EMapImageModType ModType) { - return GameClient()->m_GameInfo.m_EntitiesDDNet || GameClient()->m_GameInfo.m_EntitiesDDRace; + return ModType == MAP_IMAGE_MOD_TYPE_DDNET || ModType == MAP_IMAGE_MOD_TYPE_DDRACE; } IGraphics::CTextureHandle CMapImages::GetEntities(EMapImageEntityLayerType EntityLayerType) @@ -175,9 +175,9 @@ IGraphics::CTextureHandle CMapImages::GetEntities(EMapImageEntityLayerType Entit EntitiesModType = MAP_IMAGE_MOD_TYPE_VANILLA; } - if(!m_EntitiesIsLoaded[EntitiesModType + (int)EntitesAreMasked]) + if(!m_EntitiesIsLoaded[(EntitiesModType * 2) + (int)EntitesAreMasked]) { - m_EntitiesIsLoaded[EntitiesModType + (int)EntitesAreMasked] = true; + m_EntitiesIsLoaded[(EntitiesModType * 2) + (int)EntitesAreMasked] = true; // any mod that does not mask, will get all layers unmasked bool WasUnknwon = !EntitesAreMasked; @@ -185,11 +185,11 @@ IGraphics::CTextureHandle CMapImages::GetEntities(EMapImageEntityLayerType Entit char aPath[64]; str_format(aPath, sizeof(aPath), "editor/entities_clear/%s.png", pEntities); - bool GameTypeHasFrontLayer = HasFrontLayer() || WasUnknwon; - bool GameTypeHasSpeedupLayer = HasSpeedupLayer() || WasUnknwon; - bool GameTypeHasSwitchLayer = HasSwitchLayer() || WasUnknwon; - bool GameTypeHasTeleLayer = HasTeleLayer() || WasUnknwon; - bool GameTypeHasTuneLayer = HasTuneLayer() || WasUnknwon; + bool GameTypeHasFrontLayer = HasFrontLayer(EntitiesModType) || WasUnknwon; + bool GameTypeHasSpeedupLayer = HasSpeedupLayer(EntitiesModType) || WasUnknwon; + bool GameTypeHasSwitchLayer = HasSwitchLayer(EntitiesModType) || WasUnknwon; + bool GameTypeHasTeleLayer = HasTeleLayer(EntitiesModType) || WasUnknwon; + bool GameTypeHasTuneLayer = HasTuneLayer(EntitiesModType) || WasUnknwon; int TextureLoadFlag = Graphics()->HasTextureArrays() ? IGraphics::TEXLOAD_TO_2D_ARRAY_TEXTURE : IGraphics::TEXLOAD_TO_3D_TEXTURE; @@ -224,7 +224,7 @@ IGraphics::CTextureHandle CMapImages::GetEntities(EMapImageEntityLayerType Entit else if(n == MAP_IMAGE_ENTITY_LAYER_TYPE_TUNE && !GameTypeHasTuneLayer) BuildThisLayer = false; - dbg_assert(m_EntitiesTextures[EntitiesModType + (int)EntitesAreMasked][n] == -1, "entities texture already loaded when it should not be"); + dbg_assert(m_EntitiesTextures[(EntitiesModType * 2) + (int)EntitesAreMasked][n] == -1, "entities texture already loaded when it should not be"); if(BuildThisLayer) { @@ -293,7 +293,7 @@ IGraphics::CTextureHandle CMapImages::GetEntities(EMapImageEntityLayerType Entit } } - m_EntitiesTextures[EntitiesModType + (int)EntitesAreMasked][n] = Graphics()->LoadTextureRaw(ImgInfo.m_Width, ImgInfo.m_Height, ImgInfo.m_Format, pBuildImgData, ImgInfo.m_Format, TextureLoadFlag, aPath); + m_EntitiesTextures[(EntitiesModType * 2) + (int)EntitesAreMasked][n] = Graphics()->LoadTextureRaw(ImgInfo.m_Width, ImgInfo.m_Height, ImgInfo.m_Format, pBuildImgData, ImgInfo.m_Format, TextureLoadFlag, aPath); } else { @@ -304,7 +304,7 @@ IGraphics::CTextureHandle CMapImages::GetEntities(EMapImageEntityLayerType Entit m_TransparentTexture = Graphics()->LoadTextureRaw(ImgInfo.m_Width, ImgInfo.m_Height, ImgInfo.m_Format, pBuildImgData, ImgInfo.m_Format, TextureLoadFlag, aPath); } - m_EntitiesTextures[EntitiesModType + (int)EntitesAreMasked][n] = m_TransparentTexture; + m_EntitiesTextures[(EntitiesModType * 2) + (int)EntitesAreMasked][n] = m_TransparentTexture; } } @@ -312,7 +312,7 @@ IGraphics::CTextureHandle CMapImages::GetEntities(EMapImageEntityLayerType Entit } } - return m_EntitiesTextures[EntitiesModType + (int)EntitesAreMasked][EntityLayerType]; + return m_EntitiesTextures[(EntitiesModType * 2) + (int)EntitesAreMasked][EntityLayerType]; } IGraphics::CTextureHandle CMapImages::GetSpeedupArrow() diff --git a/src/game/client/components/mapimages.h b/src/game/client/components/mapimages.h index 2150d44b0..426ca6538 100644 --- a/src/game/client/components/mapimages.h +++ b/src/game/client/components/mapimages.h @@ -36,11 +36,11 @@ class CMapImages : public CComponent int m_aTextureUsedByTileOrQuadLayerFlag[64]; // 0: nothing, 1(as flag): tile layer, 2(as flag): quad layer int m_Count; - bool HasFrontLayer(); - bool HasSpeedupLayer(); - bool HasSwitchLayer(); - bool HasTeleLayer(); - bool HasTuneLayer(); + bool HasFrontLayer(EMapImageModType ModType); + bool HasSpeedupLayer(EMapImageModType ModType); + bool HasSwitchLayer(EMapImageModType ModType); + bool HasTeleLayer(EMapImageModType ModType); + bool HasTuneLayer(EMapImageModType ModType); public: CMapImages(); From df72c0ee7cc9193ccca6106b7528e5da08a799e1 Mon Sep 17 00:00:00 2001 From: patiga Date: Tue, 22 Sep 2020 14:50:04 +0200 Subject: [PATCH 3/4] set the correct variable --- src/game/editor/popups.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp index 7959939ca..e0fad22e8 100644 --- a/src/game/editor/popups.cpp +++ b/src/game/editor/popups.cpp @@ -737,7 +737,7 @@ int CEditor::PopupSource(CEditor *pEditor, CUIRect View, void *pContext) {"Pos. Env", pSource->m_PosEnv+1, PROPTYPE_ENVELOPE, 0, 0}, {"Pos. TO", pSource->m_PosEnvOffset, PROPTYPE_INT_SCROLL, -1000000, 1000000}, {"Sound Env", pSource->m_SoundEnv+1, PROPTYPE_ENVELOPE, 0, 0}, - {"Sound. TO", pSource->m_PosEnvOffset, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + {"Sound. TO", pSource->m_SoundEnvOffset, PROPTYPE_INT_SCROLL, -1000000, 1000000}, {0}, }; From 4e893561c86b49423442924eb9387dea18556f93 Mon Sep 17 00:00:00 2001 From: patiga Date: Tue, 22 Sep 2020 15:42:20 +0200 Subject: [PATCH 4/4] run fix_style script --- src/game/editor/popups.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp index e0fad22e8..e66f87324 100644 --- a/src/game/editor/popups.cpp +++ b/src/game/editor/popups.cpp @@ -728,22 +728,20 @@ int CEditor::PopupSource(CEditor *pEditor, CUIRect View, void *pContext) }; CProperty aProps[] = { - {"Pos X", pSource->m_Position.x/1000, PROPTYPE_INT_SCROLL, -1000000, 1000000}, - {"Pos Y", pSource->m_Position.y/1000, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + {"Pos X", pSource->m_Position.x / 1000, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + {"Pos Y", pSource->m_Position.y / 1000, PROPTYPE_INT_SCROLL, -1000000, 1000000}, {"Loop", pSource->m_Loop, PROPTYPE_BOOL, 0, 1}, {"Pan", pSource->m_Pan, PROPTYPE_BOOL, 0, 1}, {"Delay", pSource->m_TimeDelay, PROPTYPE_INT_SCROLL, 0, 1000000}, {"Falloff", pSource->m_Falloff, PROPTYPE_INT_SCROLL, 0, 255}, - {"Pos. Env", pSource->m_PosEnv+1, PROPTYPE_ENVELOPE, 0, 0}, + {"Pos. Env", pSource->m_PosEnv + 1, PROPTYPE_ENVELOPE, 0, 0}, {"Pos. TO", pSource->m_PosEnvOffset, PROPTYPE_INT_SCROLL, -1000000, 1000000}, - {"Sound Env", pSource->m_SoundEnv+1, PROPTYPE_ENVELOPE, 0, 0}, + {"Sound Env", pSource->m_SoundEnv + 1, PROPTYPE_ENVELOPE, 0, 0}, {"Sound. TO", pSource->m_SoundEnvOffset, PROPTYPE_INT_SCROLL, -1000000, 1000000}, {0}, }; - - static int s_aIds[NUM_PROPS] = {0}; int NewVal = 0; int Prop = pEditor->DoProperties(&View, aProps, s_aIds, &NewVal);