Skip to content

Commit f1e4083

Browse files
committed
Use TClass property
1 parent 5408f50 commit f1e4083

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/extensions/house/houseext_hooks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ void HouseClassExt::_Harvested(int tiberium, TiberiumType slot)
469469
PointTotal += tiberium * 5;
470470

471471
if ((Session.Type != GAME_NORMAL && !IsHuman) || !RuleExtension->IsTiberiumStorage) {
472-
Credits += tiberium * Tiberiums[slot]->Value;
472+
Credits += tiberium * Tiberiums[slot]->CreditValue;
473473
}
474474
else {
475475
long oldcap = Capacity;

src/extensions/techno/technoext.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ TechnoClassExtension::TechnoClassExtension(const TechnoClass *this_ptr) :
8484
{
8585
new ((StorageClassExt*)&(this_ptr->Storage)) StorageClassExt(&Storage);
8686

87-
const auto ttypeext = Extension::Fetch(this_ptr->Techno_Type_Class());
87+
const auto ttypeext = Extension::Fetch(this_ptr->TClass);
8888
if (ttypeext->Spawns)
8989
SpawnManager = new SpawnManagerClass(const_cast<TechnoClass*>(this_ptr), ttypeext->Spawns, ttypeext->SpawnsNumber, ttypeext->SpawnRegenRate, ttypeext->SpawnReloadRate, ttypeext->SpawnSpawnRate, ttypeext->SpawnLogicRate);
9090
}
@@ -547,7 +547,7 @@ int TechnoClassExtension::Time_To_Build() const
547547
/**
548548
* Walls have a coefficient as they are really cheap.
549549
*/
550-
if (This()->RTTI == RTTI_BUILDING && reinterpret_cast<const BuildingTypeClass *>(This()->Techno_Type_Class())->IsWall) {
550+
if (This()->RTTI == RTTI_BUILDING && reinterpret_cast<const BuildingTypeClass *>(This()->TClass)->IsWall) {
551551
time *= Rule->WallBuildSpeedCoefficient;
552552
}
553553

@@ -609,7 +609,7 @@ bool TechnoClassExtension::Opportunity_Fire()
609609
*/
610610
Coord TechnoClassExtension::Fire_Coord(WeaponSlotType which, TPoint3D<int> offset) const
611611
{
612-
const TechnoTypeClass *ttype = This()->Techno_Type_Class();
612+
const TechnoTypeClass *ttype = This()->TClass;
613613
const auto weaponinfo = This()->Get_Weapon(which);
614614

615615
Matrix3D matrix;
@@ -655,7 +655,7 @@ void TechnoClassExtension::Put_Storage_Pointers()
655655
*/
656656
const TechnoTypeClass *TechnoClassExtension::Techno_Type_Class() const
657657
{
658-
return reinterpret_cast<TechnoClass *>(This())->Techno_Type_Class();
658+
return reinterpret_cast<TechnoClass *>(This())->TClass;
659659
}
660660

661661

src/extensions/technotype/technotypeext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class TechnoTypeClassExtension : public ObjectTypeClassExtension
6464
virtual bool Read_INI(CCINIClass &ini) override;
6565

6666
static ProductionFlags Get_Production_Flags(RTTIType type, int id);
67-
static ProductionFlags Get_Production_Flags(const TechnoClass* techno) { return Get_Production_Flags(techno->Techno_Type_Class()); }
67+
static ProductionFlags Get_Production_Flags(const TechnoClass* techno) { return Get_Production_Flags(techno->TClass); }
6868
static ProductionFlags Get_Production_Flags(const TechnoTypeClass* ttype) { return Get_Production_Flags(Extension::Fetch(ttype)); }
6969
static ProductionFlags Get_Production_Flags(const TechnoTypeClassExtension* ttype_ext);
7070

0 commit comments

Comments
 (0)