Procházet zdrojové kódy

[fixed] infinite loop in gschool_detention

julzor před 5 roky
rodič
revize
5a576136c2
1 změnil soubory, kde provedl 7 přidání a 6 odebrání
  1. 7 6
      locations/gschool_detention.qsrc

+ 7 - 6
locations/gschool_detention.qsrc

@@ -54,14 +54,15 @@ if $ARGS[0] = 'start':
 end
 
 if $ARGS[0] = 'wedgie':
+	wedgie_counter = 0
 	:wedgie_girl
 	gs 'gschool_events', 'rand_girl_arg', 1, 1, 0, 1, 1, 0
-	if grupTipe = 4:
-		if $rand_girl ! 'Paulina' and $rand_girl ! 'Lena' and $rand_girl ! 'Lera' and $rand_girl ! 'Alyona': jump 'wedgie_girl'
-	elseif grupTipe = 2:
-		if $rand_girl ! 'Paulina' and $rand_girl ! 'Lena' and $rand_girl ! 'Lera' and $rand_girl ! 'Alyona' and $rand_girl ! 'Christina': jump 'wedgie_girl'
-	else
-		if $rand_girl ! 'Paulina' and $rand_girl ! 'Lena' and $rand_girl ! 'Lera' and $rand_girl ! 'Alyona' and $rand_girl ! 'Christina' and $rand_girl ! 'Lina' and $rand_girl ! 'Lariska' and $rand_girl ! 'Stasya': jump 'wedgie_girl'
+	if grupTipe = 4 and wedgie_counter < 1000:
+		if $rand_girl ! 'Paulina' and $rand_girl ! 'Lena' and $rand_girl ! 'Lera' and $rand_girl ! 'Alyona': wedgie_counter += 1 & jump 'wedgie_girl'
+	elseif grupTipe = 2 and wedgie_counter < 1000:
+		if $rand_girl ! 'Paulina' and $rand_girl ! 'Lena' and $rand_girl ! 'Lera' and $rand_girl ! 'Alyona' and $rand_girl ! 'Christina': wedgie_counter += 1 & jump 'wedgie_girl'
+	elseif wedgie_counter < 1000:
+		if $rand_girl ! 'Paulina' and $rand_girl ! 'Lena' and $rand_girl ! 'Lera' and $rand_girl ! 'Alyona' and $rand_girl ! 'Christina' and $rand_girl ! 'Lina' and $rand_girl ! 'Lariska' and $rand_girl ! 'Stasya': wedgie_counter += 1 & jump 'wedgie_girl'
 	end
 	'<center><b><font color="maroon">Detention</font></b></center>'
 	'<center><img <<$set_imgh>> src="images/locations/pavlovsk/school/detention/wedgie.jpg"></center>'