Files
funnygame/game/client/milmoba/player.cpp
2026-03-05 21:25:59 +02:00

55 lines
986 B
C++

#include "player.h"
#include "cglm/cglm.h"
#include "assetmgr.h"
#include "game.h"
void C_MOBAPlayer::Precache()
{
SetModel("game/core/models/cube.fmdl");
}
void C_MOBAPlayer::Spawn()
{
BaseClass::Spawn();
SetThink(Think);
};
void C_MOBAPlayer::Think( float fDelta )
{
BaseClass::Think(fDelta);
C_MOBAPlayer *pEntity = (C_MOBAPlayer*)UTIL_GetLocalPlayer();
if (pEntity == this)
{
Vector vCameraPos = GetAbsOrigin();
vCameraPos.z -= 20;
g_pWorldRenderer->SetCameraPosition(vCameraPos);
}
};
LINK_ENTITY_TO_CLASS(player, C_MOBAPlayer)
BEGIN_DATADESC(C_MOBAPlayer)
END_DATADESC()
IMPLEMENT_RECV_DT(C_MOBAPlayer)
END_RECV_DT()
IMPLEMENT_EMPTY_SEND_DT(C_MOBAPlayer)
static void IN_ForwardDown( int c, char **v ) {
}
static ConCommand startforward("+forward", IN_ForwardDown);
static void IN_ForwardUp( int c, char **v ) {
C_MOBAPlayer *pEntity = (C_MOBAPlayer*)UTIL_GetLocalPlayer();
if (pEntity)
{
}
}
static ConCommand endforward("-forward", IN_ForwardUp);