I had several seg11 at jump, so I looked what going on there:
- collideTrees::colTree could return NULL causing src/cmd/unit_collide.cpp at line 197 to call csOPCODECollider::Collide with this==NULL, and to dump core at line 135: ColCache.Model0 = this->m_pCollisionModel;
my patch:
Code: Select all
bakunin:~/vega/svn/vegastrike $ diff -p src/cmd/unit_collide.cpp~ src/cmd/unit_collide.cpp
*** src/cmd/unit_collide.cpp~ Mon Dec 8 06:18:58 2008
--- src/cmd/unit_collide.cpp Mon Dec 8 06:22:36 2008
*************** bool Unit::InsideCollideTree (Unit * sma
*** 194,202 ****
smalltransform.SetO2TTranslation(csVector3(smaller->cumulative_transformation_matrix.p-bigger->cumulative_transformation_matrix.p));
bigtransform.SetO2TTranslation(csVector3(0,0,0));
//we're only gonna lerp the positions for speed here... gahh!
! if (smaller->colTrees->colTree(smaller,bigger->GetWarpVelocity())->Collide (*bigger->colTrees->colTree(bigger,smaller->GetWarpVelocity()),
! &smalltransform,
! &bigtransform)) {
//static int crashcount=0;
// VSFileSystem::vs_fprintf (stderr,"%s Crashez to %s %d\n", bigger->name.c_str(), smaller->name.c_str(),crashcount++);
csCollisionPair *mycollide = csOPCODECollider::GetCollisions();
--- 194,202 ----
smalltransform.SetO2TTranslation(csVector3(smaller->cumulative_transformation_matrix.p-bigger->cumulative_transformation_matrix.p));
bigtransform.SetO2TTranslation(csVector3(0,0,0));
//we're only gonna lerp the positions for speed here... gahh!
! csOPCODECollider *tmpCol = smaller->colTrees->colTree(smaller,bigger->GetWarpVelocity());
! if (tmpCol &&
! (tmpCol->Collide (*bigger->colTrees->colTree(bigger,smaller->GetWarpVelocity()), &smalltransform, &bigtransform))) {
//static int crashcount=0;
// VSFileSystem::vs_fprintf (stderr,"%s Crashez to %s %d\n", bigger->name.c_str(), smaller->name.c_str(),crashcount++);
csCollisionPair *mycollide = csOPCODECollider::GetCollisions();
ciao,Kraehe