Skip to content

Commit 77aca91

Browse files
committed
fix: fix onFarmLandDecay cancellation
1 parent ff9d21b commit 77aca91

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/lse/events/EventHooks.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -528,11 +528,13 @@ LL_TYPE_INSTANCE_HOOK(
528528
float fallDistance
529529
) {
530530
IF_LISTENED(EVENT_TYPES::onFarmLandDecay) {
531-
CallEvent(
532-
EVENT_TYPES::onFarmLandDecay,
533-
IntPos::newPos(pos, region.getDimensionId()),
534-
EntityClass::newEntity(actor)
535-
);
531+
if (!CallEvent(
532+
EVENT_TYPES::onFarmLandDecay,
533+
IntPos::newPos(pos, region.getDimensionId()),
534+
EntityClass::newEntity(actor)
535+
)) {
536+
return;
537+
}
536538
}
537539
IF_LISTENED_END(EVENT_TYPES::onFarmLandDecay);
538540
origin(region, pos, actor, fallDistance);

0 commit comments

Comments
 (0)