#1827 closed defect (fixed)
[PATCH] It's possible to camera-follow enemy units, even into the FoW
Reported by: | zoot | Owned by: | leper |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 13 |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
Steps to reproduce:
- Select an enemy unit.
- Press 'F'.
What happens: The camera follows the enemy unit, even after it has passed into the fog of war.
What I expected to happen: The camera should not follow when the selected unit is an enemy.
Attachments (1)
Change History (13)
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
comment:3 by , 11 years ago
Summary: | It is possible to camera-follow enemy units → It's possible to camera-follow enemy units, even into the FoW |
---|
comment:4 by , 11 years ago
Priority: | Should Have → Must Have |
---|
This is more usefully exploitable by setting a control group for the enemy. Double tapping the group number will then follow the unit even in FoW.
comment:5 by , 11 years ago
Milestone: | Backlog → Alpha 13 |
---|
by , 11 years ago
Attachment: | GameView.cpp.patch added |
---|
comment:6 by , 11 years ago
Hi guys
I am new to game developement and thought that contributing to 0ad might be a great opportunity to get some experience. I was looking for a simple task to start and I thought I might try to fix this bug.
Also, I think I fixed a little typo in that file.
comment:7 by , 11 years ago
Keywords: | review patch added |
---|---|
Summary: | It's possible to camera-follow enemy units, even into the FoW → [PATCH] It's possible to camera-follow enemy units, even into the FoW |
comment:8 by , 11 years ago
Thanks for taking a shot at this. As far as I can tell, your patch only changes behavior of the camera (GameView
). It might be a good idea to do what feneur suggested and outright deselect the unit when it exits LoS, since otherwise the player can still peek at its health stats etc. in the unit panel, which also counts as an exploit (albeit a lesser one).
follow-up: 10 comment:9 by , 11 years ago
Hey zoot, I can't reproduce the but with selecting unit when it exits LoS. When I built the game, I tested following scenarios:
1) Enemy unit is fighting my unit, I target enemy unit. My unit dies and enemy is no longer visible. Result: Enemy unit is no longer selected.
2) Same as 1), but I clicked "F" to follow enemy unit. I also sent 2nd unit earlier to the battle's location. Result: Camera didn't move. When my 2nd unit came, I could see enemy unit in different position, so camera didn't follow it.
3) Same as 1), but I created a group of enemy unit (CTRL+2) Result: After clicking "2" camera didn't move to enemy unit, neither it selected it.
Maybe someone has already fixed that issue?
comment:10 by , 11 years ago
Replying to crezax:
Hey zoot, I can't reproduce the but with selecting unit when it exits LoS.
Okay, great :) I was just interpreting the code manually, so I likely just read it incorrectly.
Imho it should be possible to follow an enemy unit as well as any other unit. I'd most definitely say that you shouldn't be able to follow it after it passes into the Fog-of-War. I'm assuming this should be possible to fix by automatically deselecting any unit which can't be seen, which would apply to more cases than the follow. I'm not going to change this ticket or open a new at the moment though as we'd need to decide whether we want the player to be able to follow enemy units first.