mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-08-08 16:48:51 +00:00
shmup:: fixup
This commit is contained in:
@@ -89,12 +89,7 @@ struct monster : cell_content, dim_listener {
|
||||
|
||||
void rebasePat(const shiftmatrix& new_pat, cell *tgt);
|
||||
|
||||
~monster() {
|
||||
if(mousetarget == this) mousetarget = nullptr;
|
||||
if(lmousetarget == this) lmousetarget = nullptr;
|
||||
callhooks(hooks_destroy_monster, this);
|
||||
if(parent) parent->unref();
|
||||
}
|
||||
~monster();
|
||||
|
||||
void set_parent(monster *par) {
|
||||
if(parent) parent->unref();
|
||||
@@ -130,6 +125,14 @@ EX cell_content_list active;
|
||||
|
||||
EX vector<monster*> nonvirtual, additional;
|
||||
|
||||
monster::~monster() {
|
||||
if(mousetarget == this) mousetarget = nullptr;
|
||||
if(lmousetarget == this) lmousetarget = nullptr;
|
||||
callhooks(hooks_destroy_monster, this);
|
||||
if(parent) parent->unref();
|
||||
nonvirtual.erase(std::remove(nonvirtual.begin(), nonvirtual.end(), this), nonvirtual.end());
|
||||
}
|
||||
|
||||
cell *findbaseAround(shiftpoint p, cell *around, int maxsteps) {
|
||||
|
||||
if(quotient || fake::split()) {
|
||||
|
||||
Reference in New Issue
Block a user