MRMJ-1: Messenger & Skills fixes

This commit is contained in:
Mind Rapist
2025-12-14 05:17:16 +02:00
parent da619922cb
commit 0f79d890ba
53 changed files with 1387 additions and 231 deletions

View File

@@ -1,12 +1,14 @@
#include "stdafx.h"
#include "memory.h"
#include <atomic>
extern void GOST_Init();
LPHEART thecore_heart = NULL;
volatile int shutdowned = FALSE;
volatile int tics = 0;
std::atomic<int> shutdowned = FALSE;
std::atomic<int> tics = 0;
unsigned int thecore_profiler[NUM_PF];
static int pid_init(void)
@@ -64,14 +66,14 @@ int thecore_init(int fps, HEARTFUNC heartbeat_func)
void thecore_shutdown()
{
shutdowned = TRUE;
shutdowned.store(TRUE);
}
int thecore_idle(void)
{
thecore_tick();
if (shutdowned)
if (shutdowned.load())
return 0;
int pulses;
@@ -110,7 +112,7 @@ float thecore_time(void)
int thecore_is_shutdowned(void)
{
return shutdowned;
return shutdowned.load();
}
void thecore_tick(void)