From 834c79289f2c8f9d3c4af10c4f2e6c5873cb2e2b Mon Sep 17 00:00:00 2001 From: Amadeus Folego Date: Sun, 27 Nov 2022 12:28:16 -0300 Subject: [PATCH] Hotfix: wrong assert for weapondefs --- rts/Rendering/Env/Particles/ProjectileDrawer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rts/Rendering/Env/Particles/ProjectileDrawer.cpp b/rts/Rendering/Env/Particles/ProjectileDrawer.cpp index fb9c41f92b..66f4bb3934 100644 --- a/rts/Rendering/Env/Particles/ProjectileDrawer.cpp +++ b/rts/Rendering/Env/Particles/ProjectileDrawer.cpp @@ -490,7 +490,8 @@ void CProjectileDrawer::LoadWeaponTextures() { // post-process the synced weapon-defs to set unsynced fields // (this requires CWeaponDefHandler to have been initialized) for (WeaponDef& wd: const_cast&>(weaponDefHandler->GetWeaponDefsVec())) { - assert(wd.id > 0); // transitory assert for 0-index to 1-index weaponDefs change + if (!weaponDefHandler->IsValidWeaponDefID(wd.id)) + continue; wd.visuals.texture1 = nullptr; wd.visuals.texture2 = nullptr; @@ -855,7 +856,7 @@ void CProjectileDrawer::DrawShadowPassTransparent() { // Method #1 here: https://wickedengine.net/2018/01/18/easy-transparent-shadow-maps/ - // 1) Render opaque objects into depth stencil texture from light’s point of view - done elsewhere + // 1) Render opaque objects into depth stencil texture from lightÂ’s point of view - done elsewhere // draw the model-less projectiles DrawProjectilesSetShadow(modellessProjectiles);