Decompile fn_20116 (CRagEffect::TurnUndead)
Batch #15336 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_20116 CRagEffect::TurnUndead: logic confirmed by peer review Peer-reviewed-by: eAthena, gordaoprogramas Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
ecd633b0da
commit
54ca697cef
1 changed files with 7 additions and 7 deletions
|
|
@ -9603,20 +9603,20 @@ void CRagEffect::TurnUndead() {
|
|||
this->state.lastPrim->state.speed3d.x = this->state.parent->render.position.x;
|
||||
this->state.lastPrim->state.speed3d.y = this->state.parent->render.position.z;
|
||||
this->state.lastPrim->state.deltaPos2.y = -40.0f;
|
||||
this->state.lastPrim->state.longitude = static_cast<float>(std::max(rand() % 360, 0));
|
||||
this->state.lastPrim->state.longSpeed = static_cast<float>(std::max(rand() % 60, 0) + 10) / 10.0f;
|
||||
this->state.lastPrim->state.longitude = static_cast<float>(ClampedRandom(360));
|
||||
this->state.lastPrim->state.longSpeed = static_cast<float>(ClampedRandom(60) + 10) / 10.0f;
|
||||
EffectPrimitiveState& flash = this->state.lastPrim->state;
|
||||
flash.longAccel = -(flash.longSpeed / static_cast<float>(flash.duration)) / 1.5f;
|
||||
this->state.lastPrim->state.arcAngle = static_cast<float>(std::max(rand() % 25, 0) + 5) / 10.0f;
|
||||
this->state.lastPrim->state.arcAngle = static_cast<float>(ClampedRandom(25) + 5) / 10.0f;
|
||||
|
||||
if (this->state.stateCnt == 0) {
|
||||
this->state.lastPrim->state.heightSize = static_cast<float>(std::max(rand() % 30, 0) + 350);
|
||||
this->state.lastPrim->state.heightSpeed = -static_cast<float>(std::max(rand() % 30, 0) + 150) / 10.0f;
|
||||
this->state.lastPrim->state.heightSize = static_cast<float>(ClampedRandom(30) + 350);
|
||||
this->state.lastPrim->state.heightSpeed = -static_cast<float>(ClampedRandom(30) + 150) / 10.0f;
|
||||
} else {
|
||||
this->state.lastPrim->state.heightSize = 0.0f;
|
||||
this->state.lastPrim->state.heightSpeed = static_cast<float>(std::max(rand() % 20, 0) + 50) / 10.0f;
|
||||
this->state.lastPrim->state.heightSpeed = static_cast<float>(ClampedRandom(20) + 50) / 10.0f;
|
||||
this->state.lastPrim->state.changePoint = 40;
|
||||
this->state.lastPrim->state.changeSpeed = static_cast<float>(std::max(rand() % 10, 0) + 15) / 10.0f;
|
||||
this->state.lastPrim->state.changeSpeed = static_cast<float>(ClampedRandom(10) + 15) / 10.0f;
|
||||
this->state.lastPrim->state.changeAccel = 0.0f;
|
||||
this->state.lastPrim->state.changeHeightSpeed = 0.0f;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue