2013-12-18 12:18:01 +01:00
|
|
|
|
#include "GameState.h"
|
2013-12-06 10:38:43 +01:00
|
|
|
|
#include "DllInterfaces/GFXAPI.h"
|
2014-01-14 09:25:22 +01:00
|
|
|
|
#include <Protocols.h>
|
2013-12-19 10:22:32 +01:00
|
|
|
|
#include "NetworkClient.h"
|
2014-02-10 16:30:47 +01:00
|
|
|
|
//#include "Camera.h"
|
2014-01-30 14:17:50 +01:00
|
|
|
|
#include <GameServerAPI.h>
|
2013-12-10 11:26:18 +01:00
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
using namespace ::DanBias::Client;
|
2014-02-10 16:30:47 +01:00
|
|
|
|
using namespace ::Oyster::Math3D;
|
2014-02-11 13:27:33 +01:00
|
|
|
|
using namespace ::Oyster::Math;
|
2013-12-09 09:23:39 +01:00
|
|
|
|
|
|
|
|
|
struct GameState::myData
|
|
|
|
|
{
|
|
|
|
|
myData(){}
|
2014-02-10 14:00:14 +01:00
|
|
|
|
//std::vector<C_Object*> object;
|
2013-12-10 11:26:18 +01:00
|
|
|
|
int modelCount;
|
2013-12-13 12:02:49 +01:00
|
|
|
|
Oyster::Network::NetworkClient* nwClient;
|
2013-12-10 11:26:18 +01:00
|
|
|
|
gameStateState state;
|
2014-02-10 16:30:47 +01:00
|
|
|
|
} privData;
|
2013-12-09 09:23:39 +01:00
|
|
|
|
|
2013-12-06 10:38:43 +01:00
|
|
|
|
GameState::GameState(void)
|
|
|
|
|
{
|
2014-01-13 12:11:45 +01:00
|
|
|
|
key_forward = false;
|
|
|
|
|
key_backward = false;
|
|
|
|
|
key_strafeRight = false;
|
|
|
|
|
key_strafeLeft = false;
|
2013-12-06 10:38:43 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GameState::~GameState(void)
|
|
|
|
|
{
|
2014-02-11 13:27:33 +01:00
|
|
|
|
//delete this->camera;
|
2014-01-31 22:52:52 +01:00
|
|
|
|
delete this->privData;
|
2013-12-06 10:38:43 +01:00
|
|
|
|
}
|
2013-12-16 09:45:12 +01:00
|
|
|
|
bool GameState::Init(Oyster::Network::NetworkClient* nwClient)
|
2013-12-06 10:38:43 +01:00
|
|
|
|
{
|
2013-12-10 11:26:18 +01:00
|
|
|
|
// load models
|
2014-02-10 16:30:47 +01:00
|
|
|
|
//camera = new Camera;
|
2013-12-10 11:26:18 +01:00
|
|
|
|
privData = new myData();
|
|
|
|
|
privData->state = gameStateState_loading;
|
2013-12-16 09:45:12 +01:00
|
|
|
|
privData->nwClient = nwClient;
|
2013-12-10 11:26:18 +01:00
|
|
|
|
privData->state = LoadGame();
|
2014-02-10 16:30:47 +01:00
|
|
|
|
//pitch = 0;
|
2014-02-09 18:58:14 +01:00
|
|
|
|
|
2014-02-04 16:07:10 +01:00
|
|
|
|
//tELL SERver ready
|
|
|
|
|
nwClient->Send(GameLogic::Protocol_General_Status(GameLogic::Protocol_General_Status::States_ready));
|
|
|
|
|
|
2013-12-10 11:26:18 +01:00
|
|
|
|
return true;
|
|
|
|
|
}
|
2013-12-13 12:02:49 +01:00
|
|
|
|
GameState::gameStateState GameState::LoadGame()
|
2013-12-10 11:26:18 +01:00
|
|
|
|
{
|
2014-01-10 10:47:54 +01:00
|
|
|
|
Oyster::Graphics::Definitions::Pointlight plight;
|
2014-02-11 13:21:44 +01:00
|
|
|
|
plight.Pos = Float3(315.0f, 0.0f ,5.0f);
|
|
|
|
|
plight.Color = Float3(0.9f, 0.7f, 0.2f);
|
2014-02-10 23:10:31 +01:00
|
|
|
|
plight.Radius = 100.0f;
|
2014-02-10 14:00:14 +01:00
|
|
|
|
plight.Bright = 0.9f;
|
2014-01-27 13:56:31 +01:00
|
|
|
|
Oyster::Graphics::API::AddLight(plight);
|
2014-02-11 13:21:44 +01:00
|
|
|
|
plight.Pos = Float3(10.0f, 350.0f, 5.0f);
|
|
|
|
|
plight.Color = Float3(0.9f, 0.7f, 0.3f);
|
2014-02-10 23:10:31 +01:00
|
|
|
|
plight.Radius = 200.0f;
|
2014-02-10 14:00:14 +01:00
|
|
|
|
plight.Bright = 0.7f;
|
2014-02-05 11:46:04 +01:00
|
|
|
|
Oyster::Graphics::API::AddLight(plight);
|
2014-02-11 13:21:44 +01:00
|
|
|
|
plight.Pos = Float3(350.0f, 350.0f, 5.0f);
|
|
|
|
|
plight.Color = Float3(0.9f, 0.7f, 0.3f);
|
2014-02-10 23:10:31 +01:00
|
|
|
|
plight.Radius = 200.0f;
|
2014-02-10 14:00:14 +01:00
|
|
|
|
plight.Bright = 0.7f;
|
2014-02-05 11:46:04 +01:00
|
|
|
|
Oyster::Graphics::API::AddLight(plight);
|
2014-02-11 13:21:44 +01:00
|
|
|
|
plight.Pos = Float3(10.0f, 350.0f, 350.0f);
|
|
|
|
|
plight.Color = Float3(0.9f, 0.7f, 0.3f);
|
2014-02-10 23:10:31 +01:00
|
|
|
|
plight.Radius = 200.0f;
|
2014-02-10 14:00:14 +01:00
|
|
|
|
plight.Bright = 0.7f;
|
2014-01-27 13:56:31 +01:00
|
|
|
|
Oyster::Graphics::API::AddLight(plight);
|
2014-02-11 13:21:44 +01:00
|
|
|
|
plight.Pos = Float3(10.0f, -15.0f, 5.0f);
|
|
|
|
|
plight.Color = Float3(0.0f, 0.0f, 1.0f);
|
2014-02-10 23:10:31 +01:00
|
|
|
|
plight.Radius = 50.0f;
|
|
|
|
|
plight.Bright = 2.0f;
|
2014-01-27 13:56:31 +01:00
|
|
|
|
|
2014-01-10 10:47:54 +01:00
|
|
|
|
Oyster::Graphics::API::AddLight(plight);
|
2014-02-10 16:28:25 +01:00
|
|
|
|
// use level loader
|
2014-02-11 13:21:44 +01:00
|
|
|
|
InitCamera( Float3(0.0f, 0.0f, 20.0f) );
|
2014-02-10 16:28:25 +01:00
|
|
|
|
// hardcoded objects
|
|
|
|
|
LoadModels();
|
2014-02-10 14:00:14 +01:00
|
|
|
|
Float3 startPos = Float3(0,0,20.0f);
|
|
|
|
|
InitCamera(startPos);
|
2013-12-10 11:26:18 +01:00
|
|
|
|
return gameStateState_playing;
|
|
|
|
|
}
|
2014-02-10 16:28:25 +01:00
|
|
|
|
bool GameState::LoadModels()
|
2013-12-10 11:26:18 +01:00
|
|
|
|
{
|
|
|
|
|
// open file
|
|
|
|
|
// read file
|
|
|
|
|
// init models
|
2014-02-10 12:42:31 +01:00
|
|
|
|
int nrOfBoxex = 5;
|
2014-02-05 15:16:31 +01:00
|
|
|
|
int id = 100;
|
2014-02-10 16:28:25 +01:00
|
|
|
|
|
2014-01-29 13:18:17 +01:00
|
|
|
|
// add world model
|
2013-12-09 12:01:36 +01:00
|
|
|
|
ModelInitData modelData;
|
2014-02-10 16:28:25 +01:00
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
modelData.position = Float3(0,0,0);
|
|
|
|
|
modelData.rotation = Quaternion::identity;
|
|
|
|
|
modelData.scale = Float3(2,2,2);
|
2014-02-10 16:28:25 +01:00
|
|
|
|
|
2014-01-30 11:11:45 +01:00
|
|
|
|
modelData.modelPath = L"world_earth.dan";
|
2014-02-04 16:08:28 +01:00
|
|
|
|
modelData.id = id++;
|
2014-01-29 13:18:17 +01:00
|
|
|
|
|
2014-02-10 16:28:25 +01:00
|
|
|
|
this->staticObjects.Push(new C_StaticObj());
|
|
|
|
|
this->staticObjects[this->staticObjects.Size() -1 ]->Init(modelData);
|
2013-12-09 09:23:39 +01:00
|
|
|
|
|
|
|
|
|
|
2014-01-29 13:18:17 +01:00
|
|
|
|
// add box model
|
2014-02-11 13:27:33 +01:00
|
|
|
|
modelData.position = Float3(0,0,0);
|
|
|
|
|
modelData.rotation = Quaternion::identity;
|
|
|
|
|
modelData.scale = Float3(1,1,1);
|
2014-02-05 15:54:48 +01:00
|
|
|
|
modelData.modelPath = L"crate_colonists.dan";
|
2013-12-10 11:26:18 +01:00
|
|
|
|
|
2014-02-10 16:28:25 +01:00
|
|
|
|
|
2014-02-05 11:46:04 +01:00
|
|
|
|
for(int i =0; i< nrOfBoxex; i ++)
|
|
|
|
|
{
|
2014-02-11 13:27:33 +01:00
|
|
|
|
modelData.position = Float3(4,320,0);
|
2014-02-05 11:46:04 +01:00
|
|
|
|
modelData.id = id++;
|
|
|
|
|
|
2014-02-10 16:28:25 +01:00
|
|
|
|
this->dynamicObjects.Push(new C_DynamicObj());
|
|
|
|
|
this->dynamicObjects[this->dynamicObjects.Size() -1 ]->Init(modelData);
|
2014-02-05 11:46:04 +01:00
|
|
|
|
}
|
2014-01-10 10:47:54 +01:00
|
|
|
|
|
|
|
|
|
|
2014-02-10 16:28:25 +01:00
|
|
|
|
// add crystal model
|
2014-02-11 13:27:33 +01:00
|
|
|
|
modelData.position = Float3(10, 301, 0);
|
2014-02-04 16:08:28 +01:00
|
|
|
|
modelData.modelPath = L"crystalformation_b.dan";
|
|
|
|
|
modelData.id = id++;
|
2014-01-29 13:18:17 +01:00
|
|
|
|
// load models
|
2014-02-10 16:28:25 +01:00
|
|
|
|
this->dynamicObjects.Push(new C_DynamicObj());
|
|
|
|
|
this->dynamicObjects[this->dynamicObjects.Size() -1 ]->Init(modelData);
|
2014-01-16 12:26:14 +01:00
|
|
|
|
|
2014-02-04 16:08:28 +01:00
|
|
|
|
// add house model
|
2014-02-11 13:27:33 +01:00
|
|
|
|
modelData.position = Float3(-50, 290, 0);
|
|
|
|
|
//Oyster::Math3D::Float4x4 rot = Oyster::Math3D::RotationMatrix(Float3(0 ,Utility::Value::Radian(90.0f), 0));
|
2014-02-10 16:28:25 +01:00
|
|
|
|
|
2014-02-05 15:54:48 +01:00
|
|
|
|
modelData.visible = true;
|
2014-02-04 16:08:28 +01:00
|
|
|
|
modelData.modelPath = L"building_corporation.dan";
|
|
|
|
|
modelData.id = id++;
|
2014-01-31 16:33:16 +01:00
|
|
|
|
// load models
|
2014-02-10 16:28:25 +01:00
|
|
|
|
this->dynamicObjects.Push(new C_DynamicObj());
|
|
|
|
|
this->dynamicObjects[this->dynamicObjects.Size() -1 ]->Init(modelData);
|
2014-01-29 13:18:17 +01:00
|
|
|
|
|
2014-02-05 15:54:48 +01:00
|
|
|
|
|
2014-02-04 16:08:28 +01:00
|
|
|
|
// add player model
|
2014-02-11 13:27:33 +01:00
|
|
|
|
modelData.position = Float3(0, 320, 0);
|
2014-02-05 15:54:48 +01:00
|
|
|
|
modelData.modelPath = L"char_still_sizeref.dan";
|
2014-02-04 16:08:28 +01:00
|
|
|
|
modelData.id = id++;
|
2014-02-03 15:52:00 +01:00
|
|
|
|
// load models
|
2014-02-10 16:28:25 +01:00
|
|
|
|
this->dynamicObjects.Push(new C_DynamicObj());
|
|
|
|
|
this->dynamicObjects[this->dynamicObjects.Size() -1 ]->Init(modelData);
|
2014-02-03 15:52:00 +01:00
|
|
|
|
|
2014-02-04 16:08:28 +01:00
|
|
|
|
// add player model 2
|
2014-02-11 13:27:33 +01:00
|
|
|
|
modelData.position = Float3(50, 320, 0);
|
2014-02-05 15:54:48 +01:00
|
|
|
|
modelData.modelPath = L"char_still_sizeref.dan";
|
2014-02-04 16:08:28 +01:00
|
|
|
|
modelData.id = id++;
|
2014-02-03 15:52:00 +01:00
|
|
|
|
// load models
|
2014-02-10 16:28:25 +01:00
|
|
|
|
this->dynamicObjects.Push(new C_DynamicObj());
|
|
|
|
|
this->dynamicObjects[this->dynamicObjects.Size() -1 ]->Init(modelData);
|
2014-02-04 16:08:28 +01:00
|
|
|
|
|
2014-02-05 15:54:48 +01:00
|
|
|
|
// add jumppad
|
2014-02-11 13:27:33 +01:00
|
|
|
|
modelData.position = Float3(4.0f, 300.3f, 0.0f);
|
2014-02-05 15:54:48 +01:00
|
|
|
|
modelData.modelPath = L"jumppad_round.dan";
|
|
|
|
|
modelData.id = id++;
|
|
|
|
|
// load models
|
2014-02-10 16:28:25 +01:00
|
|
|
|
this->dynamicObjects.Push(new C_DynamicObj());
|
|
|
|
|
this->dynamicObjects[this->dynamicObjects.Size() -1 ]->Init(modelData);
|
2014-02-04 16:08:28 +01:00
|
|
|
|
|
2014-02-05 15:54:48 +01:00
|
|
|
|
// add sky sphere
|
2014-02-11 13:27:33 +01:00
|
|
|
|
modelData.position = Float3(0,0,0);
|
|
|
|
|
modelData.scale = Float3(800,800,800);
|
2014-02-05 15:54:48 +01:00
|
|
|
|
modelData.modelPath = L"skysphere.dan";
|
|
|
|
|
modelData.id = id++;
|
|
|
|
|
// load models
|
2014-02-10 16:28:25 +01:00
|
|
|
|
this->dynamicObjects.Push(new C_DynamicObj());
|
|
|
|
|
this->dynamicObjects[this->dynamicObjects.Size() -1 ]->Init(modelData);
|
2013-12-10 11:26:18 +01:00
|
|
|
|
return true;
|
|
|
|
|
}
|
2014-02-10 14:00:14 +01:00
|
|
|
|
bool GameState::LoadModels(std::string mapFile)
|
2013-12-10 11:26:18 +01:00
|
|
|
|
{
|
2014-02-10 14:00:14 +01:00
|
|
|
|
GameLogic::LevelLoader levelLoader;
|
|
|
|
|
std::vector<Utility::DynamicMemory::SmartPointer<GameLogic::ObjectTypeHeader>> objects;
|
|
|
|
|
objects = levelLoader.LoadLevel(mapFile);
|
|
|
|
|
|
|
|
|
|
int objCount = objects.size();
|
|
|
|
|
int modelId = 0;
|
|
|
|
|
ModelInitData modelData;
|
|
|
|
|
for (int i = 0; i < objCount; i++)
|
|
|
|
|
{
|
|
|
|
|
GameLogic::ObjectTypeHeader* obj = objects.at(i);
|
|
|
|
|
|
|
|
|
|
switch (obj->typeID)
|
|
|
|
|
{
|
|
|
|
|
case GameLogic::ObjectType::ObjectType_LevelMetaData:
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case GameLogic::ObjectType::ObjectType_Static:
|
|
|
|
|
{
|
|
|
|
|
GameLogic::ObjectHeader* staticObjData = ((GameLogic::ObjectHeader*)obj);
|
|
|
|
|
|
|
|
|
|
modelData.modelPath.assign(staticObjData->ModelFile.begin(), staticObjData->ModelFile.end());
|
|
|
|
|
modelData.visible = true;
|
|
|
|
|
//modelData.position = ;
|
2014-02-11 13:27:33 +01:00
|
|
|
|
//modelData.rotation = Quaternion(Float3(2,2,-2), 1);
|
|
|
|
|
//modelData.scale = Float3(2,2,2);
|
2014-02-10 14:00:14 +01:00
|
|
|
|
modelData.id = modelId++;
|
|
|
|
|
|
|
|
|
|
this->staticObjects.Push(new C_StaticObj());
|
|
|
|
|
this->staticObjects[this->staticObjects.Size() -1 ]->Init(modelData);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case GameLogic::ObjectType::ObjectType_Dynamic:
|
|
|
|
|
{
|
|
|
|
|
GameLogic::ObjectHeader* dynamicObjData = ((GameLogic::ObjectHeader*)obj);
|
|
|
|
|
//modelData.position = ;
|
2014-02-11 13:27:33 +01:00
|
|
|
|
//modelData.rotation = Quaternion(Float3(2,2,-2), 1);
|
|
|
|
|
//modelData.scale = Float3(2,2,2);
|
2014-02-10 14:00:14 +01:00
|
|
|
|
modelData.modelPath.assign(dynamicObjData->ModelFile.begin(), dynamicObjData->ModelFile.end());
|
|
|
|
|
modelData.visible = true;
|
|
|
|
|
modelData.id = modelId++;
|
|
|
|
|
|
|
|
|
|
this->dynamicObjects.Push(new C_DynamicObj());
|
|
|
|
|
this->dynamicObjects[this->dynamicObjects.Size() -1 ]->Init(modelData);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case GameLogic::ObjectType::ObjectType_Light:
|
|
|
|
|
{
|
|
|
|
|
GameLogic::BasicLight* lightData = ((GameLogic::BasicLight*)obj);
|
|
|
|
|
|
|
|
|
|
if(lightData->lightType == GameLogic::LightType_PointLight)
|
|
|
|
|
{
|
|
|
|
|
Oyster::Graphics::Definitions::Pointlight plight;
|
|
|
|
|
plight.Pos = ((GameLogic::PointLight*)lightData)->position;
|
|
|
|
|
plight.Color = lightData->diffuseColor;
|
|
|
|
|
plight.Radius = 100;
|
|
|
|
|
plight.Bright = 0.9f;
|
|
|
|
|
Oyster::Graphics::API::AddLight(plight);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
myId += modelId++;
|
|
|
|
|
// add player model
|
|
|
|
|
//modelData.position = ;
|
2014-02-11 13:27:33 +01:00
|
|
|
|
//modelData.rotation = Quaternion(Float3(2,2,-2), 1);
|
|
|
|
|
//modelData.scale = Float3(2,2,2);
|
2014-02-10 14:00:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modelData.visible = true;
|
|
|
|
|
modelData.modelPath = L"char_still_sizeref.dan";
|
|
|
|
|
modelData.id = myId;
|
|
|
|
|
// load models
|
|
|
|
|
this->dynamicObjects.Push(new C_DynamicObj());
|
|
|
|
|
this->dynamicObjects[this->dynamicObjects.Size() -1 ]->Init(modelData);
|
|
|
|
|
|
|
|
|
|
/*C_Player* obj = new C_Player();
|
2014-02-05 15:54:48 +01:00
|
|
|
|
privData->object.push_back(obj);
|
|
|
|
|
privData->object[privData->object.size() -1 ]->Init(modelData);
|
2014-02-10 14:00:14 +01:00
|
|
|
|
*/
|
2013-12-10 11:26:18 +01:00
|
|
|
|
return true;
|
2014-02-05 15:54:48 +01:00
|
|
|
|
|
2013-12-10 11:26:18 +01:00
|
|
|
|
}
|
2014-02-10 17:00:45 +01:00
|
|
|
|
bool GameState::InitCamera( Float3 startPos )
|
2013-12-10 11:26:18 +01:00
|
|
|
|
{
|
2014-02-10 16:30:47 +01:00
|
|
|
|
camera.SetHeadOffset( Float3(0.0f, 1.0f, -2.0f) );
|
2014-02-10 17:00:45 +01:00
|
|
|
|
//Float3 dir = Float3(0,0,1);
|
|
|
|
|
//Float3 up = Float3(0,1,0);
|
|
|
|
|
//Float3 pos = Float3(0, 0, 20);
|
2014-02-10 16:30:47 +01:00
|
|
|
|
|
2014-02-10 17:00:45 +01:00
|
|
|
|
//camera->LookAt(pos, dir, up);
|
|
|
|
|
//camera->SetLens(3.14f/2, 1024/768, 1, 1000);
|
2014-01-27 13:56:31 +01:00
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
camera.SetPerspectiveProjection( pi/2.0f, 1024.0f/768.0f, 1.0f, 1000.0f );
|
2014-02-10 16:30:47 +01:00
|
|
|
|
Oyster::Graphics::API::SetProjection( Float4x4(camera.GetProjectionMatrix()) ); // TODO: remove copy wrapper when no longer needed
|
2014-01-27 13:56:31 +01:00
|
|
|
|
|
2014-02-10 16:30:47 +01:00
|
|
|
|
//camera->LookAt(pos, dir, up);
|
|
|
|
|
//camera->SetLens(3.14f/2, 1024/768, 1, 1000);
|
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
//privData->proj = Oyster::Math3D::ProjectionMatrix_Perspective(pi/4,1024.0f/768.0f,.1f,1000);
|
2014-02-10 16:30:47 +01:00
|
|
|
|
|
|
|
|
|
//camera->UpdateViewMatrix();
|
|
|
|
|
//privData->view = camera->View();
|
2014-02-11 13:27:33 +01:00
|
|
|
|
//privData->view = Oyster::Math3D::ViewMatrix_LookAtDirection(Float3(0,0,-1),Float3(0,1,0),startPos);
|
|
|
|
|
//privData->view = Oyster::Math3D::OrientationMatrix_LookAtDirection(Float3(0,0,-1),Float3(0,1,0),startPos);
|
2014-02-10 17:00:45 +01:00
|
|
|
|
//Oyster::Graphics::API::SetProjection(camera->Proj());
|
2014-02-10 14:00:14 +01:00
|
|
|
|
|
2014-02-10 16:30:47 +01:00
|
|
|
|
//privData->view = Oyster::Math3D::InverseOrientationMatrix(privData->view);
|
2013-12-06 10:38:43 +01:00
|
|
|
|
return true;
|
|
|
|
|
}
|
2014-02-10 16:30:47 +01:00
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
void GameState::InitiatePlayer(int id, std::wstring modelName, Float4x4 world)
|
2014-01-31 16:33:16 +01:00
|
|
|
|
{
|
|
|
|
|
myId = id;
|
2014-02-05 15:16:31 +01:00
|
|
|
|
|
|
|
|
|
ModelInitData modelData;
|
|
|
|
|
C_Object* obj;
|
|
|
|
|
modelData.visible = true;
|
2014-02-10 14:41:43 +01:00
|
|
|
|
//modelData.world = world;
|
2014-02-11 13:27:33 +01:00
|
|
|
|
modelData.position = Float3(world[12], world[13], world[14]);
|
|
|
|
|
modelData.rotation = Quaternion(Float3(0,0,0), 1);
|
|
|
|
|
modelData.scale = Float3(1,1,1);
|
2014-02-05 15:16:31 +01:00
|
|
|
|
modelData.modelPath = modelName;
|
|
|
|
|
modelData.id = myId;
|
|
|
|
|
|
|
|
|
|
obj = new C_Player();
|
2014-02-10 14:41:43 +01:00
|
|
|
|
this->dynamicObjects.Push(obj);
|
|
|
|
|
this->dynamicObjects[this->dynamicObjects.Size() -1 ]->Init(modelData);
|
2014-02-09 16:42:26 +01:00
|
|
|
|
|
2014-02-10 14:41:43 +01:00
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
Float3 right = Float3(world[0], world[1], world[2]);
|
|
|
|
|
Float3 up = Float3(world[4], world[5], world[6]);
|
|
|
|
|
Float3 objForward = (Float3(world[8], world[9], world[10]));
|
|
|
|
|
Float3 pos = Float3(world[12], world[13], world[14]);
|
2014-02-09 16:42:26 +01:00
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
//Float3 cameraLook = camera->GetLook();
|
|
|
|
|
//Float3 cameraUp = camera->GetUp();
|
2014-02-09 16:42:26 +01:00
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
/*Float3 newUp = cameraUp.Dot(up);
|
2014-02-09 16:42:26 +01:00
|
|
|
|
up *= newUp;
|
|
|
|
|
up.Normalize();
|
2014-02-11 13:27:33 +01:00
|
|
|
|
Float3 newLook = up.Cross(right);
|
2014-02-09 16:42:26 +01:00
|
|
|
|
newLook.Normalize();*/
|
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
//camera->setRight(right);
|
|
|
|
|
//camera->setUp(up);
|
|
|
|
|
//camera->setLook(objForward);
|
2014-02-09 16:42:26 +01:00
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
//up *= 2;
|
|
|
|
|
//objForward *= -3;
|
|
|
|
|
//Float3 cameraPos = up + pos + objForward;
|
|
|
|
|
//camera->SetPosition(cameraPos);
|
2014-02-09 16:42:26 +01:00
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
//camera->UpdateViewMatrix();
|
2014-02-05 15:16:31 +01:00
|
|
|
|
|
2014-01-31 16:33:16 +01:00
|
|
|
|
}
|
2014-02-10 16:30:47 +01:00
|
|
|
|
|
2013-12-09 09:23:39 +01:00
|
|
|
|
GameClientState::ClientState GameState::Update(float deltaTime, InputClass* KeyInput)
|
2013-12-06 10:38:43 +01:00
|
|
|
|
{
|
2013-12-10 11:26:18 +01:00
|
|
|
|
switch (privData->state)
|
|
|
|
|
{
|
2014-02-04 16:07:10 +01:00
|
|
|
|
case gameStateState_loading: //Will this ever happen in this scope??
|
2013-12-18 15:28:47 +01:00
|
|
|
|
{
|
|
|
|
|
// load map
|
|
|
|
|
// wait for all players
|
|
|
|
|
LoadGame();
|
2013-12-20 09:42:02 +01:00
|
|
|
|
GameLogic::Protocol_General_Status gameStatus;
|
|
|
|
|
gameStatus.status = GameLogic::Protocol_General_Status::States_ready;
|
2013-12-18 15:28:47 +01:00
|
|
|
|
privData->nwClient->Send(gameStatus);
|
|
|
|
|
privData->state = gameStateState_playing;
|
|
|
|
|
}
|
2013-12-10 11:26:18 +01:00
|
|
|
|
break;
|
|
|
|
|
case gameStateState_playing:
|
|
|
|
|
// read server data
|
|
|
|
|
// update objects
|
2013-12-13 12:02:49 +01:00
|
|
|
|
{
|
2014-01-27 13:56:31 +01:00
|
|
|
|
readKeyInput(KeyInput);
|
2014-02-10 16:30:47 +01:00
|
|
|
|
camera.UpdateOrientation();
|
|
|
|
|
//camera->UpdateViewMatrix();
|
2014-01-23 08:24:35 +01:00
|
|
|
|
|
2013-12-13 12:02:49 +01:00
|
|
|
|
}
|
2013-12-10 11:26:18 +01:00
|
|
|
|
break;
|
|
|
|
|
case gameStateState_end:
|
2013-12-09 09:23:39 +01:00
|
|
|
|
return ClientState_Lobby;
|
2013-12-10 11:26:18 +01:00
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
2013-12-09 09:23:39 +01:00
|
|
|
|
// send key input to server.
|
2013-12-06 10:38:43 +01:00
|
|
|
|
return ClientState_Same;
|
|
|
|
|
}
|
|
|
|
|
bool GameState::Render()
|
|
|
|
|
{
|
2014-02-10 16:30:47 +01:00
|
|
|
|
Oyster::Graphics::API::SetView( camera.GetViewMatrix() );
|
|
|
|
|
|
|
|
|
|
//Oyster::Graphics::API::SetView(camera->View());
|
2014-01-27 13:56:31 +01:00
|
|
|
|
//Oyster::Graphics::API::SetProjection(camera->Proj());
|
|
|
|
|
//Oyster::Graphics::API::SetView(privData->view);
|
2014-02-10 16:30:47 +01:00
|
|
|
|
//Oyster::Graphics::API::SetProjection(privData->proj);
|
|
|
|
|
|
2013-12-09 09:23:39 +01:00
|
|
|
|
Oyster::Graphics::API::NewFrame();
|
2014-02-10 14:00:14 +01:00
|
|
|
|
for (unsigned int i = 0; i < staticObjects.Size(); i++)
|
2013-12-10 11:26:18 +01:00
|
|
|
|
{
|
2014-02-10 14:00:14 +01:00
|
|
|
|
staticObjects[i]->Render();
|
2013-12-10 11:26:18 +01:00
|
|
|
|
}
|
2014-02-10 14:00:14 +01:00
|
|
|
|
for (unsigned int i = 0; i < dynamicObjects.Size(); i++)
|
2013-12-10 11:26:18 +01:00
|
|
|
|
{
|
2014-02-10 14:00:14 +01:00
|
|
|
|
dynamicObjects[i]->Render();
|
2013-12-10 11:26:18 +01:00
|
|
|
|
}
|
2014-02-10 14:00:14 +01:00
|
|
|
|
|
2013-12-06 10:38:43 +01:00
|
|
|
|
Oyster::Graphics::API::EndFrame();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
bool GameState::Release()
|
|
|
|
|
{
|
2014-02-10 14:00:14 +01:00
|
|
|
|
/*for (unsigned int i = 0; i < privData->object.size(); i++)
|
2013-12-10 11:26:18 +01:00
|
|
|
|
{
|
2014-02-10 14:00:14 +01:00
|
|
|
|
privData->object[i]->Release();
|
|
|
|
|
delete privData->object[i];
|
|
|
|
|
privData->object[i] = NULL;
|
|
|
|
|
}*/
|
2013-12-10 11:26:18 +01:00
|
|
|
|
|
2013-12-09 11:05:47 +01:00
|
|
|
|
delete privData;
|
|
|
|
|
privData = NULL;
|
2013-12-06 10:38:43 +01:00
|
|
|
|
return true;
|
2013-12-13 12:02:49 +01:00
|
|
|
|
}
|
2014-01-27 13:56:31 +01:00
|
|
|
|
void GameState::readKeyInput(InputClass* KeyInput)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
bool send = false;
|
|
|
|
|
GameLogic::Protocol_PlayerMovement movePlayer;
|
|
|
|
|
movePlayer.bForward = false;
|
|
|
|
|
movePlayer.bBackward = false;
|
|
|
|
|
movePlayer.bLeft = false;
|
|
|
|
|
movePlayer.bRight = false;
|
|
|
|
|
|
|
|
|
|
if(KeyInput->IsKeyPressed(DIK_W))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if(!key_forward)
|
|
|
|
|
{
|
|
|
|
|
movePlayer.bForward = true;
|
|
|
|
|
send = true;
|
|
|
|
|
key_forward = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
key_forward = false;
|
|
|
|
|
|
|
|
|
|
if(KeyInput->IsKeyPressed(DIK_S))
|
|
|
|
|
{
|
|
|
|
|
if(!key_backward)
|
|
|
|
|
{
|
|
|
|
|
movePlayer.bBackward = true;
|
|
|
|
|
send = true;
|
|
|
|
|
key_backward = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
key_backward = false;
|
|
|
|
|
|
|
|
|
|
if(KeyInput->IsKeyPressed(DIK_A))
|
|
|
|
|
{
|
|
|
|
|
if(!key_strafeLeft)
|
|
|
|
|
{
|
|
|
|
|
movePlayer.bLeft = true;
|
|
|
|
|
send = true;
|
|
|
|
|
key_strafeLeft = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
key_strafeLeft = false;
|
|
|
|
|
|
|
|
|
|
if(KeyInput->IsKeyPressed(DIK_D))
|
|
|
|
|
{
|
|
|
|
|
if(!key_strafeRight)
|
|
|
|
|
{
|
|
|
|
|
movePlayer.bRight = true;
|
|
|
|
|
send = true;
|
|
|
|
|
key_strafeRight = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
key_strafeRight = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (privData->nwClient->IsConnected() && send)
|
|
|
|
|
{
|
|
|
|
|
privData->nwClient->Send(movePlayer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//send delta mouse movement
|
2014-02-07 13:09:44 +01:00
|
|
|
|
//if (KeyInput->IsMousePressed())
|
2014-01-27 13:56:31 +01:00
|
|
|
|
{
|
2014-02-10 16:30:47 +01:00
|
|
|
|
camera.YawRight( KeyInput->GetYaw() );
|
|
|
|
|
camera.PitchUp( KeyInput->GetPitch() );
|
|
|
|
|
camera.UpdateOrientation();
|
|
|
|
|
|
|
|
|
|
//camera->Yaw(-KeyInput->GetYaw());
|
|
|
|
|
//->Pitch(KeyInput->GetPitch());
|
|
|
|
|
//pitch = KeyInput->GetPitch();
|
|
|
|
|
//camera->UpdateViewMatrix();
|
2014-01-27 13:56:31 +01:00
|
|
|
|
GameLogic::Protocol_PlayerLook playerLookDir;
|
2014-02-10 16:30:47 +01:00
|
|
|
|
Float4 look = Float4( camera.GetLook(), 0.0f );
|
|
|
|
|
//Float4 look = camera->GetLook();
|
2014-01-27 13:56:31 +01:00
|
|
|
|
playerLookDir.lookDirX = look.x;
|
|
|
|
|
playerLookDir.lookDirY = look.y;
|
|
|
|
|
playerLookDir.lookDirZ = look.z;
|
2014-02-03 15:52:00 +01:00
|
|
|
|
playerLookDir.deltaX = -KeyInput->GetYaw();
|
|
|
|
|
|
2014-02-10 16:30:47 +01:00
|
|
|
|
privData->nwClient->Send( playerLookDir );
|
2014-01-27 13:56:31 +01:00
|
|
|
|
}
|
2014-01-30 09:07:56 +01:00
|
|
|
|
|
|
|
|
|
// shoot
|
2014-01-27 13:56:31 +01:00
|
|
|
|
if(KeyInput->IsKeyPressed(DIK_Z))
|
|
|
|
|
{
|
|
|
|
|
if(!key_Shoot)
|
|
|
|
|
{
|
|
|
|
|
GameLogic::Protocol_PlayerShot playerShot;
|
2014-02-05 11:46:04 +01:00
|
|
|
|
playerShot.primaryPressed = true;
|
|
|
|
|
playerShot.secondaryPressed = false;
|
|
|
|
|
playerShot.utilityPressed = false;
|
|
|
|
|
privData->nwClient->Send(playerShot);
|
|
|
|
|
key_Shoot = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
key_Shoot = false;
|
|
|
|
|
if(KeyInput->IsKeyPressed(DIK_X))
|
|
|
|
|
{
|
|
|
|
|
if(!key_Shoot)
|
|
|
|
|
{
|
|
|
|
|
GameLogic::Protocol_PlayerShot playerShot;
|
|
|
|
|
playerShot.primaryPressed = false;
|
|
|
|
|
playerShot.secondaryPressed = true;
|
|
|
|
|
playerShot.utilityPressed = false;
|
|
|
|
|
privData->nwClient->Send(playerShot);
|
|
|
|
|
key_Shoot = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
key_Shoot = false;
|
|
|
|
|
if(KeyInput->IsKeyPressed(DIK_C))
|
|
|
|
|
{
|
|
|
|
|
if(!key_Shoot)
|
|
|
|
|
{
|
|
|
|
|
GameLogic::Protocol_PlayerShot playerShot;
|
|
|
|
|
playerShot.primaryPressed = false;
|
|
|
|
|
playerShot.secondaryPressed = false;
|
|
|
|
|
playerShot.utilityPressed = true;
|
2014-01-27 13:56:31 +01:00
|
|
|
|
privData->nwClient->Send(playerShot);
|
|
|
|
|
key_Shoot = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
key_Shoot = false;
|
|
|
|
|
|
2014-01-30 09:07:56 +01:00
|
|
|
|
// jump
|
2014-02-05 11:46:04 +01:00
|
|
|
|
if(KeyInput->IsKeyPressed(DIK_SPACE))
|
2014-01-30 09:07:56 +01:00
|
|
|
|
{
|
|
|
|
|
if(!key_Jump)
|
|
|
|
|
{
|
|
|
|
|
GameLogic::Protocol_PlayerJump playerJump;
|
|
|
|
|
playerJump.hasJumped = true;
|
|
|
|
|
privData->nwClient->Send(playerJump);
|
|
|
|
|
key_Jump = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
key_Jump = false;
|
|
|
|
|
|
2014-01-27 13:56:31 +01:00
|
|
|
|
// send event data
|
|
|
|
|
//
|
|
|
|
|
if(KeyInput->IsKeyPressed(DIK_L))
|
|
|
|
|
privData->state = GameState::gameStateState_end;
|
|
|
|
|
}
|
2013-12-13 12:02:49 +01:00
|
|
|
|
|
|
|
|
|
void GameState::Protocol(ProtocolStruct* pos)
|
|
|
|
|
{
|
2013-12-18 15:28:47 +01:00
|
|
|
|
|
2013-12-13 12:02:49 +01:00
|
|
|
|
}
|
2013-12-16 11:08:10 +01:00
|
|
|
|
|
2013-12-17 13:39:10 +01:00
|
|
|
|
void GameState::Protocol( PlayerPos* pos )
|
2013-12-16 11:08:10 +01:00
|
|
|
|
{
|
2014-02-11 14:13:24 +01:00
|
|
|
|
camera.SetPosition( pos->position );
|
|
|
|
|
camera.SetAngular( pos->angularAxis );
|
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
//Float4x4 world, translate;
|
2014-02-10 14:00:14 +01:00
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
//world = Float4x4::identity;
|
|
|
|
|
//translate = Float4x4::identity;
|
|
|
|
|
//translate = Oyster::Math3D::TranslationMatrix(Float3(pos->playerPos[0],pos->playerPos[1],pos->playerPos[2]));
|
2014-02-10 14:00:14 +01:00
|
|
|
|
//world = world * translate;
|
|
|
|
|
////privData->object[0]->setPos( world );
|
|
|
|
|
//for (unsigned int i = 0; i < dynamicObjects.Size(); i++)
|
|
|
|
|
//{
|
|
|
|
|
// dynamicObjects[i]->Render();
|
|
|
|
|
//}
|
2013-12-16 11:08:10 +01:00
|
|
|
|
}
|
|
|
|
|
|
2013-12-17 13:39:10 +01:00
|
|
|
|
void GameState::Protocol( ObjPos* pos )
|
2013-12-16 11:08:10 +01:00
|
|
|
|
{
|
2014-02-11 14:13:24 +01:00
|
|
|
|
//Float4x4 world;
|
|
|
|
|
//for(int i = 0; i<16; i++)
|
|
|
|
|
//{
|
|
|
|
|
// world[i] = pos->worldPos[i];
|
|
|
|
|
//}
|
|
|
|
|
|
2014-02-04 10:29:02 +01:00
|
|
|
|
//printf("pos for obj %d, ",pos->object_ID );
|
2014-02-11 14:13:24 +01:00
|
|
|
|
|
2014-02-10 14:00:14 +01:00
|
|
|
|
for (unsigned int i = 0; i < dynamicObjects.Size(); i++)
|
2013-12-19 11:58:42 +01:00
|
|
|
|
{
|
2014-02-10 14:00:14 +01:00
|
|
|
|
if(dynamicObjects[i]->GetId() == pos->object_ID)
|
2014-01-16 12:26:14 +01:00
|
|
|
|
{
|
2014-02-11 14:13:24 +01:00
|
|
|
|
dynamicObjects[i]->setPos( pos->position );
|
|
|
|
|
dynamicObjects[i]->setRot( Quaternion(Float3(pos->rotation), pos->rotation[3]) );
|
2014-02-11 09:17:16 +01:00
|
|
|
|
|
2014-02-11 14:13:24 +01:00
|
|
|
|
//dynamicObjects[i]->setPos(Float3(world[12], world[13], world[14]));
|
2014-02-04 16:08:28 +01:00
|
|
|
|
|
2014-02-10 14:00:14 +01:00
|
|
|
|
if(dynamicObjects[i]->GetId() == myId) // playerobj
|
2014-01-28 15:04:25 +01:00
|
|
|
|
{
|
2014-02-11 14:13:24 +01:00
|
|
|
|
camera.SetPosition( pos->position );
|
|
|
|
|
camera.SetAngular( pos->angularAxis );
|
|
|
|
|
|
|
|
|
|
//Float3 right = Float3(world[0], world[1], world[2]);
|
|
|
|
|
//Float3 up = Float3(world[4], world[5], world[6]);
|
|
|
|
|
//Float3 objForward = Float3(world[8], world[9], world[10]);
|
|
|
|
|
//Float3 pos = Float3(world[12], world[13], world[14]);
|
2014-02-04 16:08:28 +01:00
|
|
|
|
|
2014-02-10 17:00:45 +01:00
|
|
|
|
//Float3 cameraLook = camera->GetLook();
|
|
|
|
|
//Float3 cameraUp = camera->GetUp();
|
2014-02-04 16:08:28 +01:00
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
/*Float3 newUp = cameraUp.Dot(up);
|
2014-02-04 16:08:28 +01:00
|
|
|
|
up *= newUp;
|
|
|
|
|
up.Normalize();
|
2014-02-11 13:27:33 +01:00
|
|
|
|
Float3 newLook = up.Cross(right);
|
2014-02-04 16:08:28 +01:00
|
|
|
|
newLook.Normalize();*/
|
|
|
|
|
|
2014-02-10 16:30:47 +01:00
|
|
|
|
|
2014-02-10 15:54:38 +01:00
|
|
|
|
//camera->setRight(right);
|
|
|
|
|
//camera->setUp(up);
|
2014-02-07 15:38:53 +01:00
|
|
|
|
//camera->setLook(objForward);
|
2014-02-04 11:50:15 +01:00
|
|
|
|
|
2014-02-11 14:13:24 +01:00
|
|
|
|
//up *= 1;
|
|
|
|
|
//objForward *= -2;
|
|
|
|
|
//Float3 cameraPos = pos + up + objForward;
|
2014-02-10 15:54:38 +01:00
|
|
|
|
//camera->SetPosition(cameraPos);
|
|
|
|
|
//camera->UpdateViewMatrix();
|
2014-02-10 12:42:31 +01:00
|
|
|
|
|
2014-01-28 15:04:25 +01:00
|
|
|
|
}
|
2014-01-16 12:26:14 +01:00
|
|
|
|
}
|
2013-12-19 11:58:42 +01:00
|
|
|
|
}
|
2013-12-16 11:08:10 +01:00
|
|
|
|
}
|
|
|
|
|
|
2014-01-14 09:24:55 +01:00
|
|
|
|
void GameState::Protocol( NewObj* newObj )
|
2013-12-18 12:18:01 +01:00
|
|
|
|
{
|
|
|
|
|
|
2014-02-11 13:27:33 +01:00
|
|
|
|
Float4x4 world;
|
2013-12-18 12:18:01 +01:00
|
|
|
|
for(int i = 0; i<16; i++)
|
|
|
|
|
{
|
2014-01-14 09:24:55 +01:00
|
|
|
|
world[i] = newObj->worldPos[i];
|
2013-12-18 12:18:01 +01:00
|
|
|
|
}
|
|
|
|
|
ModelInitData modelData;
|
|
|
|
|
|
2014-02-10 14:00:14 +01:00
|
|
|
|
//modelData.world = world;
|
2013-12-18 12:18:01 +01:00
|
|
|
|
modelData.visible = true;
|
2014-01-14 09:24:55 +01:00
|
|
|
|
modelData.id = newObj->object_ID;
|
2013-12-18 15:28:47 +01:00
|
|
|
|
//not sure if this is good parsing rom char* to wstring
|
2014-01-14 09:24:55 +01:00
|
|
|
|
const char* path = newObj->path;
|
2013-12-18 12:18:01 +01:00
|
|
|
|
modelData.modelPath = std::wstring(path, path + strlen(path));
|
|
|
|
|
// load models
|
2014-02-10 14:00:14 +01:00
|
|
|
|
C_DynamicObj* player = new C_DynamicObj();
|
2013-12-19 11:58:42 +01:00
|
|
|
|
player->Init(modelData);
|
2013-12-18 12:18:01 +01:00
|
|
|
|
|
2014-02-10 14:00:14 +01:00
|
|
|
|
dynamicObjects.Push(player);
|
2013-12-17 13:39:10 +01:00
|
|
|
|
|
2013-12-18 15:28:47 +01:00
|
|
|
|
}
|
|
|
|
|
|
2013-12-19 11:58:42 +01:00
|
|
|
|
void DanBias::Client::GameState::Protocol( RemoveObj* obj )
|
2013-12-13 12:02:49 +01:00
|
|
|
|
{
|
2014-02-10 14:00:14 +01:00
|
|
|
|
for (unsigned int i = 0; i < dynamicObjects.Size(); i++)
|
2013-12-16 11:08:10 +01:00
|
|
|
|
{
|
2014-02-10 14:00:14 +01:00
|
|
|
|
if(dynamicObjects[i]->GetId() == obj->object_ID)
|
2013-12-19 11:58:42 +01:00
|
|
|
|
{
|
2014-02-10 14:00:14 +01:00
|
|
|
|
//dynamicObjects[i]->Release();
|
|
|
|
|
dynamicObjects[i].Release();
|
|
|
|
|
//dynamicObjects.erase(privData->object.begin() + i );
|
2013-12-19 11:58:42 +01:00
|
|
|
|
}
|
2013-12-16 11:08:10 +01:00
|
|
|
|
}
|
2013-12-19 11:58:42 +01:00
|
|
|
|
//privData->object[obj->object_ID]->Release( );
|
2013-12-13 12:02:49 +01:00
|
|
|
|
}
|
2013-12-19 11:58:42 +01:00
|
|
|
|
|
2013-12-13 12:02:49 +01:00
|
|
|
|
//void GameState::Protocol(LightPos pos);
|