Skip to content

Commit 15ebb79

Browse files
committed
Implement up to 8 turrets
1 parent fe1fbc7 commit 15ebb79

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

GeneralsMD/Code/GameEngine/Include/Common/GameCommon.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,12 @@ enum WhichTurretType CPP_11(: Int)
488488

489489
TURRET_MAIN = 0,
490490
TURRET_ALT,
491+
TURRET_3,
492+
TURRET_4,
493+
TURRET_5,
494+
TURRET_6,
495+
TURRET_7,
496+
TURRET_8,
491497

492498
MAX_TURRETS
493499
};

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@ const LocomotorTemplateVector* AIUpdateModuleData::findLocomotorTemplateVector(L
133133
{
134134
{ "Turret", AIUpdateModuleData::parseTurret, NULL, offsetof(AIUpdateModuleData, m_turretData[0]) },
135135
{ "AltTurret", AIUpdateModuleData::parseTurret, NULL, offsetof(AIUpdateModuleData, m_turretData[1]) },
136+
{ "Turret1", AIUpdateModuleData::parseTurret, NULL, offsetof(AIUpdateModuleData, m_turretData[0]) },
137+
{ "Turret2", AIUpdateModuleData::parseTurret, NULL, offsetof(AIUpdateModuleData, m_turretData[1]) },
138+
{ "Turret3", AIUpdateModuleData::parseTurret, NULL, offsetof(AIUpdateModuleData, m_turretData[2]) },
139+
{ "Turret4", AIUpdateModuleData::parseTurret, NULL, offsetof(AIUpdateModuleData, m_turretData[3]) },
140+
{ "Turret5", AIUpdateModuleData::parseTurret, NULL, offsetof(AIUpdateModuleData, m_turretData[4]) },
141+
{ "Turret6", AIUpdateModuleData::parseTurret, NULL, offsetof(AIUpdateModuleData, m_turretData[5]) },
142+
{ "Turret7", AIUpdateModuleData::parseTurret, NULL, offsetof(AIUpdateModuleData, m_turretData[6]) },
143+
{ "Turret8", AIUpdateModuleData::parseTurret, NULL, offsetof(AIUpdateModuleData, m_turretData[7]) },
136144
{ "AutoAcquireEnemiesWhenIdle", INI::parseBitString32, TheAutoAcquireEnemiesNames, offsetof(AIUpdateModuleData, m_autoAcquireEnemiesWhenIdle) },
137145
{ "MoodAttackCheckRate", INI::parseDurationUnsignedInt, NULL, offsetof(AIUpdateModuleData, m_moodAttackCheckRate) },
138146
#ifdef ALLOW_SURRENDER

GeneralsMD/Code/GameEngine/Source/GameLogic/System/Damage.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ const char* DamageTypeFlags::s_bitNameList[] =
9494
"TESLA",
9595
// Specific damage types with special logic attached
9696
"CHRONO_GUN",
97+
"CHRONO_UNRESISTABLE",
9798
//"ZOMBIE_VIRUS", // TODO
9899
//"MIND_CONTROL", // TODO
99100
NULL

GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DModelDraw.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,6 +1428,38 @@ void W3DModelDrawModuleData::parseConditionState(INI* ini, void *instance, void
14281428
{ "AltTurretArtAngle", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[1].m_turretArtAngle) },
14291429
{ "AltTurretPitch", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[1].m_turretPitchNameKey) },
14301430
{ "AltTurretArtPitch", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[1].m_turretArtPitch) },
1431+
{ "Turret1", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[0].m_turretAngleNameKey) },
1432+
{ "Turret1ArtAngle", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[0].m_turretArtAngle) },
1433+
{ "Turret1Pitch", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[0].m_turretPitchNameKey) },
1434+
{ "Turret1ArtPitch", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[0].m_turretArtPitch) },
1435+
{ "Turret2", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[1].m_turretAngleNameKey) },
1436+
{ "Turret2ArtAngle", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[1].m_turretArtAngle) },
1437+
{ "Turret2Pitch", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[1].m_turretPitchNameKey) },
1438+
{ "Turret2ArtPitch", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[1].m_turretArtPitch) },
1439+
{ "Turret3", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[2].m_turretAngleNameKey) },
1440+
{ "Turret3ArtAngle", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[2].m_turretArtAngle) },
1441+
{ "Turret3Pitch", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[2].m_turretPitchNameKey) },
1442+
{ "Turret3ArtPitch", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[2].m_turretArtPitch) },
1443+
{ "Turret4", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[3].m_turretAngleNameKey) },
1444+
{ "Turret4ArtAngle", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[3].m_turretArtAngle) },
1445+
{ "Turret4Pitch", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[3].m_turretPitchNameKey) },
1446+
{ "Turret4ArtPitch", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[3].m_turretArtPitch) },
1447+
{ "Turret5", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[4].m_turretAngleNameKey) },
1448+
{ "Turret5ArtAngle", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[4].m_turretArtAngle) },
1449+
{ "Turret5Pitch", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[4].m_turretPitchNameKey) },
1450+
{ "Turret5ArtPitch", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[4].m_turretArtPitch) },
1451+
{ "Turret6", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[5].m_turretAngleNameKey) },
1452+
{ "Turret6ArtAngle", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[5].m_turretArtAngle) },
1453+
{ "Turret6Pitch", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[5].m_turretPitchNameKey) },
1454+
{ "Turret6ArtPitch", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[5].m_turretArtPitch) },
1455+
{ "Turret7", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[6].m_turretAngleNameKey) },
1456+
{ "Turret7ArtAngle", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[6].m_turretArtAngle) },
1457+
{ "Turret7Pitch", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[6].m_turretPitchNameKey) },
1458+
{ "Turret7ArtPitch", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[6].m_turretArtPitch) },
1459+
{ "Turret8", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[7].m_turretAngleNameKey) },
1460+
{ "Turret8ArtAngle", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[7].m_turretArtAngle) },
1461+
{ "Turret8Pitch", parseBoneNameKey, NULL, offsetof(ModelConditionInfo, m_turrets[7].m_turretPitchNameKey) },
1462+
{ "Turret8ArtPitch", INI::parseAngleReal, NULL, offsetof(ModelConditionInfo, m_turrets[7].m_turretArtPitch) },
14311463
{ "ShowSubObject", parseShowHideSubObject, (void*)0, offsetof(ModelConditionInfo, m_hideShowVec) },
14321464
{ "HideSubObject", parseShowHideSubObject, (void*)1, offsetof(ModelConditionInfo, m_hideShowVec) },
14331465
{ "WeaponFireFXBone", parseWeaponBoneName, NULL, offsetof(ModelConditionInfo, m_weaponFireFXBoneName[0]) },

0 commit comments

Comments
 (0)