#include "Rendering/UnitModels/3DOParser.h"
I don't see an #include for s3oparser.h. Odd.
Later on, I can see why S3Os don't explode. There isn't the equivalent code section to this:
Code: Select all
S3DO* dl = unit->localmodel->pieces[unit->localmodel->scritoa[piece]].original3do;
if(dl){
if (flags & 1) { //Shatter
ENTER_MIXED;
float pieceChance=1-(ph->currentParticles-(ph->maxParticles-2000))/2000;
// info->AddLine("Shattering %i %f",dl->prims.size(),pieceChance);
for(std::vector<S3DOPrimitive>::iterator pi=dl->prims.begin();pi!=dl->prims.end();++pi){
if(gu->usRandFloat()>pieceChance || pi->numVertex!=4)
continue;
ph->AddFlyingPiece(pos,speed+gu->usRandVector()*2,dl,&*pi);
}
ENTER_SYNCED;
}
else {
//info->AddLine("Exploding %s as %d", script.pieceNames[piece].c_str(), dl);
new CPieceProjectile(pos, speed, dl, newflags,unit,0.5);
}
}
#endif
}
Just curious... I want explosions for NanoBlobs, and I think that Spring may be hitting a lot've "I can't find what I'm looking for" errors whenever S3Os explode, based on what I'm seeing here- the explosion code really expects 3DOs, and doesn't mention S3O anywhere.
Now I just have to go find the code (or lack of code) to have the events called during Create() run before the unit is drawn for the first time.