From 483b28b258ac8067bf416d24c431ce3d9ffba10c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 23 Nov 2021 18:41:18 +0100 Subject: [PATCH] - uses bucket interface in evSend. --- source/games/blood/src/eventq.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/source/games/blood/src/eventq.cpp b/source/games/blood/src/eventq.cpp index 90331f755..9fd74c08e 100644 --- a/source/games/blood/src/eventq.cpp +++ b/source/games/blood/src/eventq.cpp @@ -488,25 +488,23 @@ void evSend(const EventObject& eob, int rxId, COMMAND_ID command) eo.fromElements(rxBucket[i].type, rxBucket[i].rxindex, rxBucket[i].rxactor); if (!event.event_isObject(eo)) { - switch (rxBucket[i].type) + if (eo.isSector()) { - case 6: - trMessageSector(rxBucket[i].rxindex, event); - break; - case 0: - trMessageWall(rxBucket[i].rxindex, event); - break; - case 3: + trMessageSector(sectnum(eo.sector()), event); + } + else if (eo.isWall()) { - auto actor = rxBucket[i].actor(); + trMessageWall(wallnum(eo.wall()), event); + } + else if (eo.isActor()) + { + auto actor = eo.actor(); if (actor && actor->hasX() && !(actor->s().flags & 32)) { if (actor->x().rxID > 0) trMessageSprite(actor, event); } - break; - } } } }