Fixed all the runtimes.

This commit is contained in:
ESwordTheCat
2014-04-29 13:39:50 -04:00
committed by ZomgPonies
parent 5d9bee2b2e
commit 33c492ae4c
3 changed files with 8 additions and 4 deletions
+2 -3
View File
@@ -48,7 +48,7 @@
* WARNING, only supports /mob and /obj.
*/
#define DEBUG_OBJECT_POOL 0
#define DEBUG_OBJECT_POOL 1
#define MAINTAINING_OBJECT_POOL_COUNT 20
var/list/masterPool = list()
@@ -100,11 +100,10 @@ var/list/masterPool = list()
if (isnull(masterPool[Object.type]))
#if DEBUG_OBJECT_POOL
world << "DEBUG_OBJECT_POOL: [Object.type] pool is empty, recreating list."
world << "DEBUG_OBJECT_POOL: [Object.type] pool is empty, recreating pool."
#endif
masterPool[Object.type] = list()
// A way to limit
else if (length(masterPool[Object.type]) > MAINTAINING_OBJECT_POOL_COUNT)
#if DEBUG_OBJECT_POOL
world << "DEBUG_OBJECT_POOL: returnToPool([Object.type]) exceeds [num2text(MAINTAINING_OBJECT_POOL_COUNT)] discarding..."
+3 -1
View File
@@ -110,7 +110,7 @@
Bump(atom/A as mob|obj|turf|area)
if(A == firer)
loc = A.loc
//loc = A.loc
return 0 //cannot shoot yourself
if(bumped) return 0
@@ -182,6 +182,7 @@
if(!istype(src, /obj/item/projectile/beam/lightning))
density = 0
invisibility = 101
//del(src)
returnToPool(src)
return 1
@@ -199,6 +200,7 @@
if(kill_count < 1)
//del(src)
returnToPool(src)
return
kill_count--
spawn while(src)
if((!( current ) || loc == current))
@@ -206,6 +206,9 @@ var/list/beam_master = list()
return
step_towards(src, current) //Move~
if (isnull(loc))
return
if(kill_count < 1)
//del(src)
returnToPool(src)