Skip to content

Commit

Permalink
Revert "implements walkpastnpcs config"
Browse files Browse the repository at this point in the history
This reverts commit 53bcc21.
  • Loading branch information
Saturnyoshi committed Jul 24, 2024
1 parent 53bcc21 commit 04b8cc0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
13 changes: 0 additions & 13 deletions LunaDll/Misc/RuntimeHookComponents/RuntimeHookHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3890,19 +3890,6 @@ static unsigned int __stdcall runtimeHookNPCCollisionGroupInternal(int npcAIdx,
return 0; // Collision cancelled
}

// check walkThroughNPCs
NPCMOB* npcB = NPC::GetRaw(npcBIdx);
if (NPC::GetWalkPastNPCs(npc->id)) {
if (!npc_npcblock[npcB->id] && !npc_npcblocktop[npcB->id]) {
return 0; // Cancelled
}
}
if (NPC::GetWalkPastNPCs(npcB->id)) {
if (!npc_npcblock[npc->id] && !npc_npcblocktop[npc->id]) {
return 0; // Cancelled
}
}

return -1; // Collision goes ahead
}

Expand Down
12 changes: 0 additions & 12 deletions LunaDll/SMBXInternal/NPCs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ static int16_t npcprop_noshieldfireeffect[NPC::MAX_ID + 1] = { 0 };
static int16_t npcprop_notcointransformable[NPC::MAX_ID + 1] = { 0 };
static int16_t npcprop_staticdirection[NPC::MAX_ID + 1] = { 0 };
static int16_t npcprop_luahandlesspeed[NPC::MAX_ID + 1] = { 0 };
static int16_t npcprop_walkpastnpcs[NPC::MAX_ID + 1] = { 0 };
static double npcprop_terminalvelocity[NPC::MAX_ID + 1] = { 0 };

// Other NPC-related config data, not by ID
Expand All @@ -295,7 +294,6 @@ void NPC::InitProperties() {
npcprop_staticdirection[i] = 0;
npcprop_luahandlesspeed[i] = 0;
npcprop_terminalvelocity[i] = 0;
npcprop_walkpastnpcs[i] = 0;
}

// Set built-in spinjump safe IDs
Expand Down Expand Up @@ -566,12 +564,6 @@ bool NPC::GetLuaHandlesSpeed(int id) {
return (npcprop_luahandlesspeed[id] != 0);
}

bool NPC::GetWalkPastNPCs(int id) {
if ((id < 1) || (id > NPC::MAX_ID)) return false;
return (npcprop_walkpastnpcs[id] != 0);
}


double NPC::GetTerminalVelocity(int id) {
if ((id < 1) || (id > NPC::MAX_ID) || (npcprop_terminalvelocity[id] == 0))
{
Expand Down Expand Up @@ -634,10 +626,6 @@ uintptr_t NPC::GetPropertyTableAddress(const std::string& s)
{
return reinterpret_cast<uintptr_t>(npcprop_terminalvelocity);
}
else if (s == "walkpastnpcs")
{
return reinterpret_cast<uintptr_t>(npcprop_walkpastnpcs);
}
else
{
return 0;
Expand Down
1 change: 0 additions & 1 deletion LunaDll/SMBXInternal/NPCs.h
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,6 @@ namespace NPC {
bool GetNotCoinTransformable(int id);
bool GetStaticDirection(int id);
bool GetLuaHandlesSpeed(int id);
bool GetWalkPastNPCs(int id);
double GetTerminalVelocity(int id);

uintptr_t GetPropertyTableAddress(const std::string& s);
Expand Down

0 comments on commit 04b8cc0

Please sign in to comment.