Skip to content

Commit

Permalink
merge dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler-Lentz committed Jun 7, 2024
2 parents 26c7e50 + 2ce00a7 commit 2131fb4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions include/client/client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ class Client {
std::unique_ptr<Model> lava_horizontal_model;
std::unique_ptr<Model> lightning_model;
std::unique_ptr<Model> chest_model;
std::unique_ptr<Model> teleport_model;

GLFWwindow *window;

Expand Down
9 changes: 6 additions & 3 deletions src/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ bool Client::init() {
auto orb_model_path = item_models_dir / "orb_final/Orb 1.obj";
this->orb_model = std::make_unique<Model>(orb_model_path.string(), false);

auto teleport_model_path = env_models_dir / "teleport" / "teleport.obj";
this->teleport_model = std::make_unique<Model>(teleport_model_path.string(), true);

auto exit_model_path = env_models_dir / "exit.obj";
this->exit_model = std::make_unique<Model>(exit_model_path.string(), true);

Expand Down Expand Up @@ -1202,9 +1205,9 @@ void Client::geometryPass() {
if (!is_dm && sharedObject->trapInfo->dm_hover) {
break;
}
this->orb_model->setDimensions( sharedObject->physics.dimensions);
this->orb_model->translateAbsolute(sharedObject->physics.getCenterPosition());
this->orb_model->draw(this->deferred_geometry_shader.get(),
this->teleport_model->setDimensions(sharedObject->physics.dimensions);
this->teleport_model->translateAbsolute(sharedObject->physics.getCenterPosition());
this->teleport_model->draw(this->deferred_geometry_shader.get(),
this->cam->getPos(),
true);
break;
Expand Down
3 changes: 2 additions & 1 deletion src/server/game/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ std::unordered_map<ModelType, glm::vec3> Object::models ({
{ModelType::Orb, glm::vec3(0.887116, 0.941508, 0.950092)},
{ModelType::Chest, glm::vec3(1.377020, 1.355794, 1.092905)},
{ModelType::Fireball, glm::vec3(0.4f, 0.4f, 0.4f)},
{ModelType::SpellOrb, glm::vec3(0.4f, 0.4f, 0.4f)}
{ModelType::SpellOrb, glm::vec3(0.4f, 0.4f, 0.4f)},
{ModelType::TeleporterTrap, glm::vec3(1.0f, 3.0f, 1.0f)}
});

/* SharedGameState generation */
Expand Down

0 comments on commit 2131fb4

Please sign in to comment.