Move HOOK_ON_ADD_SURFACE to before cell calculation (#1124)
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run

Moving it before the cell calculation should allow more possibilities
in runtime collision modification

Co-authored-by: MysterD <myster@d>
This commit is contained in:
djoslin0 2026-03-01 14:43:44 -08:00 committed by GitHub
parent 1272c0d733
commit a9f0b5c99c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -271,6 +271,8 @@ static void add_surface(struct Surface *surface, s32 dynamic) {
s16 cellZ, cellX;
smlua_call_event_hooks(HOOK_ON_ADD_SURFACE, surface, dynamic);
minX = min_3(surface->vertex1[0], surface->vertex2[0], surface->vertex3[0]);
minZ = min_3(surface->vertex1[2], surface->vertex2[2], surface->vertex3[2]);
maxX = max_3(surface->vertex1[0], surface->vertex2[0], surface->vertex3[0]);
@ -287,7 +289,6 @@ static void add_surface(struct Surface *surface, s32 dynamic) {
}
}
smlua_call_event_hooks(HOOK_ON_ADD_SURFACE, surface, dynamic);
}
/**