Skip to content
This repository was archived by the owner on Sep 21, 2024. It is now read-only.

Commit bb31c4e

Browse files
Fixed warp mario holding in cannon using wrong sprite at room start.
Fixed blocks occasionally getting bumped when Mario falls to the side of them.
1 parent 1a130bf commit bb31c4e

2 files changed

Lines changed: 37 additions & 24 deletions

File tree

objects/obj_blockparent.object.gmx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ vspeed = 2
133133
if ready = 0
134134
and collision_rectangle(bbox_left,bbox_bottom,bbox_right,bbox_bottom+1,obj_mario,0,0)
135135
and obj_mario.state = 2
136+
and obj_mario.vspeed <= 0
136137
{
137138

138139
//The block is hit

objects/obj_warpmario.object.gmx

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,32 @@ gravity = 0.25
106106
<argument>
107107
<kind>1</kind>
108108
<string>///Launch Mario out of a diagonal pipe cannon
109+
110+
//Explosion sound
109111
audio_play_sound(snd_explode,0,0)
112+
113+
//Launch up and to the right
110114
hspeed = 4
111115
vspeed = -4
116+
117+
//Make visible
112118
visible = 1
113119

120+
//Choose the appropriate sprite
121+
if holding = 0
122+
sprite_index = scr_mariorunjump()
123+
else
124+
sprite_index = scr_mariohold()
125+
126+
//Do not animate
127+
image_speed = 0
128+
129+
//Choose the appropriate image index
130+
image_index = 0
131+
132+
//Face right
133+
direct = 1
134+
114135
//Enable gravity
115136
alarm[3] = 30
116137
</string>
@@ -136,9 +157,24 @@ alarm[3] = 30
136157
<argument>
137158
<kind>1</kind>
138159
<string>///Launch Mario out of a pipe cannon
160+
161+
//Explosion sound
139162
audio_play_sound(snd_explode,0,0)
163+
164+
//Launch upwards
140165
vspeed = -4
166+
167+
//Make visible
141168
visible = 1
169+
170+
//Choose the appropriate sprite
171+
sprite_index = scr_mariowarp()
172+
173+
//Do not animate
174+
image_speed = 0
175+
176+
//Choose the appropriate image index
177+
image_index = 0
142178
</string>
143179
</argument>
144180
</arguments>
@@ -447,21 +483,6 @@ if cannon = 0
447483
//Stop moving
448484
speed = 0
449485

450-
//Choose the appropriate sprite
451-
if holding = 0
452-
sprite_index = scr_mariorunjump()
453-
else
454-
sprite_index = scr_mariohold()
455-
456-
//Do not animate
457-
image_speed = 0
458-
459-
//Choose the appropriate image index
460-
image_index = 0
461-
462-
//Face right
463-
direct = 1
464-
465486
//Begin launch
466487
alarm[2] = 30
467488

@@ -500,15 +521,6 @@ if cannon = 0
500521
//Stop moving
501522
speed = 0
502523

503-
//Choose the appropriate sprite
504-
sprite_index = scr_mariowarp()
505-
506-
//Do not animate
507-
image_speed = 0
508-
509-
//Choose the appropriate image index
510-
image_index = 0
511-
512524
//Begin launch
513525
alarm[1] = 16
514526

0 commit comments

Comments
 (0)