Update of /cvsroot/epfl/tggame
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20426
Modified Files:
game.cc model.cc model.h
Log Message:
Index: game.cc
===================================================================
RCS file: /cvsroot/epfl/tggame/game.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** game.cc 27 Sep 2004 13:34:27 -0000 1.4
--- game.cc 30 Sep 2004 10:31:42 -0000 1.5
***************
*** 45,51 ****
if (scene)
p->GetModel()->Add(pSceneManager);
! if (physic)
p->GetModel()->Add(pPhysicEngine);
! if (p->GetCamera())
pPhysicEngine->AddNode(p->GetCamera());
}
--- 45,51 ----
if (scene)
p->GetModel()->Add(pSceneManager);
! if (physic && scene)
p->GetModel()->Add(pPhysicEngine);
! if (p->GetCamera() && physic)
pPhysicEngine->AddNode(p->GetCamera());
}
***************
*** 63,67 ****
pSceneManager->SetCamera(cam);
vPawns.push_back(p);
! this->AddPawn(p, false, false);
pLocalController = new PlayerController(p);
vControllers.push_back(pLocalController);
--- 63,67 ----
pSceneManager->SetCamera(cam);
vPawns.push_back(p);
! this->AddPawn(p, true, false);
pLocalController = new PlayerController(p);
vControllers.push_back(pLocalController);
***************
*** 75,79 ****
Controller* c = new IAController(p);
vControllers.push_back(c);
! p->SetPosition(pWorld->GetRandomStartPosition()+Vector3(20,70,20));
}
--- 75,79 ----
Controller* c = new IAController(p);
vControllers.push_back(c);
! p->SetPosition(pWorld->GetRandomStartPosition()+Vector3(0,70,0));
}
Index: model.h
===================================================================
RCS file: /cvsroot/epfl/tggame/model.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** model.h 28 Sep 2004 09:45:24 -0000 1.3
--- model.h 30 Sep 2004 10:31:42 -0000 1.4
***************
*** 11,16 ****
enum eAnimations
{
! MDL_ANIM_WALK,
! MDL_ANIM_JUMP
};
--- 11,15 ----
enum eAnimations
{
! MDL_ANIM_IDLE,
};
***************
*** 18,22 ****
enum eModelType
{
! MDL_PLAYER=0
};
--- 17,22 ----
enum eModelType
{
! MDL_PLAYER=0,
! MDL_ANIMATED_PLAYER=1
};
Index: model.cc
===================================================================
RCS file: /cvsroot/epfl/tggame/model.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** model.cc 27 Sep 2004 13:34:27 -0000 1.2
--- model.cc 30 Sep 2004 10:31:42 -0000 1.3
***************
*** 30,37 ****
//Chargement du mesh
NEXT("mesh")
pFD >> buffer;
!
! std::string meshname = "data/models/pinky/";
meshname += buffer;
--- 30,40 ----
//Chargement du mesh
+ NEXT("dir")
+ std::string dir;
+ pFD >> dir;
NEXT("mesh")
pFD >> buffer;
! std::string meshname = "data/models/";
! meshname += dir;
meshname += buffer;
***************
*** 47,57 ****
return false;
}
!
for (int i=0; i<numAnims; i++)
{
NEXT("anim")
pFD >> buffer;
! pMD5Mesh->LoadAnim ((char*)buffer.data());
}
return true;
}
--- 50,63 ----
return false;
}
! std::string animname = "data/models/";
! animname += dir;
for (int i=0; i<numAnims; i++)
{
NEXT("anim")
pFD >> buffer;
! pMD5Mesh->LoadAnim ((char*)(animname+buffer).data());
}
+ if (numAnims > 0)
+ pMD5->iCurrentAnimation = 0;
return true;
}
|