From 890e3a92a5fdbb690c6106546175724a1914f739 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Thu, 23 Nov 2023 23:49:41 +0800 Subject: [PATCH] [saco] Implement sub_100A0010 --- saco/game/game.cpp | 25 ++++++++++++++++++++----- saco/main.h | 2 ++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/saco/game/game.cpp b/saco/game/game.cpp index ad8e410..43acce6 100644 --- a/saco/game/game.cpp +++ b/saco/game/game.cpp @@ -30,6 +30,26 @@ CGame::CGame() field_5D = 90; } +void CGame::sub_100A0010() +{ + int time = (int)RakNet::GetTime(); + if(unnamed_1015068C) + { + if((time - unnamed_1015068C) > 30) + { + unnamed_10150688++; + if(unnamed_10150688 == 5) + unnamed_10150688 = 0; + unnamed_1015068C = time; + } + *(BYTE*)0xB7356E = unnamed_10150688; + } + else + { + unnamed_1015068C = time; + } +} + //----------------------------------------------------------- void CGame::InitGame() @@ -56,11 +76,6 @@ void CGame::InitGame() //----------------------------------------------------------- -void CGame::sub_100A0010() -{ - // TODO: CGame::sub_100A0010() .text:100A0010 -} - void CGame::sub_100A0060() { // No indication for __thiscall, maybe not part of CGame diff --git a/saco/main.h b/saco/main.h index e52b42f..89c3f46 100644 --- a/saco/main.h +++ b/saco/main.h @@ -24,6 +24,8 @@ typedef struct _GAME_SETTINGS { #include "game/game.h" +#include "../raknet/GetTime.h" + #include "net/netgame.h" #include "config.h"