Fix compile errors and game crash due to unnecessary code left in DoNothing strategy. Release Build 13222.
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 8m19s

This commit is contained in:
AMay 2026-04-01 15:03:48 -05:00
parent 39b4858a8a
commit afd159d11e
6 changed files with 5 additions and 11 deletions

View File

@ -40,10 +40,4 @@ All rights reserved.
#include"Effect.h"
DEFINE_STRATEGY(DONOTHING)
Effect a{vf2d{},0.f,"",true,1.f,2.f,vf2d{},BLACK};
Effect b{vf2d{},0.f,"",true,1.f,2.f,vf2d{},BLACK};
EffectT eff{a};
EffectT eff2=b;
eff=eff2;
END_STRATEGY

View File

@ -144,6 +144,7 @@ const bool Effect::IsDead()const{
}
EffectData::EffectData(){}
EffectData::EffectData(int effectId,const EffectT&effect):effectId(effectId),effect(effect){}
void EffectManager::Reset(){
foregroundEffectList.fill({});

View File

@ -38,8 +38,7 @@ struct EffectManager{
friend class AiL;
struct EffectData{
EffectData();
template<typename T>
EffectData(int effectId,const T&effect):effectId(effectId),effect(effect){}
EffectData(int effectId,const EffectT&effect);
int effectId{};
std::optional<EffectT>effect{};
};

View File

@ -57,13 +57,13 @@ void ThunderOrb::Update(float fElapsedTime){
if((lightningTickTimer-=fElapsedTime)<=0.f){
if(foundTargets.size()==0){
for(int i:std::ranges::iota_view(0,1000)){
for(int i:std::ranges::iota_view(0,3)){
vf2d lightningBoltRandomPos=pos+vf2d{settings.range/100.f*24/1.5f,util::random(2*PI)}.cart();
lightning.DrawLightningBolt(lightningBoltRandomPos);
}
}else{
for(Entity&ent:foundTargets|std::views::filter([&](Entity&ent){return ent.IsFriendly()!=friendly;})){
for(int i:std::ranges::iota_view(0,1000)){
for(int i:std::ranges::iota_view(0,3)){
lightning.DrawLightningBolt(ent.GetPos());
}
}

View File

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_PATCH 0
#define VERSION_BUILD 13213
#define VERSION_BUILD 13222
#define stringify(a) stringify_(a)
#define stringify_(a) #a