Batch #3793 by eAthena: 0 byte-identical, 10 confirmed by peer review. - fn_07514 CTetraBallEffect::ActiveCount: logic confirmed by peer review (annotation added to existing code) - fn_07517 CTetraBallEffect::Slot03: logic confirmed by peer review (annotation added to existing code) - fn_07518 CTetraBallEffect::Slot04: logic confirmed by peer review (annotation added to existing code) - fn_07519 CTetraBallEffect::Spread: logic confirmed by peer review (annotation added to existing code) - fn_07520 CTetraBallEffect::MoveFirstTo: logic confirmed by peer review (annotation added to existing code) - fn_07521 CTriangleShotArrow::CTriangleShotArrow: logic confirmed by peer review (annotation added to existing code) - fn_07525 CTriangleShotArrow::Slot06: logic confirmed by peer review (annotation added to existing code) - fn_07527 CTriangleShotArrow::Slot04: logic confirmed by peer review (annotation added to existing code) - fn_07528 CTriangleShotArrow::Slot16: logic confirmed by peer review (annotation added to existing code) - fn_07529 CViolentQuakeEffect::CViolentQuakeEffect: logic confirmed by peer review (annotation added to existing code) Peer-reviewed-by: youko, superintelligence Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
58 lines
1.5 KiB
C++
58 lines
1.5 KiB
C++
#include "Contents/Effects/TriangleShotArrow.h"
|
|
|
|
#include "Client/Mode/CGameMode.h"
|
|
#include "Client/Mode/ModeMgr.h"
|
|
#include "Contents/Camera/Camera.h"
|
|
#include "Contents/Effects/Particle.h"
|
|
|
|
// OFFSET: 0x0072ED00
|
|
// FUNCTION: fn_07521
|
|
CTriangleShotArrow::CTriangleShotArrow() : CEffect(-1), current{}, direction{}, origin{} {
|
|
this->unknown_0050 = 0;
|
|
}
|
|
|
|
// OFFSET: 0x0072F2B0
|
|
// FUNCTION: fn_07525
|
|
bool CTriangleShotArrow::Slot06() {
|
|
return static_cast<float>(this->step) <= 8.0f / this->speed;
|
|
}
|
|
|
|
// OFFSET: 0x0072F2E0
|
|
// FUNCTION: fn_07526
|
|
void CTriangleShotArrow::Slot03() {
|
|
if (this->delay > 0) {
|
|
this->delay -= 16;
|
|
return;
|
|
}
|
|
|
|
CEZ2STRParticle* arrow = this->arrow;
|
|
if (arrow) {
|
|
const float step = static_cast<float>(this->step);
|
|
this->current.x = step * this->direction.x + this->origin.x;
|
|
this->current.y = step * this->direction.y + this->origin.y;
|
|
this->current.z = step * this->direction.z + this->origin.z;
|
|
this->position[0] = this->current.x;
|
|
this->position[1] = this->current.y;
|
|
this->position[2] = this->current.z;
|
|
arrow->position.x = this->current.x;
|
|
arrow->position.y = this->current.y;
|
|
arrow->position.z = this->current.z;
|
|
arrow->Process(0.0f, 0.0f, 0.0f);
|
|
}
|
|
|
|
++this->step;
|
|
}
|
|
|
|
// OFFSET: 0x0072F470
|
|
// FUNCTION: fn_07527
|
|
void CTriangleShotArrow::Slot04() {
|
|
if (this->arrow) {
|
|
this->arrow->DrawScreen(static_cast<CGameMode*>(g_modeMgr.GetGameMode())->camera->frame.view);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x0072F4D0
|
|
// FUNCTION: fn_07528
|
|
void CTriangleShotArrow::Slot16(int delay) {
|
|
this->delay = delay;
|
|
}
|