Opened 6 years ago
Last modified 4 years ago
#4839 assigned defect
StartingCamera code broken
Reported by: | elexis | Owned by: | elexis |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Backlog |
Component: | UI – In-game | Keywords: | |
Cc: | Patch: |
Description (last modified by )
The camera position should always be centered in observermode.
r20370 removed some code that pretends to center the camera. But that only works for observers, it should be on a per-player basis as long as the other maps 'support' that too.
My impression that ParseCamera
in MapReader.cpp
is unusably broken.
The Player
component also has camera positioning code which appears unused.
The GameView code always focuses on the first CC if there exists one. Thus overwriting the StartingCamera from the (skirmish/scenario/random) map if one exists, reverting its only use case.
Change History (6)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Description: | modified (diff) |
---|---|
Milestone: | Alpha 23 → Backlog |
Priority: | Must Have → Nice to Have |
Perhaps the StartingCamera feature could be used in a campaign where we do have a civic center + a hero somewhere else and it should focus the hero instead.
The feature is still broken in in the map loader, in the simulation and in the gameview afaics. Most maps likely have a starting camera value that should be removed in case the code will sometime prefer the starting camera of players specified in the map.
comment:3 by , 6 years ago
Summary: | Broken camera placement for observers → StartingCamera code broken |
---|
comment:4 by , 6 years ago
nani found a factor of 4 by accident. 4 is TERRAIN_TILE_SIZE
.
So it probably never worked in rmgen because rmgen uses the tile coordinate system, but Terrain.cpp uses a grid that is by the factor TERRAIN_TILE_SIZE
larger.
comment:5 by , 5 years ago
Component: | UI & Simulation → In-game UI |
---|
Move tickets to In-game UI
as UI & Simulation
got some sub components.
When starting Sicila Nomad in observermode we have the same issue. Since that is not a random map, the problem is unrelated from the
rmgen/
camera centring removal and it certainly can be reproduced in alpha 22.Still don't see the use in this StartingCamera feature at all, so it should be removed and the camera should always center in observermode (independent of maptype).