mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 19:52:26 +02:00
Merge remote-tracking branch 'upstream/master' into agentlist-array
This commit is contained in:
commit
cdb8b1b144
4 changed files with 10 additions and 22 deletions
|
@ -384,28 +384,22 @@ void Avatar::simulate(float deltaTime) {
|
||||||
_thrust = glm::vec3( 0.0, 0.0, 0.0 );
|
_thrust = glm::vec3( 0.0, 0.0, 0.0 );
|
||||||
|
|
||||||
if (_driveKeys[FWD]) {
|
if (_driveKeys[FWD]) {
|
||||||
glm::vec3 front( _orientation.getFront().x, _orientation.getFront().y, _orientation.getFront().z );
|
_thrust += _orientation.getFront() * THRUST_MAG;
|
||||||
_thrust += front * THRUST_MAG;
|
|
||||||
}
|
}
|
||||||
if (_driveKeys[BACK]) {
|
if (_driveKeys[BACK]) {
|
||||||
glm::vec3 front( _orientation.getFront().x, _orientation.getFront().y, _orientation.getFront().z );
|
_thrust -= _orientation.getFront() * THRUST_MAG;
|
||||||
_thrust -= front * THRUST_MAG;
|
|
||||||
}
|
}
|
||||||
if (_driveKeys[RIGHT]) {
|
if (_driveKeys[RIGHT]) {
|
||||||
glm::vec3 right( _orientation.getRight().x, _orientation.getRight().y, _orientation.getRight().z );
|
_thrust += _orientation.getRight() * THRUST_MAG;
|
||||||
_thrust += right * THRUST_MAG;
|
|
||||||
}
|
}
|
||||||
if (_driveKeys[LEFT]) {
|
if (_driveKeys[LEFT]) {
|
||||||
glm::vec3 right( _orientation.getRight().x, _orientation.getRight().y, _orientation.getRight().z );
|
_thrust -= _orientation.getRight() * THRUST_MAG;
|
||||||
_thrust -= right * THRUST_MAG;
|
|
||||||
}
|
}
|
||||||
if (_driveKeys[UP]) {
|
if (_driveKeys[UP]) {
|
||||||
glm::vec3 up( _orientation.getUp().x, _orientation.getUp().y, _orientation.getUp().z );
|
_thrust += _orientation.getUp() * THRUST_MAG;
|
||||||
_thrust += up * THRUST_MAG;
|
|
||||||
}
|
}
|
||||||
if (_driveKeys[DOWN]) {
|
if (_driveKeys[DOWN]) {
|
||||||
glm::vec3 up( _orientation.getUp().x, _orientation.getUp().y, _orientation.getUp().z );
|
_thrust -= _orientation.getUp() * THRUST_MAG;
|
||||||
_thrust -= up * THRUST_MAG;
|
|
||||||
}
|
}
|
||||||
if (_driveKeys[ROT_RIGHT]) {
|
if (_driveKeys[ROT_RIGHT]) {
|
||||||
_bodyYawDelta -= YAW_MAG * deltaTime;
|
_bodyYawDelta -= YAW_MAG * deltaTime;
|
||||||
|
@ -1210,4 +1204,4 @@ void Avatar::processTransmitterData(unsigned char* packetData, int numBytes) {
|
||||||
addVelocity(linVel);
|
addVelocity(linVel);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,10 +161,6 @@ namespace starfield {
|
||||||
#if STARFIELD_HEMISPHERE_ONLY
|
#if STARFIELD_HEMISPHERE_ONLY
|
||||||
altitude = std::max(0.0f, altitude);
|
altitude = std::max(0.0f, altitude);
|
||||||
#endif
|
#endif
|
||||||
unsigned tileIndex =
|
|
||||||
_objTiling.getTileIndex(azimuth, altitude);
|
|
||||||
|
|
||||||
// printLog("Stars.cpp: starting on tile #%d\n", tileIndex);
|
|
||||||
|
|
||||||
#if STARFIELD_DEBUG_CULLING
|
#if STARFIELD_DEBUG_CULLING
|
||||||
mat4 matrix_debug = glm::translate(glm::frustum(-hw, hw, -hh, hh, nearClip, 10.0f),
|
mat4 matrix_debug = glm::translate(glm::frustum(-hw, hw, -hh, hh, nearClip, 10.0f),
|
||||||
|
|
|
@ -171,10 +171,8 @@ int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) {
|
||||||
return sourceBuffer - startPosition;
|
return sourceBuffer - startPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 AvatarData::getPosition() {
|
const glm::vec3& AvatarData::getPosition() const {
|
||||||
return glm::vec3(_position.x,
|
return _position;
|
||||||
_position.y,
|
|
||||||
_position.z);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AvatarData::setPosition(glm::vec3 position) {
|
void AvatarData::setPosition(glm::vec3 position) {
|
||||||
|
|
|
@ -20,7 +20,7 @@ public:
|
||||||
|
|
||||||
AvatarData* clone() const;
|
AvatarData* clone() const;
|
||||||
|
|
||||||
glm::vec3 getPosition();
|
const glm::vec3& getPosition() const;
|
||||||
void setPosition(glm::vec3 position);
|
void setPosition(glm::vec3 position);
|
||||||
void setHandPosition(glm::vec3 handPosition);
|
void setHandPosition(glm::vec3 handPosition);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue