Skip to content

Commit 426c68f

Browse files
committed
Trespasser Remaster: Revert db changes
1 parent 3505eb8 commit 426c68f

1 file changed

Lines changed: 3 additions & 18 deletions

File tree

scripts/vscripts/trespasser_remaster.nut

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -376,14 +376,6 @@ if(hObjectiveResource) hObjectiveResource.AcceptInput("$SetClientProp$m_iszMvMPo
376376
wins=Array[0],
377377
solo_win=Array[1],
378378
all_survivors_alive_win=Array[2]
379-
},
380-
callback = function(response, error) {
381-
// GetPlayerWins() wipes the Wins table until it completes, so we have to print unlock
382-
// info in this callback rather than in mvm_mission_complete to get an accurate readout.
383-
// NOTE: Might not be necessary anymore as I (fellen) (tentatively) removed GetPlayerWins()
384-
// from OnGameEvent_mvm_mission_complete.
385-
Trespasser.PrintUnlockTextForStoredPlayers()
386-
Trespasser.StoredUnlockTextInfo.clear()
387379
}
388380
})
389381
}
@@ -395,10 +387,9 @@ if(hObjectiveResource) hObjectiveResource.AcceptInput("$SetClientProp$m_iszMvMPo
395387
}
396388

397389
bAllSurvivorsAlive = true
398-
StoredUnlockTextInfo = {}
399390
function OnGameEvent_mvm_mission_complete(_)
400391
{
401-
//GetPlayerWins()
392+
GetPlayerWins()
402393
for(local i = 1; i <= MAX_PLAYERS; i++)
403394
{
404395
local hPlayer = PlayerInstanceFromIndex(i)
@@ -425,17 +416,11 @@ if(hObjectiveResource) hObjectiveResource.AcceptInput("$SetClientProp$m_iszMvMPo
425416
bAllSurvivorsAliveUnlock = true
426417
Wins[sNetworkID][2] = true
427418
}
428-
StoredUnlockTextInfo[sPlayerName] <- Wins[sNetworkID]
419+
420+
EntFire("bignet", "RunScriptCode", format("Trespasser.UnlockText(%i, `%s`, %s, %s)", Wins[sNetworkID][0], sPlayerName, bSoloUnlock ? "true" : "false", bAllSurvivorsAliveUnlock ? "true" : "false"), 1, hPlayer)
429421
}
430422
SavePlayerWins()
431423
}
432-
433-
function PrintUnlockTextForStoredPlayers()
434-
{
435-
foreach (player_name, unlock_info in StoredUnlockTextInfo)
436-
UnlockText(unlock_info[0], player_name, unlock_info[1], unlock_info[2])
437-
}
438-
439424
function UnlockText(iWins, sPlayerName, bSoloMode, bAllSurvivorsAlive)
440425
{
441426
local hPlayer = activator

0 commit comments

Comments
 (0)