Do the cursor/crosshair scaling to 4:3 also when loading savegame

This commit is contained in:
Daniel Gibson 2018-11-05 04:54:53 +01:00
parent f407b2b8e9
commit f5dfdead43
2 changed files with 13 additions and 0 deletions

View file

@ -2473,6 +2473,12 @@ void idPlayer::Restore( idRestoreGame *savefile ) {
savefile->ReadInt( focusTime );
savefile->ReadObject( reinterpret_cast<idClass *&>( focusVehicle ) );
savefile->ReadUserInterface( cursor );
// DG: make it scale to 4:3 so crosshair looks properly round
// yes, like so many scaling-related things this is a bit hacky
// and note that this is special cased in StateChanged and you
// can *not* generally set windowDef properties like this.
cursor->SetStateBool("scaleto43", true);
cursor->StateChanged(gameLocal.time); // DG end
savefile->ReadInt( oldMouseX );
savefile->ReadInt( oldMouseY );

View file

@ -2033,6 +2033,13 @@ void idPlayer::Restore( idRestoreGame *savefile ) {
savefile->ReadObject( reinterpret_cast<idClass *&>( focusVehicle ) );
savefile->ReadUserInterface( cursor );
// DG: make it scale to 4:3 so crosshair looks properly round
// yes, like so many scaling-related things this is a bit hacky
// and note that this is special cased in StateChanged and you
// can *not* generally set windowDef properties like this.
cursor->SetStateBool("scaleto43", true);
cursor->StateChanged(gameLocal.time); // DG end
savefile->ReadInt( oldMouseX );
savefile->ReadInt( oldMouseY );