Skip to content
Permalink
Browse files

Disable camera before start

  • Loading branch information
borodust committed Apr 24, 2017
1 parent f5dda29 commit c279bc8e8c45537a7700f2a9fb9bcef6b890cf6b
Showing with 14 additions and 9 deletions.
  1. +1 −1 client/src/camera.lisp
  2. +13 −8 client/src/main.lisp
@@ -1,7 +1,7 @@
(in-package :mortar-combat)


(defclass player-camera (camera-node)
(defclass player-camera (enableable-node camera-node)
((player :initarg :player :initform nil :accessor player-of)
(front-gaze :initform (vec3 0.0 0.0 -1.0))))

@@ -49,12 +49,11 @@
(server (make-game-server new-arena)))
(run (>> (register-game-stream server (server-identity-id identity))
(create-arena remote-server name)
(assembly-flow 'player-node :player (player-of new-arena))
(-> ((mortar-combat)) (player)
(-> ((mortar-combat)) ()
(setf arena new-arena
game-server server)
(update-player-camera scene arena)
(adopt (find-node (root-of scene) :dude-group) player))
(update-player-camera scene arena))
(player-adding-flow new-arena scene)
(-> ((host)) ()
(lock-cursor)))))))

@@ -63,19 +62,25 @@
(create-combat-arena name))


(defun player-adding-flow (arena scene)
(>> (assembly-flow 'player-node :player (player-of arena))
(-> ((mortar-combat)) (player)
(adopt (find-node (root-of scene) :dude-group) player)
(enable-node (find-node (root-of scene) :camera)))))


(defun join-combat-arena (name)
(with-slots (remote-server identity game-client arena scene) (mortar-combat)
(let* ((new-arena (make-instance 'arena :player-name (server-identity-name identity)))
(client (make-game-client new-arena)))
(run (>> (register-game-stream client (server-identity-id identity))
(join-arena remote-server name)
(assembly-flow 'player-node :player (player-of new-arena))
(-> ((mortar-combat)) (player)
(-> ((mortar-combat)) ()
(setf arena new-arena
game-client client)
(update-player-camera scene arena)
(adopt (find-node (root-of scene) :dude-group) player)
(register-player client (server-identity-name identity)))
(player-adding-flow new-arena scene)
(-> ((host)) ()
(lock-cursor)))))))

@@ -104,7 +109,7 @@
(transform-node
((scene-node :name :arena)
((projection-node :aspect (/ 800 600))
((player-camera :name :camera)
((player-camera :name :camera :enabled-p nil)
(room-model)
((scene-node :name :ball-group))
((scene-node :name :dude-group)))))

0 comments on commit c279bc8

Please sign in to comment.
You can’t perform that action at this time.