mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-11 10:38:20 +00:00
3be8a592e5
Purely automatic change. In case of conflict with this change, apply the other change and rerun the formatting to restore it: $ python scripts/fix_style.py
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
|
#ifndef GAME_CLIENT_COMPONENTS_SPECTATOR_H
|
|
#define GAME_CLIENT_COMPONENTS_SPECTATOR_H
|
|
#include <base/vmath.h>
|
|
|
|
#include <game/client/component.h>
|
|
|
|
class CSpectator : public CComponent
|
|
{
|
|
enum
|
|
{
|
|
NO_SELECTION = -3,
|
|
};
|
|
|
|
bool m_Active;
|
|
bool m_WasActive;
|
|
|
|
int m_SelectedSpectatorID;
|
|
vec2 m_SelectorMouse;
|
|
|
|
float m_OldMouseX;
|
|
float m_OldMouseY;
|
|
|
|
static void ConKeySpectator(IConsole::IResult *pResult, void *pUserData);
|
|
static void ConSpectate(IConsole::IResult *pResult, void *pUserData);
|
|
static void ConSpectateNext(IConsole::IResult *pResult, void *pUserData);
|
|
static void ConSpectatePrevious(IConsole::IResult *pResult, void *pUserData);
|
|
static void ConSpectateClosest(IConsole::IResult *pResult, void *pUserData);
|
|
|
|
public:
|
|
CSpectator();
|
|
|
|
virtual void OnConsoleInit();
|
|
virtual bool OnMouseMove(float x, float y);
|
|
virtual void OnRender();
|
|
virtual void OnRelease();
|
|
virtual void OnReset();
|
|
|
|
void Spectate(int SpectatorID);
|
|
};
|
|
|
|
#endif
|