Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 5 commits
  • 9 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 05, 2012
@AlexBx AlexBx Updated the copyright year to 2012. 3bd56db
Commits on Mar 15, 2012
@AlexBx AlexBx Several small changes to prism forwarding.
* Member constructors are called explicitly.
* PrismForwarding tag is parsed case-insensitively.
* PrismForwarding.ToAllies and PrismForwarding.BreakSupport fixed.
* SupportingPrisms counter is decreased only if a tower is removed from the list.
1932d3b
@AlexBx AlexBx Forcefully enable LaserFencePost=yes buildings after the EMP subsides.
The problem is usually the check whether the owning house has enough power is not present, but then Prism Towers would start spinning, even if the owner does not have enough power.
6327610
Commits on Mar 17, 2012
@AlexBx AlexBx A weapon's wave color was reset for every ini file like rules, game m…
…ode and map, thus overwriting what the modder set earlier. Wave color now only sets the default if no custom value is present.
ec6fb02
@AlexBx AlexBx Merge branch 'various-fixes' into v02
Conflicts:
	src/Ares.version.h
	src/Ext/BuildingType/PrismForward.cpp
64c9ecf
View
4 src/Ares.version.h
@@ -2,8 +2,8 @@
#define VERSION_H
#define VERSION_MAJOR 12
-#define VERSION_MINOR 74
-#define VERSION_REVISION 345
+#define VERSION_MINOR 77
+#define VERSION_REVISION 825
#define SAVEGAME_MAGIC ((VERSION_MAJOR << 24) | (VERSION_MINOR << 16) | (VERSION_REVISION))
View
2  src/Ext/Building/Body.h
@@ -28,7 +28,7 @@ class BuildingExt
int DamageReserve; //current flat reservoir
// constructor
- cPrismForwarding() : SupportTarget(NULL), PrismChargeDelay(0), ModifierReserve(0.0), DamageReserve(0) {
+ cPrismForwarding() : Senders(), SupportTarget(NULL), PrismChargeDelay(0), ModifierReserve(0.0), DamageReserve(0){
this->Senders.Clear();
};
View
7 src/Ext/Building/Hooks.Prism.cpp
@@ -82,7 +82,7 @@ DEFINE_HOOK(447FAE, BuildingClass_GetObjectActivityState, 6)
if (pTypeData->PrismForwarding.Enabled == BuildingTypeExt::cPrismForwarding::YES
|| pTypeData->PrismForwarding.Enabled == BuildingTypeExt::cPrismForwarding::ATTACK) {
//is a prism tower
- if (B->PrismStage == pcs_Slave && pTypeData->PrismForwarding.BreakSupport) {
+ if (B->PrismStage == pcs_Slave && pTypeData->PrismForwarding.BreakSupport.Get()) {
return NotBusyCharging;
}
}
@@ -145,6 +145,7 @@ DEFINE_HOOK(4503F0, BuildingClass_Update_Prism, 9)
pThis->DestroyNthAnim(BuildingAnimSlot::Active);
pThis->PlayNthAnim(BuildingAnimSlot::Special);
}
+
}
}
}
@@ -253,7 +254,7 @@ DEFINE_HOOK(44ABD0, BuildingClass_FireLaser, 5)
if (LaserBeam) {
if (pTypeData->PrismForwarding.Intensity > 0) {
BuildingExt::ExtData *pData = BuildingExt::ExtMap.Find(B);
- LaserBeam->Thickness += (pTypeData->PrismForwarding.Intensity * (B->SupportingPrisms -1));
+ LaserBeam->Thickness += (pTypeData->PrismForwarding.Intensity * (B->SupportingPrisms - 1));
}
}
@@ -289,7 +290,7 @@ DEFINE_HOOK(448277, PrismForward_BuildingChangeOwner, 5)
BuildingTypeClass *pType = B->Type;
BuildingTypeExt::ExtData *pTypeData = BuildingTypeExt::ExtMap.Find(pType);
- if (pTypeData->PrismForwarding.ToAllies) {
+ if (pTypeData->PrismForwarding.ToAllies.Get()) {
BuildingClass *LastTarget = B;
BuildingClass *FirstTarget = NULL;
while (LastTarget) {
View
4 src/Ext/BuildingType/Body.h
@@ -61,6 +61,7 @@ class BuildingTypeExt
// constructor
cPrismForwarding() : Enabled(NO),
+ Targets(),
MaxFeeds(&RulesClass::Instance->PrismSupportMax),
MaxChainLength(1),
MaxNetworkSize(&RulesClass::Instance->PrismSupportMax),
@@ -71,7 +72,8 @@ class BuildingTypeExt
ChargeDelay(1),
ToAllies(false),
BreakSupport(false),
- SupportWeaponIndex(-1)
+ SupportWeaponIndex(-1),
+ EliteSupportWeaponIndex(-1)
{};
};
View
12 src/Ext/BuildingType/PrismForward.cpp
@@ -18,13 +18,13 @@ void BuildingTypeExt::cPrismForwarding::Initialize(BuildingTypeClass *pThis) {
void BuildingTypeExt::cPrismForwarding::LoadFromINIFile(BuildingTypeClass *pThis, CCINIClass* pINI) {
const char * pID = pThis->ID;
if(pINI->ReadString(pID, "PrismForwarding", "", Ares::readBuffer, Ares::readLength)) {
- if((strcmp(Ares::readBuffer, "yes") == 0) || (strcmp(Ares::readBuffer, "true") == 0)) {
+ if((_strcmpi(Ares::readBuffer, "yes") == 0) || (_strcmpi(Ares::readBuffer, "true") == 0)) {
this->Enabled = YES;
- } else if(strcmp(Ares::readBuffer, "forward") == 0) {
+ } else if(_strcmpi(Ares::readBuffer, "forward") == 0) {
this->Enabled = FORWARD;
- } else if(strcmp(Ares::readBuffer, "attack") == 0) {
+ } else if(_strcmpi(Ares::readBuffer, "attack") == 0) {
this->Enabled = ATTACK;
- } else if((strcmp(Ares::readBuffer, "no") == 0) || (strcmp(Ares::readBuffer, "false"))== 0) {
+ } else if((_strcmpi(Ares::readBuffer, "no") == 0) || (_strcmpi(Ares::readBuffer, "false"))== 0) {
this->Enabled = NO;
}
}
@@ -279,7 +279,7 @@ bool BuildingTypeExt::cPrismForwarding::ValidateSupportTower(
HouseClass *pTargetHouse = TargetTower->Owner;
HouseClass *pSlaveHouse = SlaveTower->Owner;
if ((pSlaveHouse == pTargetHouse && pSlaveHouse == pMasterHouse)
- || (pSlaveTypeData->PrismForwarding.ToAllies
+ || (pSlaveTypeData->PrismForwarding.ToAllies.Get()
&& pSlaveHouse->IsAlliedWith(pTargetHouse)
&& pSlaveHouse->IsAlliedWith(pMasterHouse))) {
//ownership/alliance rules satisfied
@@ -415,8 +415,8 @@ void BuildingTypeExt::cPrismForwarding::RemoveFromNetwork(BuildingClass *SlaveTo
signed int idx = pTargetData->PrismForwarding.Senders.FindItemIndex(&SlaveTower);
if(idx != -1) {
pTargetData->PrismForwarding.Senders.RemoveItem(idx);
+ --TargetTower->SupportingPrisms; //Ares doesn't actually use this, but maintaining it anyway (as direct feeds only)
}
- --TargetTower->SupportingPrisms; //Ares doesn't actually use this, but maintaining it anyway (as direct feeds only)
//slave tower is no longer reference by the target
pSlaveData->PrismForwarding.SupportTarget = NULL; //slave tower no longer references the target
}
View
13 src/Ext/WeaponType/Body.cpp
@@ -13,6 +13,10 @@ Container<WeaponTypeExt> WeaponTypeExt::ExtMap;
template<> WeaponTypeExt::TT *Container<WeaponTypeExt>::SavingObject = NULL;
template<> IStream *Container<WeaponTypeExt>::SavingStream = NULL;
+ColorStruct WeaponTypeExt::ExtData::DefaultWaveColor = ColorStruct(255, 255, 255); // placeholder
+ColorStruct WeaponTypeExt::ExtData::DefaultWaveColorMagBeam = ColorStruct(0xB0, 0, 0xD0); // rp2 values
+ColorStruct WeaponTypeExt::ExtData::DefaultWaveColorSonic = ColorStruct(0, 0, 0); // 0,0,0 is a magic value for "no custom handling"
+
hash_bombExt WeaponTypeExt::BombExt;
hash_waveExt WeaponTypeExt::WaveExt;
hash_boltExt WeaponTypeExt::BoltExt;
@@ -37,12 +41,15 @@ void WeaponTypeExt::ExtData::LoadFromINIFile(WeaponTypeExt::TT *pThis, CCINIClas
}
}
+ // wave colors will be bound to the default values, thus a change of wave
+ // type will still point to the appropriate value, as long as the modder does not
+ // set the color by hand, in which case that value is used.
if(pThis->IsMagBeam) {
- this->Wave_Color.Set(ColorStruct(0xB0, 0, 0xD0)); // rp2 values
+ this->Wave_Color.Bind(&WeaponTypeExt::ExtData::DefaultWaveColorMagBeam);
} else if(pThis->IsSonic) {
- this->Wave_Color.Set(ColorStruct(0, 0, 0)); // 0,0,0 is a magic value for "no custom handling"
+ this->Wave_Color.Bind(&WeaponTypeExt::ExtData::DefaultWaveColorSonic);
} else {
- this->Wave_Color.Set(ColorStruct(255, 255, 255)); // placeholder
+ this->Wave_Color.Bind(&WeaponTypeExt::ExtData::DefaultWaveColor);
}
if(pThis->Damage == 0 && this->Weapon_Loaded) {
View
5 src/Ext/WeaponType/Body.h
@@ -36,6 +36,11 @@ class WeaponTypeExt
class ExtData : public Extension<TT>
{
public:
+ // static defaults
+ static ColorStruct DefaultWaveColor;
+ static ColorStruct DefaultWaveColorSonic;
+ static ColorStruct DefaultWaveColorMagBeam;
+
// Generic
bool Weapon_Loaded;
View
2  src/Misc/EMPulse.cpp
@@ -684,7 +684,7 @@ void EMPulse::DisableEMPEffect(TechnoClass * Victim) {
HasPower = HasPower && Building->IsPowerOnline();
if (!Building->Type->InvisibleInGame) {
- if (HasPower) {
+ if (HasPower || Building->Type->LaserFencePost) {
Building->EnableStuff();
}
updateRadarBlackout(Building);
View
2  src/ver.rc
@@ -19,7 +19,7 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
- VALUE "LegalCopyright", "� pd, DCoder, Electro, Renegade & AlexB 2007-2011\0"
+ VALUE "LegalCopyright", "� pd, DCoder, Electro, Renegade & AlexB 2007-2012\0"
VALUE "FileDescription", "The Ares DLL, unlocking new functionality for Command & Conquer�: Yuri's Revenge�\0"
VALUE "FileVersion", VERSION_STR "\0"
VALUE "InternalName", "ares.dll\0"

No commit comments for this range

Something went wrong with that request. Please try again.