only seek deathpart type once

This commit is contained in:
kdx 2023-03-26 05:47:47 +00:00
parent 20d86d093f
commit 410702a282
1 changed files with 2 additions and 1 deletions

View File

@ -54,12 +54,13 @@ IMPL_UPDATE() {
if (this->bonk_ceiling ||
entity_place_meeting(this, g, entity_type("spike")) != NULL) {
const unsigned int deathpart = entity_type("deathpart");
int dy = this->pos[1] - 6;
for (int y = 0; y < 7; y++) {
int dx = this->pos[0] - 6;
for (int x = 0; x < 7; x++) {
entity_init(game_create_entity(g),
entity_type("deathpart"), dx, dy);
deathpart, dx, dy);
dx += 2;
}
dy += 2;