feedback from az

fixes for interaction from az
This commit is contained in:
marauder2k7 2025-06-18 20:44:37 +01:00
parent b5cd9d0c73
commit 1918ecfdd6
2 changed files with 4 additions and 2 deletions

View file

@ -126,7 +126,6 @@ void GuiCrossHairHud::initPersistFields()
void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect) void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect)
{ {
GuiOffscreenCanvas::sActiveOffscreenCanvas = NULL;
// Must have a connection and player control object // Must have a connection and player control object
GameConnection* conn = GameConnection::getConnectionToServer(); GameConnection* conn = GameConnection::getConnectionToServer();
if (!conn) if (!conn)
@ -162,6 +161,7 @@ void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect)
{ {
if (mFrameTime->getElapsedMs() > 32) if (mFrameTime->getElapsedMs() > 32)
{ {
GuiOffscreenCanvas::sActiveOffscreenCanvas = NULL;
mFrameTime->reset(); mFrameTime->reset();
Point3F newStart, newEnd; Point3F newStart, newEnd;
@ -204,7 +204,6 @@ void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect)
} }
} }
} }
} }
// Hit something... but we'll only display health for named // Hit something... but we'll only display health for named

View file

@ -694,7 +694,10 @@ bool GuiCanvas::processInputEvent(InputEventInfo &inputEvent)
if (GuiOffscreenCanvas::sActiveOffscreenCanvas && if (GuiOffscreenCanvas::sActiveOffscreenCanvas &&
(GuiOffscreenCanvas::sActiveOffscreenCanvas != this) && (GuiOffscreenCanvas::sActiveOffscreenCanvas != this) &&
GuiOffscreenCanvas::sActiveOffscreenCanvas->processInputEvent(inputEvent)) GuiOffscreenCanvas::sActiveOffscreenCanvas->processInputEvent(inputEvent))
{
GuiOffscreenCanvas::sActiveOffscreenCanvas = NULL;
return mConsumeLastInputEvent; return mConsumeLastInputEvent;
}
// First call the general input handler (on the extremely off-chance that it will be handled): // First call the general input handler (on the extremely off-chance that it will be handled):
if (mFirstResponder && mFirstResponder->onInputEvent(inputEvent)) if (mFirstResponder && mFirstResponder->onInputEvent(inputEvent))