Skip to content

Commit

Permalink
Merge pull request #210 from ucsd-cse125-sp24/feat/orb-model
Browse files Browse the repository at this point in the history
Feat/orb model
  • Loading branch information
Tyler-Lentz authored Jun 6, 2024
2 parents 41027e8 + 5ad5947 commit 3c10ee7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 215 deletions.
6 changes: 3 additions & 3 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"game": {
"maze": {
"directory": "maps",
"procedural": true,
"maze_file": "test/itemRoom.maze"
"procedural": false,
"maze_file": "test/orb_drop.maze"
},
"disable_enemies": true
},
Expand All @@ -16,7 +16,7 @@
"lobby_name": "Hope you're doing well!",
"lobby_broadcast": true,
"max_players": 1,
"disable_dm": false,
"disable_dm": true,
"skip_intro": true
},
"client": {
Expand Down
214 changes: 5 additions & 209 deletions maps/test/orb_drop.maze
Original file line number Diff line number Diff line change
@@ -1,209 +1,5 @@
######
#|#[##
#@*.|#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
#....#
######
###############
#|####........#
#@*.|#........#
#....}........#
###############
5 changes: 3 additions & 2 deletions src/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ bool Client::init() {
auto arrow_trap_model_path = env_models_dir / "Arrow trap" / "levelout_21.obj";
this->arrow_trap_model = std::make_unique<Model>(arrow_trap_model_path.string(), false);

auto orb_model_path = item_models_dir / "orb.obj";
this->orb_model = std::make_unique<Model>(orb_model_path.string(), true);
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 exit_model_path = env_models_dir / "exit.obj";
this->exit_model = std::make_unique<Model>(exit_model_path.string(), true);
Expand Down Expand Up @@ -1307,6 +1307,7 @@ void Client::lightingPass() {
if (!curr_source.has_value()) {
continue;
}

SharedPointLightInfo& properties = curr_source->pointLightInfo.value();

glm::vec3 pos = curr_source->physics.getCenterPosition();
Expand Down
1 change: 1 addition & 0 deletions src/server/game/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ std::unordered_map<ModelType, glm::vec3> Object::models ({
{ModelType::FloorSpikeHorizontal, FLOOR_SPIKE_DIMENSIONS},
{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)}
});

/* SharedGameState generation */
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/orb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "shared/audio/constants.hpp"
#include <chrono>

Orb::Orb(glm::vec3 corner, glm::vec3 dimensions, const PointLightProperties& properties) : Item(ObjectType::Orb, true, corner, ModelType::Cube, dimensions),
Orb::Orb(glm::vec3 corner, glm::vec3 dimensions, const PointLightProperties& properties) : Item(ObjectType::Orb, true, corner, ModelType::Orb, dimensions),
properties(properties) {
this->modelType = ModelType::Orb;
}
Expand Down

0 comments on commit 3c10ee7

Please sign in to comment.