From: <bsg...@us...> - 2009-02-11 14:43:21
|
Revision: 3094 http://hw2bsg.svn.sourceforge.net/hw2bsg/?rev=3094&view=rev Author: bsg_frive Date: 2009-02-11 14:43:02 +0000 (Wed, 11 Feb 2009) Log Message: ----------- delete ShipSpawnAward, Rive thinks that there will be enough ships on the map Modified Paths: -------------- trunk/RivE/AreaCapture/leveldata/multiplayer/AreaCapture/GameSetupOptionsArea.lua trunk/RivE/AreaCapture/leveldata/multiplayer/AreaCapture.lua trunk/RivE/AreaCapture/scripts/scar/AreaCaptureConfig.lua Removed Paths: ------------- trunk/RivE/AreaCapture/scripts/scar/AreaCaptureAwardShip.lua Modified: trunk/RivE/AreaCapture/leveldata/multiplayer/AreaCapture/GameSetupOptionsArea.lua =================================================================== --- trunk/RivE/AreaCapture/leveldata/multiplayer/AreaCapture/GameSetupOptionsArea.lua 2009-02-10 18:29:46 UTC (rev 3093) +++ trunk/RivE/AreaCapture/leveldata/multiplayer/AreaCapture/GameSetupOptionsArea.lua 2009-02-11 14:43:02 UTC (rev 3094) @@ -127,22 +127,4 @@ choices = { "30 seconds", "30", "1 minute", "60", "2 minutes", "120", "5 minutes", "300", "10 minutes", "600", }, }, - { - name = "shipspawninitial", - locName = "Ship Spawn Delay", - tooltip = "THE TIME FROM THE START OF THE GAME AFTER WHICH SHIP CONTROL POINTS CAN SPAWN SHIPS", - default = 4, - visible = 1, - choices = - { "No delay", "0", "30 seconds", "30", "1 minute", "60", "2 minutes", "120", "5 minutes", "300", "10 minutes", "600", }, - }, - { - name = "shipspawnperiod", - locName = "Ship Spawn Period", - tooltip = "THE TIME PERIOD BETWEEN SHIP SPAWNS AFTER THE INITIAL DELAY", - default = 2, - visible = 1, - choices = - { "30 seconds", "30", "1 minute", "60", "2 minutes", "120", "5 minutes", "300", "10 minutes", "600", }, - }, } \ No newline at end of file Modified: trunk/RivE/AreaCapture/leveldata/multiplayer/AreaCapture.lua =================================================================== --- trunk/RivE/AreaCapture/leveldata/multiplayer/AreaCapture.lua 2009-02-10 18:29:46 UTC (rev 3093) +++ trunk/RivE/AreaCapture/leveldata/multiplayer/AreaCapture.lua 2009-02-11 14:43:02 UTC (rev 3094) @@ -49,9 +49,7 @@ cpAwardRUValue = GetGameSettingAsNumber("ruawardvalue") cpAwardStationRespawnDelay = GetGameSettingAsNumber("stationrespawn") cpAwardBabylon4RespawnDelay = GetGameSettingAsNumber("stationrespawn") - cpAwardBabylon5RespawnDelay = GetGameSettingAsNumber("stationrespawn") - cpAwardShipInitialDelay = GetGameSettingAsNumber("shipspawninitial") - cpAwardShipSpawnPeriod = GetGameSettingAsNumber("shipspawnperiod") + cpAwardBabylon5RespawnDelay = GetGameSettingAsNumber("stationrespawn") PickRandomMusicTrackRule() -- PickRandomMusicTrack.lua imported by restirct.lua Deleted: trunk/RivE/AreaCapture/scripts/scar/AreaCaptureAwardShip.lua =================================================================== --- trunk/RivE/AreaCapture/scripts/scar/AreaCaptureAwardShip.lua 2009-02-10 18:29:46 UTC (rev 3093) +++ trunk/RivE/AreaCapture/scripts/scar/AreaCaptureAwardShip.lua 2009-02-11 14:43:02 UTC (rev 3094) @@ -1,139 +0,0 @@ --- ============================================================================ --- Homeworld 2: Area Capture Mod --- ----------------------------- --- --- Author:Alex " CnlPepper" Meakins --- Version: 1.0 --- Date: 08/04/2008 --- File: AreaCaptureAwardShip.lua --- --- This file defines the ship award. On capture of a control point predefined --- sets of ships will be periodically spawned at the capture point for the --- player that owns the point. The ship spawning is on a fixed timer, the --- progress of which is displayed using the award progress bar in the UI. --- --- This award must not be used in conjunction with other awards that use the --- award progress bar. --- --- ============================================================================ - - --- initial time delay before first spawn -cpAwardShipInitialDelay = 120 -- WARNING: this value is now overwritten by the gui value setting in AreaCapture.lua OnInit() - --- time between ship spawns -cpAwardShipSpawnPeriod = 60 -- WARNING: this value is now overwritten by the gui value setting in AreaCapture.lua OnInit() - --- list of ships with associated spawn weightings (for efficiency place most probable ships earlier in the list) -cpAwardShipList = -{ - { "hur_vipermkvii", 30 }, - { "hur_battleraptor", 30 }, - { "hur_parnassus", 3 }, -} - -cpAwardShipSpawnTime = {} -- ship spawn timers, holds the time of the next ship spawn -cpAwardShipSpawnIsInitial = {} -- hold if the time store is the initial time (for progress bar calculation) -cpAwardShipIsSet = {} -- cache if the award is set for each control point -cpAwardShipWeightSum = 0 -- hold the sum of the ship weights in the ship list - -function AreaCaptureAwardShipInit() - - -- sum the ship weights in the ship list - for i,v in cpAwardShipList do - - cpAwardShipWeightSum = cpAwardShipWeightSum + v[2] - - end - - -- cache if award is set, configure timers for initial spawn, set progress bar to 0% - for c=1,cpTotal do - - for i,award in cpAwards[c] do - - -- find first instance of ship award - cpAwardShipIsSet[c] = 0 - if (award == "Ship") then - - cpAwardShipIsSet[c] = 1 - cpAwardShipSpawnTime[c] = Universe_GameTime() + cpAwardShipInitialDelay - cpAwardShipSpawnIsInitial[c] = 1 - AreaCaptureUIAwardBar(c, 0) - break - - end - end - end -end - -function AreaCaptureAwardShipRule() - - for c=1,cpTotal do - - if (cpAwardShipIsSet[c] == 1) then - - if ((cpAwardShipSpawnTime[c] - Universe_GameTime()) > 0) then - - -- update progress bar - if (cpAwardShipSpawnIsInitial[c] == 0) then - - AreaCaptureUIAwardBar(c, (1 - ((cpAwardShipSpawnTime[c] - Universe_GameTime()) / cpAwardShipSpawnPeriod)) * 100) - - else - - AreaCaptureUIAwardBar(c, (1 - ((cpAwardShipSpawnTime[c] - Universe_GameTime()) / cpAwardShipInitialDelay)) * 100) - - end - - else - - -- if point not owned - if (cpOwnership[c] < 0) then - - AreaCaptureUIAwardBar(c, 100) - - else - - -- spawn ship - AreaCaptureAwardShipSpawn(cpOwnership[c], c) - - -- set new time - cpAwardShipSpawnTime[c] = Universe_GameTime() + cpAwardShipSpawnPeriod - - -- set progress bar to 0 - AreaCaptureUIAwardBar(c, 0) - - -- set inital to 0 - cpAwardShipSpawnIsInitial[c] = 0 - - end - end - end - end -end - -function AreaCaptureAwardShipSpawn(iPlayer, iControlPoint) - - local weightEval - local shipIndex - local shipName - - -- select ship from list - shipIndex = 1 - weightEval = RandomRange(0,cpAwardShipWeightSum) - cpAwardShipList[1][2] - while ((shipIndex<getn(cpAwardShipList)) and (weightEval > 0)) do - - weightEval = weightEval - cpAwardShipList[shipIndex][2] - shipIndex = shipIndex + 1 - - end - - -- spawn ship - print("AreaCaptureAwardShip: Spawning a "..cpAwardShipList[shipIndex][1].." for player "..iPlayer.." at control point "..iControlPoint) - SobGroup_SpawnNewShipInSobGroup(iPlayer, cpAwardShipList[shipIndex][1], "null", "CP"..iControlPoint, "CP"..iControlPoint.."_Volume") -- REPLACE ME WITH BETTER SPAWN SYSTEM - --- void SobGroup_Spawn (const char *sobGroupName, const char *volumeName) --- temp = SobGroup_CreateShip ("null", sShip) --- returns a runtime sobGroup containing a squadron of the created ship - -end Modified: trunk/RivE/AreaCapture/scripts/scar/AreaCaptureConfig.lua =================================================================== --- trunk/RivE/AreaCapture/scripts/scar/AreaCaptureConfig.lua 2009-02-10 18:29:46 UTC (rev 3093) +++ trunk/RivE/AreaCapture/scripts/scar/AreaCaptureConfig.lua 2009-02-11 14:43:02 UTC (rev 3094) @@ -39,7 +39,6 @@ { "RU", "Station", - "Ship", "Research", "Babylon4", "Babylon5", @@ -59,9 +58,6 @@ -- RU research award AreaCaptureAwardResearchInit() - -- Ship spawn award - AreaCaptureAwardShipInit() - -- Station spawn award AreaCaptureAwardStationInit() @@ -80,9 +76,6 @@ -- RU injection award rule Rule_AddInterval("AreaCaptureAwardRURule",1) - -- Ship spawn award rule - Rule_AddInterval("AreaCaptureAwardShipRule",1) - -- Station spawn award rule Rule_AddInterval("AreaCaptureAwardStationRule",1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |