Ghast fixes #4277

Merged
the-real-herowl merged 2 commits from ghast_fixes into master 2024-05-03 14:57:34 +02:00

Based on Araca's PR containing a crash report (#4179), I reviewed ghast code again. It turns out the check was still insufficient, and now it should work properly (aside of not crashing). I also simplified redirection velocity calculation.

Testing

Fight ghasts, let them hit other mobs with fireballs, stuff shouldn't crash. Try that without achievement (eg. on a new world), you shouldn't get it for hitting non-ghasts with ghast fireballs.

Based on Araca's PR containing a crash report (#4179), I reviewed ghast code again. It turns out the check was still insufficient, and now it should work properly (aside of not crashing). I also simplified redirection velocity calculation. ### Testing Fight ghasts, let them hit other mobs with fireballs, stuff shouldn't crash. Try that without achievement (eg. on a new world), you shouldn't get it for hitting non-ghasts with ghast fireballs.
the-real-herowl added this to the 0.87.0 - Prismatic milestone 2024-05-02 00:21:23 +02:00
the-real-herowl added the
mobs
#P1 CRITICAL
labels 2024-05-02 00:21:23 +02:00
the-real-herowl added 2 commits 2024-05-02 00:21:24 +02:00
cd0509c2e6 Fix crash with ghast achievement fireball_redir_serv (#4179)
Reviewed-on: MineClone2/MineClone2#4179
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: Araca <araca.prod@gmail.com>
Co-committed-by: Araca <araca.prod@gmail.com>
the-real-herowl added the
Testing / Retest
label 2024-05-02 00:21:34 +02:00
rudzik8 reviewed 2024-05-02 15:23:06 +02:00
rudzik8 left a comment
Member

Tested, eliminates the issues that it's supposed to.

Tested, eliminates the issues that it's supposed to.
rudzik8 reviewed 2024-05-02 15:24:35 +02:00
@ -133,3 +134,3 @@
mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1, true)
local ent = mob:get_luaentity()
if not ent or ent.health <= 0 then
if (not ent or ent.health <= 0) and self._puncher and name == "mobs_mc:ghast" then
Member

My only concern is this line. Wouldn't it be more rational to check for the entity's name sooner? Like, we have no reason to perform the former two checks if the latter will most of the time turn out to be false anyway. Up to discussion, of course.

My only concern is this line. Wouldn't it be more rational to check for the entity's name sooner? Like, we have no reason to perform the former two checks if the latter will most of the time turn out to be false anyway. Up to discussion, of course.
rudzik8 marked this conversation as resolved
rudzik8 approved these changes 2024-05-03 14:49:59 +02:00
rudzik8 left a comment
Member

Tested and discussed. LGTM

Tested and discussed. LGTM
the-real-herowl removed the
Testing / Retest
label 2024-05-03 14:57:12 +02:00
the-real-herowl merged commit 7d999535e7 into master 2024-05-03 14:57:34 +02:00
the-real-herowl deleted branch ghast_fixes 2024-05-03 14:57:35 +02:00
Sign in to join this conversation.
No reviewers
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#4277
No description provided.