2
0
mirror of https://github.com/rehlds/metamod-r.git synced 2025-03-15 15:00:22 +03:00
metamod-r/metamod/src/engine_t.h

35 lines
758 B
C
Raw Normal View History

2016-07-26 07:22:47 +07:00
#pragma once
#include "eiface.h" // engfuncs_t, globalvars_t
// Our structure for storing engine references.
struct engine_t {
engine_t();
engine_t(const engine_t&);
engine_t& operator=(const engine_t&);
enginefuncs_t *funcs; // engine funcs
globalvars_t *globals; // engine globals
enginefuncs_t *pl_funcs; // "modified" eng funcs we give to plugins
};
inline engine_t::engine_t()
: funcs(NULL), globals(NULL), pl_funcs(NULL)
{
}
inline engine_t::engine_t(const engine_t& _rhs)
: funcs(_rhs.funcs), globals(_rhs.globals), pl_funcs(_rhs.pl_funcs)
{
}
inline engine_t& engine_t::operator=(const engine_t& _rhs)
{
funcs = _rhs.funcs;
globals = _rhs.globals;
pl_funcs = _rhs.pl_funcs;
return *this;
}
extern engine_t Engine;