Skip to content

Commit

Permalink
Display pickup truck.
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroldo de Oliveira Pinheiro committed Dec 10, 2021
1 parent 45d1c4a commit 7ef52e4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion chicken_crossing.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void handle_spawners() {
if (!act->active && !act2->active) {
if (!(rand() & 0x1F)) {
facing_left = (rand() >> 4) & 1;
thing_to_spawn = (rand() >> 4) % 3;
thing_to_spawn = (rand() >> 4) % 4;
boost = (rand() >> 4) % level.boost_chance ? 0 : 1;

switch (thing_to_spawn) {
Expand Down Expand Up @@ -247,6 +247,13 @@ void handle_spawners() {
act->spd_x = level.submarine_speed + boost;
act->group = GROUP_RED_CAR;
break;

case 3:
// Spawn a pickup truck
init_actor(act, 0, y, 3, 1, 90, 1);
act->spd_x = level.submarine_speed + boost;
act->group = GROUP_RED_CAR;
break;
}

adjust_facing(act, facing_left);
Expand Down

0 comments on commit 7ef52e4

Please sign in to comment.