Skip to content

Commit

Permalink
reset fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shultays committed Sep 8, 2017
1 parent fc41a94 commit 386c804
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
Binary file removed game/bloodworks_d.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion game/game.vcxproj
Expand Up @@ -79,7 +79,7 @@
<IncludePath>C:\libs\curl\include;C:\libs\soloud\include;C:\libs\lua53\include;C:\libs\glew2\include;C:\libs\sdl2image\include;C:\libs\sdl22\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LibraryPath>C:\libs\curl\lib;C:\libs\soloud\lib;C:\libs\lua53\lib;C:\libs\glew2\lib\Release\x64;C:\libs\sdl2image\lib\x64;C:\libs\sdl22\lib\x64;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64</LibraryPath>
<CustomBuildBeforeTargets>PostBuildEvent</CustomBuildBeforeTargets>
<TargetName>bloodworks_d</TargetName>
<TargetName>bloodworks_debug</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
Expand Down
2 changes: 1 addition & 1 deletion game/resources/missions/helpers.lua
Expand Up @@ -389,7 +389,7 @@ function canSpawnIgnoredMonster()
return (missionData.maxMonster == nil or getMonsterCount() < missionData.maxMonster) and (missionData.ignoreMonsterCount == nil or missionData.ignoreMonsterCount < 50)
end

function gameRestTick()
function gameResetTick()
if missionData.enableReset == true then
if missionData.scoreText ~= nil then
missionData.scoreText:setText("Score : " .. getScore())
Expand Down
8 changes: 3 additions & 5 deletions game/resources/missions/survival/survival.lua
Expand Up @@ -17,7 +17,6 @@ function Survival.init()
missionData.maxMonster = 50
else
missionData.maxMonster = 650
spawn = 50
end
missionData.curMaxMonster = missionData.maxMonster

Expand Down Expand Up @@ -46,7 +45,6 @@ function Survival.onTick()
missionData.timeToCalcSpawn = math.random() * 0.5 + 0.5
calcRandomSpawns()
end

if missionData.firstTick then
local spawn
if DEBUG then
Expand All @@ -57,7 +55,6 @@ function Survival.onTick()

local rateMult = 1.0 + (getMapSize().x - 3000.0) / 3000.0
spawn = math.floor(rateMult * spawn)
print(spawn)
for i = 1, spawn do
local pos = getRandomPosition( {canBeEdge=true, notOnScreen=true, notNearPlayer=true, notNearMonsters=true, playerRange=400.0})
local monster = addRandomMonster()
Expand All @@ -66,7 +63,6 @@ function Survival.onTick()
end
end

gameRestTick()

missionData.curMaxMonster = math.floor(lerp(55, missionData.maxMonster, clamp(min * 0.05)))
local rateMult = 1.0 + (getMapSize().x - 3000.0) / 5000.0
Expand All @@ -80,6 +76,7 @@ function Survival.onTick()
end

missionData.firstTick = false
gameResetTick()
end


Expand Down Expand Up @@ -119,7 +116,8 @@ function Survival.onDebugTick()
end

if isKeyReleased(keys.Insert) then
local t = missionData.maxMonster * 0.2 - getMonsterCount()
local t = missionData.maxMonster * 0.2
t = math.min(missionData.maxMonster - getMonsterCount(), t)
if t > 1 then
for i = 1, t - 10 do
local pos = getRandomPosition( {canBeEdge=true, notNearPlayer=true, notNearMonsters=true, playerRange=400.0})
Expand Down
2 changes: 1 addition & 1 deletion game/resources/mods/narsie_fight/boss.lua
Expand Up @@ -71,7 +71,7 @@ function NarSieFight.onTick()
HealthBar.updateBar(missionData.health, missionData.narsie.hitPoint / missionData.maxHitPoint)
missionData.firstTick = false
end
gameRestTick()
gameResetTick()
end

function NarSieFight.onNarSieKilled(monster)
Expand Down
Binary file removed game/uploader_d.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion uploader/uploader.vcxproj
Expand Up @@ -76,7 +76,7 @@
<LinkIncremental>true</LinkIncremental>
<IncludePath>C:\libs\curl\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<LibraryPath>C:\libs\curl\lib;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64</LibraryPath>
<TargetName>uploader_d</TargetName>
<TargetName>uploader_debug</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
Expand Down

0 comments on commit 386c804

Please sign in to comment.