Merge branch 'development' into defineconsolemethod

Conflicts:
	Engine/source/materials/materialDefinition.cpp
This commit is contained in:
Daniel Buckmaster 2014-12-26 13:22:16 +11:00
commit ae284a89ec
129 changed files with 3742 additions and 1038 deletions

View file

@ -388,7 +388,9 @@ F32 GameBase::getUpdatePriority(CameraScopeQuery *camInfo, U32 updateMask, S32 u
// Weight by field of view, objects directly in front
// will be weighted 1, objects behind will be 0
F32 dot = mDot(pos,camInfo->orientation);
bool inFov = dot > camInfo->cosFov;
bool inFov = dot > camInfo->cosFov * 1.5f;
F32 wFov = inFov? 1.0f: 0;
// Weight by linear velocity parallel to the viewing plane
@ -406,7 +408,7 @@ F32 GameBase::getUpdatePriority(CameraScopeQuery *camInfo, U32 updateMask, S32 u
// Weight by interest.
F32 wInterest;
if (getTypeMask() & PlayerObjectType)
if (getTypeMask() & (PlayerObjectType || VehicleObjectType ))
wInterest = 0.75f;
else if (getTypeMask() & ProjectileObjectType)
{

View file

@ -35,6 +35,10 @@
#ifndef _DYNAMIC_CONSOLETYPES_H_
#include "console/dynamicTypes.h"
#endif
#ifndef __SCENEMANAGER_H__
#include "scene/sceneManager.h"
#define __SCENEMANAGER_H__
#endif
class NetConnection;
class ProcessList;

View file

@ -226,6 +226,8 @@ GameConnection::GameConnection()
mAddYawToAbsRot = false;
mAddPitchToAbsRot = false;
mVisibleGhostDistance = 0.0f;
clearDisplayDevice();
}
@ -240,6 +242,16 @@ GameConnection::~GameConnection()
//----------------------------------------------------------------------------
void GameConnection::setVisibleGhostDistance(F32 dist)
{
mVisibleGhostDistance = dist;
}
F32 GameConnection::getVisibleGhostDistance()
{
return mVisibleGhostDistance;
}
bool GameConnection::canRemoteCreate()
{
return true;
@ -2199,3 +2211,21 @@ DefineEngineMethod( GameConnection, getControlSchemeAbsoluteRotation, bool, (),,
{
return object->getControlSchemeAbsoluteRotation();
}
DefineEngineMethod( GameConnection, setVisibleGhostDistance, void, (F32 dist),,
"@brief Sets the distance that objects around it will be ghosted. If set to 0, "
"it may be defined by the LevelInfo.\n\n"
"@dist - is the max distance\n\n"
)
{
object->setVisibleGhostDistance(dist);
}
DefineEngineMethod( GameConnection, getVisibleGhostDistance, F32, (),,
"@brief Gets the distance that objects around the connection will be ghosted.\n\n"
"@return S32 of distance.\n\n"
)
{
return object->getVisibleGhostDistance();
}

View file

@ -72,6 +72,8 @@ private:
U32 mMissionCRC; // crc of the current mission file from the server
F32 mVisibleGhostDistance;
private:
U32 mLastControlRequestTime;
S32 mDataBlockModifiedKey;
@ -155,6 +157,9 @@ public:
bool canRemoteCreate();
void setVisibleGhostDistance(F32 dist);
F32 getVisibleGhostDistance();
private:
/// @name Connection State
/// This data is set with setConnectArgs() and setJoinPassword(), and