[Blood] Fix negative priority event processing

Some sprites (for example, "Blood Drip" sprite type 702) cause
negative priority events to be added added to the event queue
on map initialization. Despite them being the highest priority
entries in the event queue, comparision with the game timer performs an
implicit unsigned conversion, which wrongly results in their priority
being considered much higher than the current in-game time, causing the
event loop to never advance. This commit fixes this problem.
This commit is contained in:
Nikolay Ambartsumov 2020-12-31 16:48:42 +02:00 committed by Christoph Oelckers
parent edd5b92c94
commit 591f593888
1 changed files with 1 additions and 1 deletions

View File

@ -557,7 +557,7 @@ void evKill(int index, int type, CALLBACK_ID cb)
void evProcess(unsigned int time)
{
while (queue.size() > 0 && time >= queue.begin()->priority)
while (queue.size() > 0 && (int)time >= queue.begin()->priority)
{
EVENT event = *queue.begin();
queue.erase(queue.begin());