mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-14 06:58:07 +00:00
Actor Viewer: Added controls for wireframe, background colour, move-when-walking. Reduced CPU usage when 'playing' things with no animation.
Color: Moved SColor* structs into SColor.h, so they can be used without indirectly including CVector[34]D. Terrain: Added 'base colour', for the Actor Viewer to be able to modulate the colour of normally-white terrain. Removed some "using namespace std" (because it doesn't make the code easier to read, and it defeats the point of namespaces, and the rest of the code doesn't do it). This was SVN commit r4392.
This commit is contained in:
@@ -31,10 +31,9 @@
|
||||
#include "TechnologyCollection.h"
|
||||
#include "TerritoryManager.h"
|
||||
|
||||
extern int g_xres, g_yres;
|
||||
|
||||
#include <algorithm>
|
||||
using namespace std;
|
||||
|
||||
extern int g_xres, g_yres;
|
||||
|
||||
CEntity::CEntity( CEntityTemplate* base, CVector3D position, float orientation, const std::set<CStr8>& actorSelections, const CStrW* building )
|
||||
{
|
||||
@@ -510,13 +509,13 @@ void CEntity::update( size_t timestep )
|
||||
|
||||
void CEntity::updateCollisionPatch()
|
||||
{
|
||||
vector<CEntity*>* newPatch = g_EntityManager.getCollisionPatch( this );
|
||||
std::vector<CEntity*>* newPatch = g_EntityManager.getCollisionPatch( this );
|
||||
if( newPatch != m_collisionPatch )
|
||||
{
|
||||
if( m_collisionPatch )
|
||||
{
|
||||
// remove ourselves from old patch
|
||||
vector<CEntity*>& old = *m_collisionPatch;
|
||||
std::vector<CEntity*>& old = *m_collisionPatch;
|
||||
if( old.size() == 1 )
|
||||
{
|
||||
// we were the only ones there, just pop us
|
||||
@@ -925,7 +924,7 @@ float CEntity::getAnchorLevel( float x, float z )
|
||||
}
|
||||
else
|
||||
{
|
||||
return max( groundLevel, g_Renderer.GetWaterManager()->m_WaterHeight );
|
||||
return std::max( groundLevel, g_Renderer.GetWaterManager()->m_WaterHeight );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user