// if nothing set, remove this ob when the player dies void notify_die(object killer) { if (notifyfun) { if (call_other(cmdob, notifyfun, killer, environment(this_object())) == -1) removeme(); } else removeme(); }
void PanelButton::scheduleForRemoval() { static int timelapse = 1000; if (checkForBackingFile()) { setEnabled(true); timelapse = 1000; emit hideme(false); return; } else if (KickerSettings::removeButtonsWhenBroken()) { if (timelapse > 255*1000) // we'v given it ~8.5 minutes by this point { emit removeme(); return; } if (timelapse > 3000 && isVisible()) { emit hideme(true); } timelapse *= 2; QTimer::singleShot(timelapse, this, SLOT(scheduleForRemoval())); } }
// no default for killing something void notify_kill(object victim) { if (notifyfun) if (call_other(cmdob, notifyfun, environment(this_object()), victim) == -1) removeme(); }