Skip to content

Commit

Permalink
Hotfix: wrong assert for weapondefs
Browse files Browse the repository at this point in the history
  • Loading branch information
badosu authored Nov 27, 2022
1 parent f9679c3 commit 834c792
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rts/Rendering/Env/Particles/ProjectileDrawer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::vector<WeaponDef>&>(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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 834c792

Please sign in to comment.