Skip to content

Commit

Permalink
Minor update Ext\Event
Browse files Browse the repository at this point in the history
  • Loading branch information
Belonit committed Jan 21, 2024
1 parent 15cf586 commit 3299599
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/Ext/Event/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@ bool EventExt::AddEvent()

void EventExt::RespondEvent()
{
if (EventExt::IsValidType(this->Type))
switch (this->Type)
{
switch (this->Type)
{
case EventTypeExt::ResponseTime2:
ProtocolZero::HandleResponseTime2(this);
break;
}
case EventTypeExt::ResponseTime2:
ProtocolZero::HandleResponseTime2(this);
break;
}
}

Expand All @@ -43,7 +40,10 @@ bool EventExt::IsValidType(EventTypeExt type)
DEFINE_HOOK(0x4C6CC8, Networking_RespondToEvent, 0x5)
{
GET(EventExt*, pEvent, ESI);
pEvent->RespondEvent();
if (EventExt::IsValidType(pEvent->Type))
{
pEvent->RespondEvent();
}

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Ext/Event/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ class EventExt
uint32_t Frame;
union
{
char DataBuffer[104];

struct ResponseTime2
{
char MaxAhead;
uint8_t LatencyLevel;
} ResponseTime2;

char DataBuffer[104];
};

bool AddEvent();
Expand Down

0 comments on commit 3299599

Please sign in to comment.