Fixed amb1358 - Timeleft not reseting on TF2 restarts
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402183
This commit is contained in:
parent
02faa8fbd6
commit
8cd8228251
@ -120,6 +120,9 @@ bool TF2Tools::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool
|
|||||||
|
|
||||||
GET_V_IFACE_CURRENT(GetServerFactory, gameents, IServerGameEnts, INTERFACEVERSION_SERVERGAMEENTS);
|
GET_V_IFACE_CURRENT(GetServerFactory, gameents, IServerGameEnts, INTERFACEVERSION_SERVERGAMEENTS);
|
||||||
|
|
||||||
|
GET_V_IFACE_CURRENT(GetEngineFactory, m_GameEventManager, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2);
|
||||||
|
m_GameEventManager->AddListener(this, "teamplay_restart_round", true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,6 +147,11 @@ bool TF2Tools::RegisterConCommandBase(ConCommandBase *pVar)
|
|||||||
return g_SMAPI->RegisterConCommandBase(g_PLAPI, pVar);
|
return g_SMAPI->RegisterConCommandBase(g_PLAPI, pVar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TF2Tools::FireGameEvent( IGameEvent *event )
|
||||||
|
{
|
||||||
|
timersys->NotifyOfGameStart();
|
||||||
|
timersys->MapTimeLeftChanged();
|
||||||
|
}
|
||||||
|
|
||||||
bool TF2Tools::QueryRunning(char *error, size_t maxlength)
|
bool TF2Tools::QueryRunning(char *error, size_t maxlength)
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "smsdk_ext.h"
|
#include "smsdk_ext.h"
|
||||||
#include <IBinTools.h>
|
#include <IBinTools.h>
|
||||||
#include <server_class.h>
|
#include <server_class.h>
|
||||||
|
#include <igameevents.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sample implementation of the SDK Extension.
|
* @brief Sample implementation of the SDK Extension.
|
||||||
@ -48,7 +49,8 @@
|
|||||||
class TF2Tools :
|
class TF2Tools :
|
||||||
public SDKExtension,
|
public SDKExtension,
|
||||||
public ICommandTargetProcessor,
|
public ICommandTargetProcessor,
|
||||||
public IConCommandBaseAccessor
|
public IConCommandBaseAccessor,
|
||||||
|
public IGameEventListener2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
@ -91,6 +93,9 @@ public:
|
|||||||
public:
|
public:
|
||||||
bool ProcessCommandTarget(cmd_target_info_t *info);
|
bool ProcessCommandTarget(cmd_target_info_t *info);
|
||||||
bool RegisterConCommandBase(ConCommandBase *pVar);
|
bool RegisterConCommandBase(ConCommandBase *pVar);
|
||||||
|
|
||||||
|
IGameEventManager2 *m_GameEventManager;
|
||||||
|
void FireGameEvent( IGameEvent *event );
|
||||||
public:
|
public:
|
||||||
#if defined SMEXT_CONF_METAMOD
|
#if defined SMEXT_CONF_METAMOD
|
||||||
/**
|
/**
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
#define SMEXT_ENABLE_GAMECONF
|
#define SMEXT_ENABLE_GAMECONF
|
||||||
//#define SMEXT_ENABLE_MEMUTILS
|
//#define SMEXT_ENABLE_MEMUTILS
|
||||||
#define SMEXT_ENABLE_GAMEHELPERS
|
#define SMEXT_ENABLE_GAMEHELPERS
|
||||||
//#define SMEXT_ENABLE_TIMERSYS
|
#define SMEXT_ENABLE_TIMERSYS
|
||||||
//#define SMEXT_ENABLE_THREADER
|
//#define SMEXT_ENABLE_THREADER
|
||||||
//#define SMEXT_ENABLE_LIBSYS
|
//#define SMEXT_ENABLE_LIBSYS
|
||||||
//#define SMEXT_ENABLE_USERMSGS
|
//#define SMEXT_ENABLE_USERMSGS
|
||||||
|
Loading…
Reference in New Issue
Block a user