本文整理汇总了C++中FSerializer::OpenReader方法的典型用法代码示例。如果您正苦于以下问题:C++ FSerializer::OpenReader方法的具体用法?C++ FSerializer::OpenReader怎么用?C++ FSerializer::OpenReader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSerializer
的用法示例。
在下文中一共展示了FSerializer::OpenReader方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: G_UnSnapshotLevel
void G_UnSnapshotLevel (bool hubLoad)
{
if (level.info->Snapshot.mBuffer == nullptr)
return;
if (level.info->isValid())
{
FSerializer arc;
if (!arc.OpenReader(&level.info->Snapshot))
{
I_Error("Failed to load savegame");
return;
}
G_SerializeLevel (arc, hubLoad);
level.FromSnapshot = true;
TThinkerIterator<APlayerPawn> it;
APlayerPawn *pawn, *next;
next = it.Next();
while ((pawn = next) != 0)
{
next = it.Next();
if (pawn->player == NULL || pawn->player->mo == NULL || !playeringame[pawn->player - players])
{
int i;
// If this isn't the unmorphed original copy of a player, destroy it, because it's extra.
for (i = 0; i < MAXPLAYERS; ++i)
{
if (playeringame[i] && players[i].morphTics && players[i].mo->tracer == pawn)
{
break;
}
}
if (i == MAXPLAYERS)
{
pawn->Destroy ();
}
}
}
}
// No reason to keep the snapshot around once the level's been entered.
level.info->Snapshot.Clean();
if (hubLoad)
{
// Unlock ACS global strings that were locked when the snapshot was made.
FBehavior::StaticUnlockLevelVarStrings();
}
}