[colobot] 31/145: First person camera unlocked for Me and Tech

Didier Raboud odyx at moszumanska.debian.org
Mon Jul 11 12:56:14 UTC 2016


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 6afdb7b6c898c861fd6b6f30a69c7bd7fa267ebd
Author: Smok94 <tor94 at o2.pl>
Date:   Sat Apr 2 14:43:40 2016 +0200

    First person camera unlocked for Me and Tech
    
    *unlocked camaera button for Me and Tech
    *unlocked first ferson view for Me and Tech
    *Me and Tech have no "camera view" effect like robots in first person
    mode
    
    #156
---
 src/level/robotmain.cpp     |  4 +++-
 src/ui/object_interface.cpp | 55 ++++++++++++++++++++++++---------------------
 2 files changed, 33 insertions(+), 26 deletions(-)

diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index d7f71be..274118b 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -2270,7 +2270,9 @@ void CRobotMain::ChangeCamera()
     ObjectType oType = obj->GetType();
     Gfx::CameraType type = controllableObj->GetCameraType();
 
-    if ( oType != OBJECT_MOBILEfa &&
+    if ( oType != OBJECT_HUMAN &&
+         oType != OBJECT_TECH &&
+         oType != OBJECT_MOBILEfa &&
          oType != OBJECT_MOBILEta &&
          oType != OBJECT_MOBILEwa &&
          oType != OBJECT_MOBILEia &&
diff --git a/src/ui/object_interface.cpp b/src/ui/object_interface.cpp
index 81a6800..c2ed098 100644
--- a/src/ui/object_interface.cpp
+++ b/src/ui/object_interface.cpp
@@ -1302,8 +1302,9 @@ bool CObjectInterface::CreateInterface(bool bSelect)
         pw->CreateButton(pos, ddim, 19, EVENT_OBJECT_HELP);
     }
 
-    if ( type != OBJECT_HUMAN       &&
-         type != OBJECT_TECH        &&
+//camera button no more disabled for humans
+    if ( //type != OBJECT_HUMAN       &&
+         //type != OBJECT_TECH        &&
          !m_object->GetCameraLock() )
     {
 //?     if ( m_main->GetShowMap() )
@@ -1396,29 +1397,33 @@ bool CObjectInterface::CreateInterface(bool bSelect)
         pt->ClearState(STATE_GLINT);
     }
 
-    ddim.x = 64.0f/640.0f;
-    ddim.y = 64.0f/480.0f;
-    pos.x =  30.0f/640.0f;
-    pos.y = 430.0f/480.0f-ddim.y;
-    pw->CreateGroup(pos, ddim, 13, EVENT_OBJECT_CORNERul);
-
-    ddim.x = 64.0f/640.0f;
-    ddim.y = 64.0f/480.0f;
-    pos.x = 610.0f/640.0f-ddim.x;
-    pos.y = 430.0f/480.0f-ddim.y;
-    pw->CreateGroup(pos, ddim, 14, EVENT_OBJECT_CORNERur);
-
-    ddim.x = 64.0f/640.0f;
-    ddim.y = 64.0f/480.0f;
-    pos.x =  30.0f/640.0f;
-    pos.y = 110.0f/480.0f;
-    pw->CreateGroup(pos, ddim, 15, EVENT_OBJECT_CORNERdl);
-
-    ddim.x = 64.0f/640.0f;
-    ddim.y = 64.0f/480.0f;
-    pos.x = 610.0f/640.0f-ddim.x;
-    pos.y = 110.0f/480.0f;
-    pw->CreateGroup(pos, ddim, 16, EVENT_OBJECT_CORNERdr);
+    if (type != OBJECT_HUMAN &&
+        type != OBJECT_TECH)
+    {
+        ddim.x = 64.0f / 640.0f;
+        ddim.y = 64.0f / 480.0f;
+        pos.x = 30.0f / 640.0f;
+        pos.y = 430.0f / 480.0f - ddim.y;
+        pw->CreateGroup(pos, ddim, 13, EVENT_OBJECT_CORNERul);
+
+        ddim.x = 64.0f / 640.0f;
+        ddim.y = 64.0f / 480.0f;
+        pos.x = 610.0f / 640.0f - ddim.x;
+        pos.y = 430.0f / 480.0f - ddim.y;
+        pw->CreateGroup(pos, ddim, 14, EVENT_OBJECT_CORNERur);
+
+        ddim.x = 64.0f / 640.0f;
+        ddim.y = 64.0f / 480.0f;
+        pos.x = 30.0f / 640.0f;
+        pos.y = 110.0f / 480.0f;
+        pw->CreateGroup(pos, ddim, 15, EVENT_OBJECT_CORNERdl);
+
+        ddim.x = 64.0f / 640.0f;
+        ddim.y = 64.0f / 480.0f;
+        pos.x = 610.0f / 640.0f - ddim.x;
+        pos.y = 110.0f / 480.0f;
+        pw->CreateGroup(pos, ddim, 16, EVENT_OBJECT_CORNERdr);
+    }
 
     UpdateInterface();
     m_lastUpdateTime = 0.0f;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list