From: <no...@so...> - 2002-05-26 01:20:53
|
Patches item #559690, was opened at 2002-05-23 15:47 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=303248&aid=559690&group_id=3248 Category: BZFlag Group: None Status: Open Resolution: None Priority: 5 Submitted By: Frank Thilo (chestal) Assigned to: Tim Riker (timriker) Summary: roaming for observers Initial Comment: This patch enables roaming for observers. Roaming is a feature which allows you to watch a game of bzflag from an arbitrary position. It has always been part oz bzflag but wasn't enabled by default. Now, with observers, it becomes a very useful feature. With this patch, an observer will be in roamign mode always, whereas a normal player will not able to use roaming. I also changed the keys used for roaming and added some features: There are 4 roaming modes: free, tracking, following and first person view: Free mode lets you move your camera freelyin 3D space. This is done using the cursor keys. Left and right cursor will roatte the camera, cursor up wil tilt it down, and cursor down will tilt it up. If ou hold shift, the cursor keys will move the camera to the left, right, forward and back. If you press hold alt, cursor up and down will move the camera up and down, respectively. By pressing F8, you can change the roaming mode to tracking. In this mode, you can still move your camera freely, but it will automatically look at the targeted tank. F6 and F7 will cycle through all possible targets (tanks). Pressing F8 again will enter follow mode. Here, the camera will be following a tank closely. One more press on F8 finally goes into first person mode. Here the camera will be positioned inside the tank, so you'll get a first person view. Pressing F8 then returns you to free roaming mode. I also changed the HUD to display differently in roaming mode. It will now say that you are roaming or tracking which player. Roamign isn't perfect with this patch, there is still much room for improvement (camera should have some inertia to avoid jumping, usign the mouse to rotate camera would be nice). But it's definitely very nice when observing. ---------------------------------------------------------------------- >Comment By: Dave Brosius (dbrosius) Date: 2002-05-26 01:20 Message: Logged In: YES user_id=66596 This prolly works. void TankSceneNode::setHidden(boolean _hidden) { hidden = _hidden; if (hidden) invisible = False; } ---------------------------------------------------------------------- Comment By: Dave Brosius (dbrosius) Date: 2002-05-26 00:33 Message: Logged In: YES user_id=66596 Chestal, Roaming code added a bug, that you can now see any cloaked player (whether or not you're in roaming mode). Playing.cxx line 4038 // add other tanks and shells const boolean colorblind = (myTank->getFlag() == ColorblindnessFlag); for (i = 0; i < maxPlayers; i++) if (player[i]) { player[i]->updateSparks(dt); player[i]->addShots(scene, colorblind); player[i]->addPlayer(scene, colorblind, True); player[i]->setInvisible(player[i]->getFlag() == CloakingFlag); player[i]->setHidden(roaming && roamView == roamViewFP && roamTrackTank == i); } -- setHidden turns invisible OFF maybe do setHidden before setInvisible ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=303248&aid=559690&group_id=3248 |