- ViewRotation is changed to the value of Rotation (possibly resulting in different vertical view angle);
- PainTime can be changed to the value of UnderWaterTime (hence time before drowning can be prolonged);
- Physics can be changed to PHYS_Walking, state can be changed to PlayerWalking (f.e., flight on level ExtremeEnd cannot be resumed, feigning death cannot be resumed);
- Velocity is reset to vect(0, 0, 0);
- Collision flags are set to true (loading a game saved in ghost mode doesn't work well);
- DesiredFOV is reset to clamped MainFOV (Rifle zooming is cancelled).
Suggested resolution:
- In function Engine.GameInfo.Login replace
Code: Select all
// Try to match up to existing unoccupied player in level,
// for savegames and coop level switching.
if( Level.NetMode==NM_Standalone )
{
for ( PawnLink=Level.PawnList; PawnLink!=None; PawnLink=PawnLink.NextPawn )
{
TestPlayer = PlayerPawn(PawnLink);
if ( TestPlayer!=None && TestPlayer.Player==None )
{
// Found matching unoccupied player, so use this one.
NewPlayer = TestPlayer;
break;
}
}
}
// In not found, spawn a new player.
if ( NewPlayer==None )
{
// Make sure this kind of player is allowed.
if ( (bHumansOnly || Level.bHumansOnly) && !SpawnClass.Default.bIsHuman
&& !ClassIsChildOf(SpawnClass, class'Spectator') )
SpawnClass = DefaultPlayerClass;
NewPlayer = Spawn(SpawnClass,,,StartSpot.Location,StartSpot.Rotation);
if ( NewPlayer!=None )
NewPlayer.ViewRotation = StartSpot.Rotation;
}
Code: Select all
// Try to match up to existing unoccupied player in level,
// for savegames and coop level switching.
if( Level.NetMode==NM_Standalone )
{
for ( PawnLink=Level.PawnList; PawnLink!=None; PawnLink=PawnLink.NextPawn )
{
TestPlayer = PlayerPawn(PawnLink);
if ( TestPlayer!=None && TestPlayer.Player==None )
return TestPlayer; // Found matching unoccupied player, so use this one.
}
}
// If not found, spawn a new player.
// Make sure this kind of player is allowed.
if ( (bHumansOnly || Level.bHumansOnly) && !SpawnClass.Default.bIsHuman
&& !ClassIsChildOf(SpawnClass, class'Spectator') )
SpawnClass = DefaultPlayerClass;
NewPlayer = Spawn(SpawnClass,,,StartSpot.Location,StartSpot.Rotation);
if ( NewPlayer!=None )
NewPlayer.ViewRotation = StartSpot.Rotation;
Code: Select all
local float CustomFOV;
if (Level.NetMode == NM_Standalone && Level.Game.bIsSavedGame)
{
ServerUpdateWeapons();
NeverSwitchOnPickup(bNeverAutoSwitch);
CustomFOV = FClamp(MainFOV, 1, 170);
DefaultFOV = FClamp(DefaultFOV, 1, 170);
if (DefaultFOV != CustomFOV)
{
// Recalculate FOV according to the difference between saved and updated DefaultFOV
FOVAngle = Atan(Tan(FovAngle * Pi / 360) * Tan(CustomFOV * Pi / 360) / Tan(DefaultFOV * Pi / 360)) * 360 / Pi;
DesiredFOV = Atan(Tan(DesiredFOV * Pi / 360) * Tan(CustomFOV * Pi / 360) / Tan(DefaultFOV * Pi / 360)) * 360 / Pi;
DefaultFOV = CustomFOV;
}
return;
}
Code: Select all
local byte i;