Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Core/GameEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ set(GAMEENGINE_SRC
# Include/Common/UnitTimings.h
# Include/Common/Upgrade.h
#Include/Common/urllaunch.h # unused
# Include/Common/UserPreferences.h
Include/Common/UserPreferences.h
# Include/Common/version.h
# Include/Common/WellKnownKeys.h
Include/Common/WorkerProcess.h
Expand Down Expand Up @@ -688,7 +688,7 @@ set(GAMEENGINE_SRC
# Source/Common/Thing/Thing.cpp
# Source/Common/Thing/ThingFactory.cpp
# Source/Common/Thing/ThingTemplate.cpp
# Source/Common/UserPreferences.cpp
Source/Common/UserPreferences.cpp
# Source/Common/version.cpp
Source/Common/WorkerProcess.cpp
# Source/GameClient/ClientInstance.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ AsciiString CustomMatchPreferences::getPreferredMap(void)
AsciiString ret;
CustomMatchPreferences::const_iterator it = find("Map");
if (it == end())
{ //found find map, use default instead
{ //map not found, use default instead
ret = getDefaultOfficialMap();
return ret;
}
Expand Down Expand Up @@ -814,6 +814,7 @@ Int GameSpyMiscPreferences::getMaxMessagesPerUpdate( void )
{
return getInt("MaxMessagesPerUpdate", 100);
}

//-----------------------------------------------------------------------------
// IgnorePreferences base class
//-----------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions Generals/Code/GameEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ set(GAMEENGINE_SRC
# Include/Common/UnicodeString.h
Include/Common/UnitTimings.h
Include/Common/Upgrade.h
Include/Common/UserPreferences.h
# Include/Common/UserPreferences.h
Include/Common/version.h
Include/Common/WellKnownKeys.h
# Include/Common/WorkerProcess.h
Expand Down Expand Up @@ -636,7 +636,7 @@ set(GAMEENGINE_SRC
Source/Common/Thing/Thing.cpp
Source/Common/Thing/ThingFactory.cpp
Source/Common/Thing/ThingTemplate.cpp
Source/Common/UserPreferences.cpp
# Source/Common/UserPreferences.cpp
Source/Common/version.cpp
# Source/Common/WorkerProcess.cpp
Source/GameClient/ClientInstance.cpp
Expand Down
3 changes: 3 additions & 0 deletions Generals/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class GlobalData : public SubsystemInterface
Bool m_useTrees;
Bool m_useTreeSway;
Bool m_useDrawModuleLOD;
Bool m_useHeatEffects;
Bool m_useFpsLimit;
Bool m_dumpAssetUsage;
Int m_framesPerSecondLimit;
Expand Down Expand Up @@ -138,6 +139,8 @@ class GlobalData : public SubsystemInterface
Bool m_enableStaticLOD;
Int m_terrainLODTargetTimeMS;
Bool m_useAlternateMouse;
Bool m_clientRetaliationModeEnabled;
Bool m_doubleClickAttackMove;
Bool m_rightMouseAlwaysScrolls;
Bool m_useWaterPlane;
Bool m_useCloudPlane;
Expand Down
2 changes: 2 additions & 0 deletions Generals/Code/GameEngine/Include/Common/PlayerTemplate.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class PlayerTemplate

AsciiString getLoadScreenMusic( void ) const {return m_loadScreenMusic; }

Bool isOldFaction( void ) const { return m_oldFaction; }

static const FieldParse* getFieldParse();

Expand Down Expand Up @@ -162,6 +163,7 @@ class PlayerTemplate
AsciiString m_tooltip; ///< The tooltip describing this player template
Bool m_observer;
Bool m_playableSide;
Bool m_oldFaction; ///< Faction existed in the original Generals

Int m_intrinsicSPP;

Expand Down
175 changes: 0 additions & 175 deletions Generals/Code/GameEngine/Include/Common/UserPreferences.h

This file was deleted.

13 changes: 9 additions & 4 deletions Generals/Code/GameEngine/Source/Common/GlobalData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ GlobalData* GlobalData::m_theOriginal = nullptr;
{ "MaxTranslucentObjects", INI::parseInt, nullptr, offsetof( GlobalData, m_maxVisibleTranslucentObjects) },
{ "OccludedColorLuminanceScale", INI::parseReal, nullptr, offsetof( GlobalData, m_occludedLuminanceScale) },

/* These are internal use only, they do not need file definitons
/* These are internal use only, they do not need file definitions
{ "TerrainAmbientRGB", INI::parseRGBColor, nullptr, offsetof( GlobalData, m_terrainAmbient ) },
{ "TerrainDiffuseRGB", INI::parseRGBColor, nullptr, offsetof( GlobalData, m_terrainDiffuse ) },
{ "TerrainLightPos", INI::parseCoord3D, nullptr, offsetof( GlobalData, m_terrainLightPos ) },
Expand All @@ -331,7 +331,7 @@ GlobalData* GlobalData::m_theOriginal = nullptr;
{ "VideoOn", INI::parseBool, nullptr, offsetof( GlobalData, m_videoOn ) },
{ "DisableCameraMovements", INI::parseBool, nullptr, offsetof( GlobalData, m_disableCameraMovement ) },

/* These are internal use only, they do not need file definitons
/* These are internal use only, they do not need file definitions
/// @todo remove this hack
{ "InGame", INI::parseBool, nullptr, offsetof( GlobalData, m_inGame ) },
*/
Expand Down Expand Up @@ -365,7 +365,7 @@ GlobalData* GlobalData::m_theOriginal = nullptr;
{ "AutoAflameParticleSystem", INI::parseAsciiString, nullptr, offsetof( GlobalData, m_autoAflameParticleSystem ) },
{ "AutoAflameParticleMax", INI::parseInt, nullptr, offsetof( GlobalData, m_autoAflameParticleMax ) },

/* These are internal use only, they do not need file definitons
/* These are internal use only, they do not need file definitions
{ "LatencyAverage", INI::parseInt, nullptr, offsetof( GlobalData, m_latencyAverage ) },
{ "LatencyAmplitude", INI::parseInt, nullptr, offsetof( GlobalData, m_latencyAmplitude ) },
{ "LatencyPeriod", INI::parseInt, nullptr, offsetof( GlobalData, m_latencyPeriod ) },
Expand Down Expand Up @@ -621,6 +621,7 @@ GlobalData::GlobalData()
m_useTrees = 0;
m_useTreeSway = TRUE;
m_useDrawModuleLOD = FALSE;
m_useHeatEffects = TRUE;
m_useFpsLimit = FALSE;
m_dumpAssetUsage = FALSE;
m_framesPerSecondLimit = 0;
Expand Down Expand Up @@ -1027,6 +1028,8 @@ GlobalData::GlobalData()

m_keyboardCameraRotateSpeed = 0.1f;

m_clientRetaliationModeEnabled = TRUE; //On by default.

}

//-------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -1182,7 +1185,9 @@ void GlobalData::parseGameDataDefinition( INI* ini )

// override INI values with user preferences
OptionPreferences optionPref;
TheWritableGlobalData->m_useAlternateMouse = optionPref.getAlternateMouseModeEnabled();
TheWritableGlobalData->m_useAlternateMouse = optionPref.getAlternateMouseModeEnabled();
TheWritableGlobalData->m_clientRetaliationModeEnabled = optionPref.getRetaliationModeEnabled();
TheWritableGlobalData->m_doubleClickAttackMove = optionPref.getDoubleClickAttackMoveEnabled();
TheWritableGlobalData->m_keyboardScrollFactor = optionPref.getScrollFactor();
TheWritableGlobalData->m_drawScrollAnchor = optionPref.getDrawScrollAnchor();
TheWritableGlobalData->m_moveScrollAnchor = optionPref.getMoveScrollAnchor();
Expand Down
2 changes: 2 additions & 0 deletions Generals/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
{ "SpecialPowerShortcutWinName" ,INI::parseAsciiString, nullptr, offsetof( PlayerTemplate, m_specialPowerShortcutWinName) },
{ "SpecialPowerShortcutButtonCount",INI::parseInt, nullptr, offsetof( PlayerTemplate, m_specialPowerShortcutButtonCount ) },
{ "IsObserver", INI::parseBool, nullptr, offsetof( PlayerTemplate, m_observer ) },
{ "OldFaction", INI::parseBool, nullptr, offsetof( PlayerTemplate, m_oldFaction ) },
{ "IntrinsicSciencePurchasePoints", INI::parseInt, nullptr, offsetof( PlayerTemplate, m_intrinsicSPP ) },
{ "ScoreScreenImage", INI::parseAsciiString, nullptr, offsetof( PlayerTemplate, m_scoreScreenImage ) },
{ "LoadScreenImage", INI::parseAsciiString, nullptr, offsetof( PlayerTemplate, m_loadScreenImage ) },
Expand Down Expand Up @@ -183,6 +184,7 @@ PlayerTemplate::PlayerTemplate() :
m_nameKey(NAMEKEY_INVALID),
m_observer(false),
m_playableSide(false),
m_oldFaction(false),
m_intrinsicSPP(0),
m_specialPowerShortcutButtonCount(0)
{
Expand Down
Loading
Loading