From 640f94ace43d865731c0b07cb4c503d62e59e6ad Mon Sep 17 00:00:00 2001 From: Per Inge Mathisen Date: Tue, 12 Jan 2010 22:37:17 +0000 Subject: [PATCH] Nudge scav script a bit to make it not crash the script interpreter. git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9171 4a71c877-e1ca-e34f-864e-861f7616d084 --- data/base/multiplay/script/scavfact.slo | 27 ++++++++++++------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/data/base/multiplay/script/scavfact.slo b/data/base/multiplay/script/scavfact.slo index d452c87ba..6c1b9dbc7 100644 --- a/data/base/multiplay/script/scavfact.slo +++ b/data/base/multiplay/script/scavfact.slo @@ -54,20 +54,6 @@ event startLevel(CALL_START_NEXT_LEVEL) } } -// Startup -event startup(init) -{ - if (!scavengersActive() or !myResponsibility(enemy1)) - { - setEventTrigger(startLevel, inactive); - setEventTrigger(droidbuilt, inactive); - setEventTrigger(structureAttacked, inactive); - } - lastAttack = 0; - - groupAddArea(attackGroup, enemy1, 0, 0, (mapWidth * 128), (mapHeight * 128)); -} - // deal with a droid being built by us event droidbuilt(CALL_NEWDROID, enemy1, ref newDroid, ref fac1) { @@ -112,3 +98,16 @@ event structureAttacked(CALL_STRUCT_ATTACKED, enemy1, ref structure, ref attacke } } +// Startup +event startup(CALL_GAMEINIT) +{ + if (!scavengersActive() or !myResponsibility(enemy1)) + { + setEventTrigger(startLevel, inactive); + setEventTrigger(droidbuilt, inactive); + setEventTrigger(structureAttacked, inactive); + } + lastAttack = 0; + + groupAddArea(attackGroup, enemy1, 0, 0, (mapWidth * 128), (mapHeight * 128)); +}