|
From: julien r. <jul...@us...> - 2004-11-06 18:21:31
|
Update of /cvsroot/epfl/tggame In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24849 Modified Files: game.cc pawn.cc pawn.h Log Message: backup Index: pawn.h =================================================================== RCS file: /cvsroot/epfl/tggame/pawn.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pawn.h 28 Oct 2004 21:20:33 -0000 1.8 --- pawn.h 6 Nov 2004 17:05:51 -0000 1.9 *************** *** 22,26 **** /** * Constructeur - * @param Camera* un pointeur sur l'éventuelle caméra attachée à ce pawn */ Pawn (); --- 22,25 ---- Index: game.cc =================================================================== RCS file: /cvsroot/epfl/tggame/game.cc,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** game.cc 2 Nov 2004 15:41:43 -0000 1.25 --- game.cc 6 Nov 2004 17:05:51 -0000 1.26 *************** *** 104,110 **** //préchargement des meshes ! pEngine->pMeshManager->Load("pinky", "data/models/guardian/guardian.md5mesh"); ! pEngine->pMeshManager->LoadAnim("pinky", "data/models/guardian/death.md5anim"); Pawn* p = new Pawn(); pSceneManager->SetCamera(cam); --- 104,127 ---- //préchargement des meshes ! pEngine->pMeshManager->Load("guardian", "data/models/guardian/guardian.md5mesh"); ! pEngine->pMeshManager->LoadAnim("guardian", "data/models/guardian/death.md5anim"); ! pEngine->pMeshManager->Load("machinegun", "data/models/machinegun/viewmachinegun.md5mesh"); ! pEngine->pMeshManager->LoadAnim("machinegun", "data/models/machinegun/idle.md5anim"); ! ! pEngine->pMeshManager->LoadAnim("machinegun", "data/models/machinegun/fire4.md5anim"); ! pEngine->pMeshManager->Load("pinky", "data/models/zct/zct.md5mesh"); ! pEngine->pMeshManager->LoadAnim("pinky", "data/models/zct/zctidle.md5anim"); ! + MD5Instance* pModel = Engine::pMeshManager->LoadInstance("machinegun"); + pModel->SetAnimation("idle"); + pModel->bCamera = true; + Quaternion q(-90, Vector3(1,0,0)); + q *= Quaternion(90, Vector3(0,1,0)); + pModel->SetRotation(q); + + pModel->SetPosition(Vector3(5,0,-5)); + pSceneManager->AddWorldObject(pModel); + Pawn* p = new Pawn(); pSceneManager->SetCamera(cam); *************** *** 113,121 **** pLocalController = new PlayerController(p); vControllers.push_back(pLocalController); ! p->SetPosition(pWorld->GetRandomStartPosition()+Vector3(20,80,20)); p->Attach (cam); ! p->SetPosition (Vector3(100,80,100)); ! p->GetBBox()->vMin = Vector3(-10, -70, -10); ! p->GetBBox()->vMax = Vector3(10,10,10); p->SetMoveSpeed (CAM_SPEED); p->SetVisible(false); --- 130,136 ---- pLocalController = new PlayerController(p); vControllers.push_back(pLocalController); ! //p->SetPosition(pWorld->GetRandomStartPosition()+Vector3(20,80,20)); p->Attach (cam); ! p->SetPosition (Vector3(100,100,100)); p->SetMoveSpeed (CAM_SPEED); p->SetVisible(false); *************** *** 130,135 **** p->SetMoveSpeed(CAM_SPEED); p->SetVelocity(Vector3(0,0,0)); ! p->SetRotation(Quaternion(-90, Vector3(1,0,0))); ! p->SetPosition(Vector3(-550,100,250)); //p->SetRotationVelocity(Quaternion(10,Vector3(0,1,1))); --- 145,150 ---- p->SetMoveSpeed(CAM_SPEED); p->SetVelocity(Vector3(0,0,0)); ! //p->SetRotation(Quaternion(-90, Vector3(1,0,0))); ! //p->SetPosition(Vector3(-550,0,250)); //p->SetRotationVelocity(Quaternion(10,Vector3(0,1,1))); Index: pawn.cc =================================================================== RCS file: /cvsroot/epfl/tggame/pawn.cc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pawn.cc 2 Nov 2004 15:41:43 -0000 1.8 --- pawn.cc 6 Nov 2004 17:05:51 -0000 1.9 *************** *** 5,12 **** Pawn::Pawn() : Actor () { - //pModel = new Model ("data/models/pinky/pinky.mdl", MDL_PLAYER); - //pCamera = c; pModel = Engine::pMeshManager->LoadInstance("pinky"); ! pModel->SetAnimation("death"); pPhysic = new PhysicNode(pModel); pPhysic->SetClip(false); --- 5,10 ---- Pawn::Pawn() : Actor () { pModel = Engine::pMeshManager->LoadInstance("pinky"); ! pModel->SetAnimation("zctidle"); pPhysic = new PhysicNode(pModel); pPhysic->SetClip(false); |