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
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:

jobs:
build:
runs-on: windows-latest
runs-on: windows-2019

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion Phobos.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{3FAF7126-F38C-4D1E-9973-C21A37870F60}</ProjectGuid>
<RootNamespace>Phobos</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
<ProjectName>Phobos</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Credits
- **4SG** - help with docs
- **wiktorderelf** - overhauled Unicode font
- **Uranusian (Thrifinesma)** - Mind Control enhancement, custom warhead splash list, harvesters counter, promoted spawns, shields, death after dead fix, customizeable missing cameo, cameo sorting priority, placement mode responding of tab hotkeys fix, producing progress, custom ore gathering anim, NoManualMove, weapon target house filtering, DeathWeapon fix, re-enable obsolete `JumpjetControls`, AITrigger Building Upgrades recognition, Wall-Gate links, deployed infantry using both weapons, overhauled Unicode font, docs maintenance, CN docs translation
- **secsome (SEC-SOME)** - debug info dump hotkey, refactoring & porting of Ares helper code, introducing more Ares-derived stuff, disguise removal warhead, Mind Control removal warhead, Mind Control enhancement, shields, AnimList.PickRandom, MoveToCell fix, unlimited waypoints, Build At trigger action buildup anim fix, Undeploy building into a unit plays `EVA_NewRallyPointEstablished` fix, custom ore gathering anim, TemporaryClass related crash, Retry dialog on mission failure, Default disguise for individual InfantryTypes, PowerPlant Enhancer, SaveGame Trigger Action, QuickSave command, Numeric variables, Custom gravity for projectiles, Retint map actions bugfix
- **secsome (SEC-SOME)** - debug info dump hotkey, refactoring & porting of Ares helper code, introducing more Ares-derived stuff, disguise removal warhead, Mind Control removal warhead, Mind Control enhancement, shields, AnimList.PickRandom, MoveToCell fix, unlimited waypoints, Build At trigger action buildup anim fix, Undeploy building into a unit plays `EVA_NewRallyPointEstablished` fix, custom ore gathering anim, TemporaryClass related crash, Retry dialog on mission failure, Default disguise for individual InfantryTypes, PowerPlant Enhancer, SaveGame Trigger Action, QuickSave command, Numeric variables, Custom gravity for projectiles, Retint map actions bugfix, Sharpnel enhancement
- **Otamaa (Fahroni, BoredEXE)** - help with CellSpread, ported and fixed custom RadType code, togglable ElectricBolt bolts, customizable Chrono Locomotor properties per TechnoClass, DebrisMaximums fixes, Anim-to-Unit, NotHuman anim sequences improvements, Customizable OpenTopped Properties, hooks for ScriptType Actions 92 & 93, ore stage threshold for `HideIfNoOre`, occupied building `MuzzleFlashX` bugfix,`EnemyUIName=` for other TechnoTypes, TerrainType `DestroyAnim` & `DestroySound`
- **E1 Elite** - TileSet 255 and above bridge repair fix
- **FS-21** - Dump Object Info enhancements, Powered.KillSpawns, Spawner.LimitRange, ScriptType Actions 71 to 113, MC deployer fixes, help with docs, Automatic Passenger Deletion, Customize resource storage
Expand Down
2 changes: 1 addition & 1 deletion YRpp
8 changes: 8 additions & 0 deletions docs/New-or-Enhanced-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,14 @@ Interceptor.EliteMinimumGuardRange=0.0 ; double
Interceptable=no ; boolean
```

### Shrapnel enhancement
- Shrapnel behavior can be triggered on the ground and buildings.

In `rulesmd.ini`
[SOMEPROJECTILE] ; Projectile
Shrapnel.AffectsGround=no ; boolean
Shrapnel.AffectsBuildings=no ; boolean

## Trigger events

### `500-511` Variable comparation
Expand Down
3 changes: 2 additions & 1 deletion docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ New:
- Quicksave hotkey command (by secsome)
- Save Game Trigger Action (by secsome)
- Numeric Variables (by secsome)
- TechnoType's tooltip would display it's build time now (by secsome)
- TechnoType's tooltip would display it's build time now (by secsome)
- Sharpnel enhancement (by secsome)
- Allow `NotHuman=yes` infantry to use random `Death` anim sequence (by Otamaa)
- Ability for warheads to trigger specific `NotHuman=yes` infantry `Death` anim sequence (by Otamaa)
- XDrawOffset for animations (by Morton)
Expand Down
19 changes: 19 additions & 0 deletions src/Ext/Bullet/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,23 @@ DEFINE_HOOK(0x6FF031, TechnoClass_FireAt_ReverseVelocityWhileGravityIsZero, 0xA)
}

return 0;
}

DEFINE_HOOK(0x46A3D6, BulletClass_Shrapnel_Forced, 0xA)
{
enum { Shrapnel = 0x46A40C, Skip = 0x46ADCD };

GET(BulletClass*, pBullet, EDI);

auto const pData = BulletTypeExt::ExtMap.Find(pBullet->Type);

if (auto const pObject = pBullet->GetCell()->FirstObject)
{
if (pObject->WhatAmI() != AbstractType::Building || pData->Shrapnel_AffectsBuildings)
return Shrapnel;
}
else if (pData->Shrapnel_AffectsGround)
return Shrapnel;

return Skip;
}
4 changes: 4 additions & 0 deletions src/Ext/BulletType/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ void BulletTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI)
this->Interceptable.Read(exINI, pSection, "Interceptable");
this->Gravity.Read(exINI, pSection, "Gravity");
this->Gravity_HeightFix.Read(exINI, pSection, "Gravity.HeightFix");
this->Shrapnel_AffectsGround.Read(exINI, pSection, "Shrapnel.AffectsGround");
this->Shrapnel_AffectsBuildings.Read(exINI, pSection, "Shrapnel.AffectsBuildings");

INI_EX exArtINI(CCINIClass::INI_Art);

Expand All @@ -43,6 +45,8 @@ void BulletTypeExt::ExtData::Serialize(T& Stm)
.Process(this->LaserTrail_Types)
.Process(this->Gravity)
.Process(this->Gravity_HeightFix)
.Process(this->Shrapnel_AffectsGround)
.Process(this->Shrapnel_AffectsBuildings)
;
}

Expand Down
4 changes: 4 additions & 0 deletions src/Ext/BulletType/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ class BulletTypeExt
ValueableIdxVector<LaserTrailTypeClass> LaserTrail_Types;
Nullable<double> Gravity;
Valueable<bool> Gravity_HeightFix;
Valueable<bool> Shrapnel_AffectsGround;
Valueable<bool> Shrapnel_AffectsBuildings;

ExtData(BulletTypeClass* OwnerObject) : Extension<BulletTypeClass>(OwnerObject)
, Interceptable { false }
, LaserTrail_Types {}
, Gravity {}
, Gravity_HeightFix { false }
, Shrapnel_AffectsGround { false }
, Shrapnel_AffectsBuildings { false }
{ }

virtual ~ExtData() = default;
Expand Down