Merge branch 'master' of https://github.com/supertuxkart/stk-code
This commit is contained in:
17
TODO.md
17
TODO.md
@@ -1,8 +1,5 @@
|
||||
##TODO
|
||||
|
||||
THIS IS A 2nd TEST.
|
||||
THIS IS A TEST.
|
||||
|
||||
SuperTuxKart is looking for additional man power to make this
|
||||
one of the best free linux games out there :) We need (in
|
||||
no particular order):
|
||||
@@ -15,17 +12,13 @@ no particular order):
|
||||
- Create additional art work for tracks,
|
||||
background images
|
||||
3. Developers
|
||||
- See todo list below - it's rather long at the moment :)
|
||||
4. Web master
|
||||
- Check our bug and enhancement request tracker on
|
||||
https://github.com/supertuxkart/stk-code/issues
|
||||
- Extend the current web page, keep it up to date
|
||||
5. Tester
|
||||
4. Tester
|
||||
- For just about everything
|
||||
- Esp. different platforms
|
||||
6. Package creators
|
||||
- Create packages for
|
||||
- most common Linux distributions
|
||||
- Windows
|
||||
7. Writers
|
||||
- Esp. different platforms and graphics cards
|
||||
5. Writers
|
||||
- Write documentation, ranging from man page, to
|
||||
a description for the web, to a design document, ...
|
||||
|
||||
|
||||
BIN
data/CREDITS
BIN
data/CREDITS
Binary file not shown.
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!-- For sky particles, the size of the box is ignored -->
|
||||
<particles emitter="box" box_x="0.1" box_y="0.5" box_z="0.1">
|
||||
<particles emitter="sphere" radius="0.5">
|
||||
|
||||
<spreading angle="30" />
|
||||
<spreading angle="5" />
|
||||
|
||||
<velocity x="-0.000"
|
||||
y="0.002"
|
||||
@@ -16,7 +16,7 @@
|
||||
max="50" />
|
||||
|
||||
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
|
||||
<lifetime min="3000"
|
||||
<lifetime min="1000"
|
||||
max="3000" />
|
||||
|
||||
<!-- Size of the particles -->
|
||||
|
||||
@@ -121,25 +121,36 @@ Camera::~Camera()
|
||||
*/
|
||||
void Camera::applyMouseMovement (float x, float y)
|
||||
{
|
||||
core::vector3df direction(m_target_direction);
|
||||
core::vector3df up(m_camera->getUpVector());
|
||||
vector3df direction(m_target_direction);
|
||||
vector3df up(m_camera->getUpVector());
|
||||
|
||||
// Set local values if the camera is attached to the kart
|
||||
if (m_attached)
|
||||
up = m_local_up;
|
||||
|
||||
core::vector3df side(direction.crossProduct(up));
|
||||
|
||||
direction.normalize();
|
||||
up.normalize();
|
||||
core::quaternion quat;
|
||||
quat.fromAngleAxis(x, up);
|
||||
|
||||
core::quaternion quat_y;
|
||||
quat_y.fromAngleAxis(y, side);
|
||||
quat *= quat_y;
|
||||
vector3df side(direction.crossProduct(up));
|
||||
side.normalize();
|
||||
core::quaternion quat;
|
||||
quat.fromAngleAxis(y, side);
|
||||
|
||||
core::quaternion quat_x;
|
||||
quat_x.fromAngleAxis(x, up);
|
||||
quat *= quat_x;
|
||||
|
||||
direction = quat * direction;
|
||||
// Try to prevent toppling over
|
||||
// If the camera would topple over with the next movement, the vertical
|
||||
// movement gets reset close to the up vector
|
||||
if ((direction - up).getLengthSQ() + (m_target_direction - up).getLengthSQ()
|
||||
<= (direction - m_target_direction).getLengthSQ())
|
||||
direction = quat_x * ((m_target_direction - up).setLength(0.02f) + up);
|
||||
// Prevent toppling under
|
||||
else if ((direction + up).getLengthSQ() + (m_target_direction + up).getLengthSQ()
|
||||
<= (direction - m_target_direction).getLengthSQ())
|
||||
direction = quat_x * ((m_target_direction + up).setLength(0.02f) - up);
|
||||
m_target_direction = direction;
|
||||
|
||||
// Don't do that because it looks ugly and is bad to handle ;)
|
||||
@@ -534,10 +545,10 @@ void Camera::update(float dt)
|
||||
// Update the first person camera
|
||||
else if (UserConfigParams::m_camera_debug == 3)
|
||||
{
|
||||
core::vector3df direction(m_camera->getTarget() - m_camera->getPosition());
|
||||
core::vector3df up(m_camera->getUpVector());
|
||||
core::vector3df side(direction.crossProduct(up));
|
||||
core::vector3df pos = m_camera->getPosition();
|
||||
vector3df direction(m_camera->getTarget() - m_camera->getPosition());
|
||||
vector3df up(m_camera->getUpVector());
|
||||
vector3df side(direction.crossProduct(up));
|
||||
vector3df pos = m_camera->getPosition();
|
||||
|
||||
// Set local values if the camera is attached to the kart
|
||||
if (m_attached)
|
||||
@@ -615,9 +626,12 @@ void Camera::update(float dt)
|
||||
up.normalize();
|
||||
side.normalize();
|
||||
|
||||
// Top vector is the real up vector, not the one used by the camera
|
||||
vector3df top(side.crossProduct(direction));
|
||||
|
||||
// Move camera
|
||||
core::vector3df movement(direction * m_lin_velocity.Z +
|
||||
up * m_lin_velocity.Y + side * m_lin_velocity.X);
|
||||
vector3df movement(direction * m_lin_velocity.Z +
|
||||
top * m_lin_velocity.Y + side * m_lin_velocity.X);
|
||||
pos = pos + movement * dt;
|
||||
|
||||
if (m_attached)
|
||||
|
||||
@@ -206,6 +206,28 @@ void InputManager::handleStaticAction(int key, int value)
|
||||
cam->setLinearVelocity(vel);
|
||||
break;
|
||||
}
|
||||
case KEY_KEY_R:
|
||||
{
|
||||
if (!world || !UserConfigParams::m_artist_debug_mode ||
|
||||
UserConfigParams::m_camera_debug != 3) break;
|
||||
|
||||
Camera *cam = Camera::getActiveCamera();
|
||||
core::vector3df vel(cam->getLinearVelocity());
|
||||
vel.Y = value ? cam->getMaximumVelocity() : 0;
|
||||
cam->setLinearVelocity(vel);
|
||||
break;
|
||||
}
|
||||
case KEY_KEY_F:
|
||||
{
|
||||
if (!world || !UserConfigParams::m_artist_debug_mode ||
|
||||
UserConfigParams::m_camera_debug != 3) break;
|
||||
|
||||
Camera *cam = Camera::getActiveCamera();
|
||||
core::vector3df vel(cam->getLinearVelocity());
|
||||
vel.Y = value ? -cam->getMaximumVelocity() : 0;
|
||||
cam->setLinearVelocity(vel);
|
||||
break;
|
||||
}
|
||||
// Rotating the first person camera
|
||||
case KEY_KEY_Q:
|
||||
{
|
||||
|
||||
@@ -520,6 +520,10 @@ bool onEvent(const SEvent &event)
|
||||
{
|
||||
UserConfigParams::m_camera_debug = 3;
|
||||
irr_driver->getDevice()->getCursorControl()->setVisible(false);
|
||||
// Reset camera rotation
|
||||
Camera *cam = Camera::getActiveCamera();
|
||||
cam->setDirection(vector3df(0, 0, 1));
|
||||
cam->setUpVector(vector3df(0, 1, 0));
|
||||
}
|
||||
else if (cmdID == DEBUG_GUI_CAM_NORMAL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user