few fix and paper Link

This commit is contained in:
Baoulettes 2022-08-27 17:45:09 +02:00
parent af5313d89e
commit 65e76dcfee
4 changed files with 24 additions and 3 deletions

View File

@ -1688,7 +1688,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
"_DEBUG;" "_DEBUG;"
"_CRT_SECURE_NO_WARNINGS;" "_CRT_SECURE_NO_WARNINGS;"
"ENABLE_DX11;" "ENABLE_DX11;"
"ENABLE_CROWD_CONTROL" #"ENABLE_CROWD_CONTROL"
">" ">"
"$<$<CONFIG:Release>:" "$<$<CONFIG:Release>:"
"NDEBUG" "NDEBUG"

View File

@ -33,7 +33,8 @@ extern GlobalContext* gGlobalCtx;
uint32_t giantLink; uint32_t giantLink;
uint32_t minishLink; uint32_t minishLink;
uint32_t gravityLevel; uint32_t paperLink;
uint32_t gravityLevel = 1;
uint32_t resetLinkScale; uint32_t resetLinkScale;
uint32_t invisibleLink; uint32_t invisibleLink;
uint32_t oneHitKO; uint32_t oneHitKO;
@ -656,11 +657,18 @@ static bool PaperLinkHandler(std::shared_ptr<Ship::Console> Console, const std::
return CMD_FAILED; return CMD_FAILED;
} }
// TODO: Implement try {
paperLink = Ship::Math::clamp(std::stoi(args[1], nullptr, 10), 0.0f, 2.0f);
return CMD_SUCCESS;
} catch (std::invalid_argument const& ex) {
SohImGui::console->SendErrorMessage("[SOH] Paper Link value must be a number.");
return CMD_FAILED;
}
} }
static bool RainstormHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) { static bool RainstormHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) {
// TODO: Implement // TODO: Implement
return CMD_FAILED;
} }
static bool ReverseControlsHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) { static bool ReverseControlsHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) {

View File

@ -7,6 +7,7 @@ extern "C" {
#endif #endif
extern uint32_t giantLink; extern uint32_t giantLink;
extern uint32_t minishLink; extern uint32_t minishLink;
extern uint32_t paperLink;
extern uint32_t gravityLevel; extern uint32_t gravityLevel;
extern uint32_t resetLinkScale; extern uint32_t resetLinkScale;
extern uint32_t invisibleLink; extern uint32_t invisibleLink;

View File

@ -11118,6 +11118,18 @@ void Player_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actor.scale.z = 0.001f; this->actor.scale.z = 0.001f;
} }
if (paperLink == 1) {
this->actor.scale.x = 0.001f;
this->actor.scale.y = 0.01f;
this->actor.scale.z = 0.01f;
}
if (paperLink == 2) {
this->actor.scale.x = 0.01f;
this->actor.scale.y = 0.01f;
this->actor.scale.z = 0.001f;
}
if (resetLinkScale == 1) { if (resetLinkScale == 1) {
this->actor.scale.x = 0.01f; this->actor.scale.x = 0.01f;
this->actor.scale.y = 0.01f; this->actor.scale.y = 0.01f;