Hopefully made meteor mode more deadly.

Fixed meteor spawning so all the meteors that are set to spawn actually hit, but noticed that 50 meteors every 5 seconds proved itself to be way too laggy when all of them actually spawned properly and aren't deleted at soon as they're created due to being on the map's edge. Instead I lowered it to 6 per second.

Wrote this in the changelog.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2679 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2011-12-14 02:32:33 +00:00
parent 28c7ac184f
commit b04400e11c
4 changed files with 33 additions and 16 deletions
+3 -4
View File
@@ -24,14 +24,13 @@
/datum/game_mode/meteor/process()
if(nometeors) return
if(prob(80))
/*if(prob(80))
spawn()
dust_swarm("norm")
else
spawn()
dust_swarm("strong")
if(prob(10)) meteor_wave()
else spawn_meteors()
dust_swarm("strong")*/
spawn() spawn_meteors(6)
/datum/game_mode/meteor/declare_completion()
+16 -11
View File
@@ -6,19 +6,19 @@
/var/const/meteors_in_wave = 50
/var/const/meteors_in_small_wave = 10
/proc/meteor_wave()
/proc/meteor_wave(var/number = meteors_in_wave)
if(!ticker || wavesecret)
return
wavesecret = 1
for(var/i = 0 to meteors_in_wave)
for(var/i = 0 to number)
spawn(rand(10,100))
spawn_meteor()
spawn(meteor_wave_delay)
wavesecret = 0
/proc/spawn_meteors()
for(var/i = 0; i < meteors_in_small_wave; i++)
/proc/spawn_meteors(var/number = meteors_in_small_wave)
for(var/i = 0; i < number; i++)
spawn(0)
spawn_meteor()
@@ -36,23 +36,23 @@
do
switch(pick(1,2,3,4))
if(1) //NORTH
starty = world.maxy-1
starty = world.maxy-3
startx = rand(1, world.maxx-1)
endy = 1
endx = rand(1, world.maxx-1)
if(2) //EAST
starty = rand(1,world.maxy-1)
startx = world.maxx-1
startx = world.maxx-3
endy = rand(1, world.maxy-1)
endx = 1
if(3) //SOUTH
starty = 1
starty = 3
startx = rand(1, world.maxx-1)
endy = world.maxy-1
endx = rand(1, world.maxx-1)
if(4) //WEST
starty = rand(1, world.maxy-1)
startx = 1
startx = 3
endy = rand(1,world.maxy-1)
endx = world.maxx-1
@@ -67,9 +67,9 @@
var/obj/effect/meteor/M
switch(rand(1, 100))
if(1 to 10)
if(1 to 20)
M = new /obj/effect/meteor/big( pickedstart )
if(11 to 75)
if(21 to 75)
M = new /obj/effect/meteor( pickedstart )
if(76 to 100)
M = new /obj/effect/meteor/small( pickedstart )
@@ -137,7 +137,12 @@
if(!M.stat && !istype(M, /mob/living/silicon/ai)) //bad idea to shake an ai's view
shake_camera(M, 3, 1)
if (A)
explosion(src.loc, 0, 1, 2, 3, 0)
if(isobj(A))
del(A)
else
meteorhit(A)
src.hits--
return
playsound(src.loc, 'meteorimpact.ogg', 40, 1)
if (--src.hits <= 0)
if(prob(15) && !istype(A, /obj/structure/grille))
+5 -1
View File
@@ -618,8 +618,12 @@
return
/turf/simulated/wall/meteorhit(obj/M as obj)
if (M.icon_state == "flaming")
if (prob(15))
dismantle_wall()
else if(prob(70))
ReplaceWithPlating()
else
ReplaceWithLattice()
return 0