Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2354 closed enhancement (fixed)

[PATCH] Camera position is missing in save game

Reported by: Michael Owned by: Michael
Priority: Nice to Have Milestone: Alpha 16
Component: Core engine Keywords: save load patch
Cc: Patch:

Description

If a game is saved and loaded back the camera position is lost.

Attachments (3)

save_camera_position.patch (6.8 KB ) - added by Michael 10 years ago.
Saves the X and Z value of the camera in the savefile and sets camera after game was loaded.
save_camera_position_v2.patch (6.4 KB ) - added by Michael 10 years ago.
Minor change where in information is saved in the datastructure.
save_camera_position_v3.patch (6.5 KB ) - added by Michael 10 years ago.
Made it compatible to SVN..…

Download all attachments as: .zip

Change History (15)

by Michael, 10 years ago

Attachment: save_camera_position.patch added

Saves the X and Z value of the camera in the savefile and sets camera after game was loaded.

comment:1 by Michael, 10 years ago

Keywords: patch review added
Milestone: BacklogAlpha 16

Took me some time to get a clue about the C/JS bridge...but now it's working.

comment:2 by Michael, 10 years ago

Summary: Camera position is missing in save game[PATCH] Camera position is missing in save game

by Michael, 10 years ago

Minor change where in information is saved in the datastructure.

by Michael, 10 years ago

Made it compatible to SVN.....

comment:3 by mimo, 10 years ago

Thanks for the patch, and sorry for the delay reviewing it. It looks good to me, but may-be we could also save the camera orientation, and not only the position ?

in reply to:  2 ; comment:4 by leper, 10 years ago

Replying to boeseRaupe: Any progress?

in reply to:  4 comment:5 by Michael, 10 years ago

Replying to leper:

Replying to boeseRaupe: Any progress?

Currently I don't have time to do anything for the game...

in reply to:  3 comment:6 by Michael, 10 years ago

Replying to mimo:

Thanks for the patch, and sorry for the delay reviewing it. It looks good to me, but may-be we could also save the camera orientation, and not only the position ?

Yeah, would be a good idea.

comment:7 by mimo, 10 years ago

Resolution: fixed
Status: newclosed

In 14905:

save/restore camera position and orientation in saved games, fixes #2354

comment:8 by mimo, 10 years ago

Thanks boeseRaupe for the initial patch. I've extended it to also save the orientation and the zoom.

comment:9 by mimo, 10 years ago

Keywords: review removed

comment:10 by sanderd17, 10 years ago

Mimo, when you commit something based on a patch by someone else, it's nice to give credits to the original author in the commit message.

Just a hint for the next time.

in reply to:  10 comment:11 by Michael, 10 years ago

Replying to sanderd17:

Mimo, when you commit something based on a patch by someone else, it's nice to give credits to the original author in the commit message.

Just a hint for the next time.

I don't mind. I'm glad, if it made it into the game. ;)

comment:12 by mimo, 10 years ago

hi boeseRaupe, that was just an oversight. thanks

Note: See TracTickets for help on using tickets.