Skip to content

Commit

Permalink
add marble tp trap
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler-Lentz committed Jun 7, 2024
1 parent 425509d commit 2ce00a7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"server": {
"lobby_name": "Hope you're doing well!",
"lobby_broadcast": true,
"max_players": 4,
"max_players": 1,
"disable_dm": false,
"skip_intro": true
},
Expand Down
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 @@ -1194,9 +1197,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 @@ -57,7 +57,8 @@ std::unordered_map<ModelType, glm::vec3> Object::models ({
{ModelType::FloorSpikeVertical, FLOOR_SPIKE_DIMENSIONS},
{ModelType::Lightning, glm::vec3(3.0f, 100.0f, 3.0f)},
{ModelType::Orb, glm::vec3(0.887116, 0.941508, 0.950092)},
{ModelType::Chest, glm::vec3(1.377020, 1.355794, 1.092905)}
{ModelType::Chest, glm::vec3(1.377020, 1.355794, 1.092905)},
{ModelType::TeleporterTrap, glm::vec3(1.0f, 3.0f, 1.0f)}
});

/* SharedGameState generation */
Expand Down

0 comments on commit 2ce00a7

Please sign in to comment.