some stuff

This commit is contained in:
2026-03-05 21:25:59 +02:00
parent 2da75ebdd8
commit 99f68e655f
41 changed files with 706 additions and 324 deletions

View File

@@ -1,6 +1,7 @@
#include "player.h"
#include "cglm/cglm.h"
#include "assetmgr.h"
#include "game.h"
void C_MOBAPlayer::Precache()
{
@@ -12,12 +13,19 @@ void C_MOBAPlayer::Spawn()
{
BaseClass::Spawn();
SetThink(Think);
g_pWorldRenderer->SetCameraPosition({0, 0, -20});
};
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)
@@ -26,7 +34,21 @@ BEGIN_DATADESC(C_MOBAPlayer)
END_DATADESC()
IMPLEMENT_RECV_DT(C_MOBAPlayer)
NetPropFloat(m_fTimer),
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);