Skip to content
Open
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
8 changes: 5 additions & 3 deletions code/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2427,9 +2427,11 @@ void DisplayClass::Mouse_Left_Release(Coord const & coord, Cell const & cell, Ob
}
}

SuperWeaponTypeClass *stype = SuperWeaponTypeClass::From_Action(action);
if (stype != NULL) {
OutList.push_back(EventClass(PlayerPtr->HeapID, EventClass::SPECIAL_PLACE, stype->HeapID, cell));
if (IsTargettingMode != SUPER_NONE) {
SuperWeaponTypeClass *stype = SuperWeaponTypes[IsTargettingMode];
if (stype != NULL) {
OutList.push_back(EventClass(PlayerPtr->HeapID, EventClass::SPECIAL_PLACE, stype->HeapID, cell));
}
}
}

Expand Down
16 changes: 16 additions & 0 deletions manual/changes/fix-sw-shadowing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Keep superweapons that share an Action from replacing each other
category: fix
release: 0.2.0
targets:
- type: system
id: superweapons
effect: changed
credit: [Templarfreak]
---

Placing a superweapon on the map now fires the one that was actually armed, even when
another superweapon defines the same Action. Clicking a target cell previously resolved
back to whichever superweapon type first matched that Action, so two superweapons sharing
one Action value could not be fired independently: placing either one always discharged
the same type and left the other's charge untouched.