d_t_heat_resist OK (#173)

* d_t_heat_resist OK
This commit is contained in:
Orstedra
2025-05-24 04:22:49 +02:00
committed by GitHub
parent 745d156153
commit b8b2375891
4 changed files with 50 additions and 7 deletions
+34
View File
@@ -1,3 +1,37 @@
#include "d/t/d_t_heat_resist.h"
#include "d/a/d_a_player.h"
#include "f/f_base.h"
#include "toBeSorted/area_math.h"
SPECIAL_ACTOR_PROFILE(TAG_HEAT_RESIST, dTgHeatResist_c, fProfile::TAG_HEAT_RESIST, 0x223, 0, 4);
int dTgHeatResist_c::create() {
mInverted = static_cast<u8>(params & 0x3);
matrixCreateFromPosRotYScale(matrix, position, rotation.y, mScale, nullptr, 0.0f);
return SUCCEEDED;
}
int dTgHeatResist_c::doDelete() {
return SUCCEEDED;
}
int dTgHeatResist_c::actorExecute() {
dAcPy_c *player = dAcPy_c::LINK;
if (mInverted == 1) {
if (!checkIfVec3fInMatrix(matrix, player->position)) {
player->onForceOrPreventActionFlags(0x8000000);
}
} else {
if (checkIfVec3fInMatrix(matrix, player->position)) {
player->onForceOrPreventActionFlags(0x8000000);
}
}
return SUCCEEDED;
}
int dTgHeatResist_c::draw() {
return SUCCEEDED;
}